Make sure language packages are loaded after lsp-mode
This commit is contained in:
parent
8c4b41ce53
commit
2352c98316
1 changed files with 25 additions and 8 deletions
|
@ -1011,6 +1011,7 @@ Indent 2 spaces
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package js2-mode
|
(use-package js2-mode
|
||||||
|
:after lsp-mode
|
||||||
:mode
|
:mode
|
||||||
("\\.mjs\\'" . js2-mode)
|
("\\.mjs\\'" . js2-mode)
|
||||||
("\\.jsx?\\'" . js2-jsx-mode)
|
("\\.jsx?\\'" . js2-jsx-mode)
|
||||||
|
@ -1033,6 +1034,7 @@ TypeScript stuff
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package typescript-mode
|
(use-package typescript-mode
|
||||||
|
:after lsp-mode
|
||||||
:mode
|
:mode
|
||||||
("\\.tsx?\\'" . typescript-mode)
|
("\\.tsx?\\'" . typescript-mode)
|
||||||
:hook (typescript-mode . lsp-deferred))
|
:hook (typescript-mode . lsp-deferred))
|
||||||
|
@ -1050,6 +1052,7 @@ Prefer local packages from =node_modules= to global ones
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package web-mode
|
(use-package web-mode
|
||||||
|
:after lsp-mode
|
||||||
:config
|
:config
|
||||||
(setq web-mode-markup-indent-offset 2
|
(setq web-mode-markup-indent-offset 2
|
||||||
web-mode-css-indent-offset 2
|
web-mode-css-indent-offset 2
|
||||||
|
@ -1070,6 +1073,7 @@ Prefer local packages from =node_modules= to global ones
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
|
:after lsp-mode
|
||||||
:mode
|
:mode
|
||||||
(("README\\.md\\'" . gfm-mode)
|
(("README\\.md\\'" . gfm-mode)
|
||||||
("\\.md\\'" . markdown-mode)
|
("\\.md\\'" . markdown-mode)
|
||||||
|
@ -1087,6 +1091,7 @@ Add support for Elixir with [[https://github.com/elixir-editors/emacs-elixir][el
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package elixir-mode
|
(use-package elixir-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook ((elixir-format . (lambda ()
|
:hook ((elixir-format . (lambda ()
|
||||||
(if (projectile-project-p)
|
(if (projectile-project-p)
|
||||||
(setq elixir-format-arguments
|
(setq elixir-format-arguments
|
||||||
|
@ -1114,6 +1119,7 @@ Rust support with [[https://github.com/rust-lang/rust-mode][rust-mode]].
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package rust-mode
|
(use-package rust-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook
|
:hook
|
||||||
(rust-mode . lsp-deferred)
|
(rust-mode . lsp-deferred)
|
||||||
(before-save . lsp-format-buffer)
|
(before-save . lsp-format-buffer)
|
||||||
|
@ -1156,6 +1162,7 @@ Add docker support with [[https://github.com/spotify/dockerfile-mode][dockerfile
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package dockerfile-mode
|
(use-package dockerfile-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (dockerfile-mode . lsp-deferred))
|
:hook (dockerfile-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1180,6 +1187,7 @@ Add docker support with [[https://github.com/spotify/dockerfile-mode][dockerfile
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package json-mode
|
(use-package json-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (json-mode . lsp-deferred))
|
:hook (json-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1189,6 +1197,7 @@ Add [[https://melpa.org/#/cmake-mode][cmake-mode]]
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package cmake-mode
|
(use-package cmake-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (cmake-mode . lsp-deferred))
|
:hook (cmake-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1198,6 +1207,7 @@ Use [[https://github.com/yoshiki/yaml-mode][yaml-mode]] to handle YAML files
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package yaml-mode
|
(use-package yaml-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (yaml-mode . lsp-deferred))
|
:hook (yaml-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
*** C/C++
|
*** C/C++
|
||||||
|
@ -1207,6 +1217,7 @@ Enable clangd LSP for C and C++
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package cc-mode
|
(use-package cc-mode
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
:after lsp-mode
|
||||||
:hook
|
:hook
|
||||||
(c-mode . lsp-deferred)
|
(c-mode . lsp-deferred)
|
||||||
(c++-mode . lsp-deferred))
|
(c++-mode . lsp-deferred))
|
||||||
|
@ -1241,6 +1252,7 @@ Add [[https://github.com/NixOS/nix-mode][nix-mode]]
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package nix-mode
|
(use-package nix-mode
|
||||||
|
:after lsp-mode
|
||||||
:mode "\\.nix\\'"
|
:mode "\\.nix\\'"
|
||||||
:hook (nix-mode . lsp-deferred))
|
:hook (nix-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
@ -1276,6 +1288,7 @@ Similar to =lisp=, there is [[https://github.com/clojure-emacs/cider][CIDER]] (C
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package terraform-mode
|
(use-package terraform-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (terraform-mode . lsp-deferred))
|
:hook (terraform-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1295,6 +1308,7 @@ Similar to =lisp=, there is [[https://github.com/clojure-emacs/cider][CIDER]] (C
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package zig-mode
|
(use-package zig-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (zig-mode . lsp-deferred))
|
:hook (zig-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1308,6 +1322,7 @@ Similar to =lisp=, there is [[https://github.com/clojure-emacs/cider][CIDER]] (C
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package racket-mode
|
(use-package racket-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (racket-mode . lsp-deferred))
|
:hook (racket-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1318,6 +1333,7 @@ Let =ruby-mode= handle Ruby files
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package ruby-mode
|
(use-package ruby-mode
|
||||||
:ensure nil
|
:ensure nil
|
||||||
|
:after lsp-mode
|
||||||
:hook (ruby-mode . lsp-deferred))
|
:hook (ruby-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1337,6 +1353,7 @@ It's better than nothing.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package go-mode
|
(use-package go-mode
|
||||||
|
:after lsp-mode
|
||||||
:hook (go-mode . lsp-deferred))
|
:hook (go-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue