summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2019-07-03 12:03:25 +0200
committerAlan Pearce2019-07-03 12:03:47 +0200
commit07c32a38ef4e8e99afcd4cbc96cb47c28515539c (patch)
tree2864fa30797d40aea06b866c31d9d7f78d7d1107 /emacs
parent9d9573982dd2d3c0fd24d87465802045794546d1 (diff)
downloaddotfiles-07c32a38ef4e8e99afcd4cbc96cb47c28515539c.tar.lz
dotfiles-07c32a38ef4e8e99afcd4cbc96cb47c28515539c.tar.zst
dotfiles-07c32a38ef4e8e99afcd4cbc96cb47c28515539c.zip
Emacs: enable lsp in javascript-mode
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index dfcd634..45d8171 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -506,10 +506,14 @@ With two prefix arguments, write out the day and month name."
            (flymake-warning-bitmap '(left-vertical-bar compilation-warning))))
 
 (use-package lsp-mode
-  :ghook ('typescript-mode-hook #'lsp)
+  :ghook ('(typescript-mode-hook
+            javascript-mode-hook)
+          #'lsp)
   :custom ((lsp-auto-guess-root t)
            (lsp-prefer-flymake t)
-           (lsp-enable-symbol-highlighting nil)))
+           (lsp-enable-symbol-highlighting nil))
+  :init (progn
+          (add-to-list 'lsp-language-id-configuration '(javascript-mode . "javascript"))))
 
 (use-package lsp-ui
   :after lsp-mode