Emacs: Fix LSP setup
Alan Pearce alan@alanpearce.eu
Mon, 04 Feb 2019 15:12:44 +0000
1 files changed, 7 insertions(+), 12 deletions(-)
jump to
M emacs/.emacs.d/main.el → emacs/.emacs.d/main.el
@@ -1640,11 +1640,14 @@ ;;;;; Language Server Protocol ;; Enable smart language features by communicating with an outside application. Neat. -(use-package lsp-mode) +(use-package lsp-mode + :commands lsp + :hook (js2-mode + typescript-mode)) -(use-package lsp-imenu - :config (progn - (add-hook 'lsp-after-open-hook #'lsp-enable-imenu))) +(use-package lsp-ui + :commands (lsp-ui-mode) + :config (add-hook 'lsp-after-open-hook #'lsp-enable-imenu)) (use-package company-lsp :after (company lsp-mode) @@ -1909,14 +1912,6 @@ (use-package indium :diminish (indium-interaction-mode . "In") :config (progn (add-hook 'js2-mode-hook #'indium-interaction-mode))) - -;;;;;; lsp-javascript - -(use-package lsp-javascript-typescript - :if (executable-find "javascript-typescript-langserver") - :config (progn - (remove-hook 'js2-mode-hook #'lsp-javascript-typescript-enable) - (add-hook 'typescript-mode-hook #'lsp-javascript-typescript-enable))) ;;;;;; tide