Fix typescript language server on emacs

This commit is contained in:
Simponic 2022-11-15 10:11:40 -07:00
parent 2a6daaafbb
commit 06a0610eee
Signed by untrusted user who does not match committer: simponic
GPG Key ID: 52B3774857EB24B1

View File

@ -207,7 +207,7 @@
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode) :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
(elixir-mode . lsp) (elixir-mode . lsp)
(rust-mode . lsp) (rust-mode . lsp)
(typescript-mode . lsp) (typescript-mode . lsp) ;; npm install -g typescript typescript-language-server
;; if you want which-key integration ;; if you want which-key integration
(lsp-mode . lsp-enable-which-key-integration)) (lsp-mode . lsp-enable-which-key-integration))
:commands lsp) :commands lsp)
@ -254,12 +254,12 @@ After installing the ~rust-analyzer~ program, the following can be used:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package prettier-js (use-package prettier-js
:ensure t) :ensure t)
(add-hook 'web-mode-hook #'(lambda () (add-hook 'js2-mode-hook 'prettier-js-mode)
(enable-minor-mode (add-hook 'web-mode-hook 'prettier-js-mode)
'("\\.jsx?\\'" . prettier-js-mode))
(enable-minor-mode
'("\\.tsx?\\'" . prettier-js-mode))))
#+END_SRC #+END_SRC
#+RESULTS:
*** Kotlin *** Kotlin
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package kotlin-mode (use-package kotlin-mode