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
|
||||
(use-package js2-mode
|
||||
:after lsp-mode
|
||||
:mode
|
||||
("\\.mjs\\'" . js2-mode)
|
||||
("\\.jsx?\\'" . js2-jsx-mode)
|
||||
|
@ -1033,6 +1034,7 @@ TypeScript stuff
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package typescript-mode
|
||||
:after lsp-mode
|
||||
:mode
|
||||
("\\.tsx?\\'" . typescript-mode)
|
||||
:hook (typescript-mode . lsp-deferred))
|
||||
|
@ -1050,6 +1052,7 @@ Prefer local packages from =node_modules= to global ones
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package web-mode
|
||||
:after lsp-mode
|
||||
:config
|
||||
(setq web-mode-markup-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
|
||||
(use-package markdown-mode
|
||||
:after lsp-mode
|
||||
:mode
|
||||
(("README\\.md\\'" . gfm-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
|
||||
(use-package elixir-mode
|
||||
:after lsp-mode
|
||||
:hook ((elixir-format . (lambda ()
|
||||
(if (projectile-project-p)
|
||||
(setq elixir-format-arguments
|
||||
|
@ -1114,6 +1119,7 @@ Rust support with [[https://github.com/rust-lang/rust-mode][rust-mode]].
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package rust-mode
|
||||
:after lsp-mode
|
||||
:hook
|
||||
(rust-mode . lsp-deferred)
|
||||
(before-save . lsp-format-buffer)
|
||||
|
@ -1155,8 +1161,9 @@ Support for TOML files with [[https://github.com/dryman/toml-mode.el][toml-mode]
|
|||
Add docker support with [[https://github.com/spotify/dockerfile-mode][dockerfile-mode]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package dockerfile-mode
|
||||
:hook (dockerfile-mode . lsp-deferred))
|
||||
(use-package dockerfile-mode
|
||||
:after lsp-mode
|
||||
:hook (dockerfile-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
*** Bitbake / Yocto
|
||||
|
@ -1179,8 +1186,9 @@ Add docker support with [[https://github.com/spotify/dockerfile-mode][dockerfile
|
|||
[[https://github.com/joshwnj/json-mode][json-mode]] extends the builtin =js-mode= with better syntax highlighting for JSON and adds some editing keybindings
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package json-mode
|
||||
:hook (json-mode . lsp-deferred))
|
||||
(use-package json-mode
|
||||
:after lsp-mode
|
||||
:hook (json-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
*** CMake
|
||||
|
@ -1188,8 +1196,9 @@ Add docker support with [[https://github.com/spotify/dockerfile-mode][dockerfile
|
|||
Add [[https://melpa.org/#/cmake-mode][cmake-mode]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package cmake-mode
|
||||
:hook (cmake-mode . lsp-deferred))
|
||||
(use-package cmake-mode
|
||||
:after lsp-mode
|
||||
:hook (cmake-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
*** YAML
|
||||
|
@ -1197,8 +1206,9 @@ Add [[https://melpa.org/#/cmake-mode][cmake-mode]]
|
|||
Use [[https://github.com/yoshiki/yaml-mode][yaml-mode]] to handle YAML files
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package yaml-mode
|
||||
:hook (yaml-mode . lsp-deferred))
|
||||
(use-package yaml-mode
|
||||
:after lsp-mode
|
||||
:hook (yaml-mode . lsp-deferred))
|
||||
#+end_src
|
||||
*** C/C++
|
||||
|
||||
|
@ -1207,6 +1217,7 @@ Enable clangd LSP for C and C++
|
|||
#+begin_src emacs-lisp
|
||||
(use-package cc-mode
|
||||
:ensure nil
|
||||
:after lsp-mode
|
||||
:hook
|
||||
(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
|
||||
(use-package nix-mode
|
||||
:after lsp-mode
|
||||
:mode "\\.nix\\'"
|
||||
:hook (nix-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
@ -1276,6 +1288,7 @@ Similar to =lisp=, there is [[https://github.com/clojure-emacs/cider][CIDER]] (C
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package terraform-mode
|
||||
:after lsp-mode
|
||||
:hook (terraform-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
|
@ -1295,6 +1308,7 @@ Similar to =lisp=, there is [[https://github.com/clojure-emacs/cider][CIDER]] (C
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package zig-mode
|
||||
:after lsp-mode
|
||||
:hook (zig-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
|
@ -1308,6 +1322,7 @@ Similar to =lisp=, there is [[https://github.com/clojure-emacs/cider][CIDER]] (C
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package racket-mode
|
||||
:after lsp-mode
|
||||
:hook (racket-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
|
@ -1318,6 +1333,7 @@ Let =ruby-mode= handle Ruby files
|
|||
#+begin_src emacs-lisp
|
||||
(use-package ruby-mode
|
||||
:ensure nil
|
||||
:after lsp-mode
|
||||
:hook (ruby-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
|
@ -1337,6 +1353,7 @@ It's better than nothing.
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package go-mode
|
||||
:after lsp-mode
|
||||
:hook (go-mode . lsp-deferred))
|
||||
#+end_src
|
||||
|
||||
|
|
Loading…
Reference in a new issue