From 623ae1f55f323b342ebfc135edb66d39d3fcda51 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 18 Aug 2023 15:52:06 -0400 Subject: [PATCH] Use the typescript language server for javascript. --- ansible/roles/emacs/files/lang-javascript.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ansible/roles/emacs/files/lang-javascript.el b/ansible/roles/emacs/files/lang-javascript.el index 7bd847e..2c28da8 100644 --- a/ansible/roles/emacs/files/lang-javascript.el +++ b/ansible/roles/emacs/files/lang-javascript.el @@ -69,6 +69,13 @@ ("\\.js\\'" . js-ts-mode) ) :commands (js-ts-mode) + :hook ( + (js-ts-mode . (lambda () + (when-linux + (eglot-ensure) + ) + )) + ) :init (add-to-list 'treesit-language-source-alist '(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript" "master" "src"))) (unless (treesit-ready-p 'javascript) (treesit-install-language-grammar 'javascript))