all repos — archive/dotfiles @ d7b9682612e514307123002d88ec24a413871bec

Superseded by nixfiles

Emacs: Fix LSP setup
Alan Pearce alan@alanpearce.eu
Mon, 04 Feb 2019 15:12:44 +0000
commit

d7b9682612e514307123002d88ec24a413871bec

parent

9fb4a601b0e7b523a37c91ad6cfe4b65a5315a4e

1 files changed, 7 insertions(+), 12 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.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