Set up dap-mode properly

This commit is contained in:
Jeremy Dormitzer 2020-01-02 15:06:21 -05:00
parent fc7c534747
commit 8301e16752

View File

@ -1637,7 +1637,33 @@ Emacs support for the Language Server Protocol
lsp-ui-sideline-update-mode 'point))
(use-package dap-mode
:after (lsp-mode))
:after (lsp-mode)
:commands (dap-debug dap-debug-edit-template)
:hook (prog-mode . (lambda ()
(dap-mode 1)
(dap-ui-mode 1)
(dap-tooltip-mode 1)))
:init
(defvar dap-commands (make-sparse-keymap))
(jdormit/define-prefix "cm" "dap")
:config
(require 'dap-python)
:general
(dap-commands
"d" 'dap-debug
"T" 'dap-debug-edit-template
"n" 'dap-next
"i" 'dap-step-in
"o" 'dap-step-out
"c" 'dap-continue
"r" 'dap-restart-frame
"l" 'dap-ui-locals
"h" 'dap-hydra
"b" 'dap-breakpoint-toggle
"B" 'dap-ui-breakpoints-ui-list
"e" 'dap-eval
"x" 'dap-ui-inspect)
(leader-map "cm" dap-commands))
(with-eval-after-load 'lsp-clients
(defun lsp-typescript-javascript-tsx-jsx-activate-p (filename major-mode)