Add typescript mode, and disable the shitty Volar LSP server
This commit is contained in:
parent
61a4654da5
commit
68a740d508
3 changed files with 9 additions and 9 deletions
|
|
@ -10,6 +10,8 @@
|
||||||
:requires (web-mode company-web lsp-mode lsp-ui)
|
:requires (web-mode company-web lsp-mode lsp-ui)
|
||||||
:straight t)
|
:straight t)
|
||||||
|
|
||||||
|
(use-package typescript-mode :straight t)
|
||||||
|
|
||||||
;; (use-package vue-mode
|
;; (use-package vue-mode
|
||||||
;; :straight t
|
;; :straight t
|
||||||
;; :defer t)
|
;; :defer t)
|
||||||
|
|
@ -18,9 +20,6 @@
|
||||||
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
||||||
(add-to-list 'auto-mode-alist '("\\.json\\'" . js2-mode))
|
(add-to-list 'auto-mode-alist '("\\.json\\'" . js2-mode))
|
||||||
|
|
||||||
;; Use js2-mode for typescript editing
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.ts\\'" . js2-mode))
|
|
||||||
|
|
||||||
(defun activate-js2-mode ()
|
(defun activate-js2-mode ()
|
||||||
"JS2 mode overrides."
|
"JS2 mode overrides."
|
||||||
(set-indent 2)
|
(set-indent 2)
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,6 @@
|
||||||
;; ERB mode
|
;; ERB mode
|
||||||
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
|
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
|
||||||
|
|
||||||
;; React Typescript
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
|
|
||||||
|
|
||||||
;; Plain React
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode))
|
|
||||||
|
|
||||||
;; Vue JS
|
;; Vue JS
|
||||||
(add-to-list 'auto-mode-alist '("\\.vue\\'" . web-mode))
|
(add-to-list 'auto-mode-alist '("\\.vue\\'" . web-mode))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,13 @@
|
||||||
lsp-ui-delay 0.5 ;; Wait half a second to display documentation
|
lsp-ui-delay 0.5 ;; Wait half a second to display documentation
|
||||||
lsp-ui-doc-position 'at-point
|
lsp-ui-doc-position 'at-point
|
||||||
lsp-ui-doc-include-signature t
|
lsp-ui-doc-include-signature t
|
||||||
|
;; Disable the piece of shit vue LSP server. It activates itself in every
|
||||||
|
;; project with .js, .ts or .json file due to something called 'takeover
|
||||||
|
;; mode' or 'hybrid mode' or some such.
|
||||||
|
;; It would be okay, but it also doesn't work 99% of the time.
|
||||||
|
|
||||||
|
;; When needed, enable this hot garbage in dir-locals.el
|
||||||
|
lsp-disabled-clients '(vue-semantic-server)
|
||||||
lsp-log-io nil)
|
lsp-log-io nil)
|
||||||
|
|
||||||
;; Lsp debugger mode
|
;; Lsp debugger mode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue