eglot tweaks, add terraform-ls
This commit is contained in:
parent
60b9355ada
commit
627d902ce8
1 changed files with 24 additions and 2 deletions
|
@ -1008,7 +1008,21 @@ Visualise git changes in the gutter, next to the line numbers
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(conf-toml-mode . ("taplo" "lsp" "stdio"))
|
'(conf-toml-mode . ("taplo" "lsp" "stdio"))
|
||||||
'(elixir-mode elixir-ts-mode heex-ts-mode . ("elixir-ls")))
|
'(elixir-mode elixir-ts-mode heex-ts-mode . ("elixir-ls")))
|
||||||
(setq eglot-autoshutdown t))
|
(setq eglot-autoshutdown t
|
||||||
|
eldoc-echo-area-use-multiline-p 0.1)
|
||||||
|
:hook
|
||||||
|
(eglot-managed-mode . (lambda ()
|
||||||
|
(eglot-inlay-hints-mode 1)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l a") 'eglot-code-actions)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l f") 'eglot-format)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l h") 'eldoc)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l i") 'eglot-find-implementation)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l r") 'eglot-rename)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l t") 'eglot-find-typeDefinition)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l w d") 'eglot-list-connections)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l w r") 'eglot-reconnect)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l w q") 'eglot-shutdown)
|
||||||
|
(define-key eglot-mode-map (kbd "C-c l y") 'eglot-inlay-hints-mode))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
[[https://github.com/nemethf/eglot-x][eglot-x]] adds support for some LSP extensions to =eglot=
|
[[https://github.com/nemethf/eglot-x][eglot-x]] adds support for some LSP extensions to =eglot=
|
||||||
|
@ -1377,7 +1391,7 @@ Tell =nil= to use =nixpkgs-fmt= for formatting nix files.
|
||||||
(with-eval-after-load 'eglot
|
(with-eval-after-load 'eglot
|
||||||
(add-to-list 'eglot-server-programs
|
(add-to-list 'eglot-server-programs
|
||||||
'(nix-mode . ("nil" :initializationOptions
|
'(nix-mode . ("nil" :initializationOptions
|
||||||
`(:nil (:formatting (:command ("nixpkgs-fmt"))))))))
|
`(:nil (:formatting (:command ["nixpkgs-fmt"])))))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Common Lisp
|
*** Common Lisp
|
||||||
|
@ -1415,6 +1429,14 @@ Similar to =lisp=, there is [[https://github.com/clojure-emacs/cider][CIDER]] (C
|
||||||
:hook (terraform-mode . eglot-ensure))
|
:hook (terraform-mode . eglot-ensure))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Register =terraform-ls= with eglot
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(with-eval-after-load 'eglot
|
||||||
|
(add-to-list 'eglot-server-programs
|
||||||
|
'(terraform-mode . ("terraform-ls" "serve"))))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** Fish
|
*** Fish
|
||||||
|
|
||||||
[[https://github.com/wwwjfy/emacs-fish][fish-mode]] provides a major mode for fish shell scripts
|
[[https://github.com/wwwjfy/emacs-fish][fish-mode]] provides a major mode for fish shell scripts
|
||||||
|
|
Loading…
Reference in a new issue