Replace eglot with lsp

This commit is contained in:
Andreas Zweili 2023-05-01 19:18:27 +02:00
parent 0d38d228cc
commit d7134c6642
2 changed files with 26 additions and 6 deletions

View File

@ -36,7 +36,6 @@
epkgs.dired-hide-dotfiles
epkgs.direnv
epkgs.discover-my-major
epkgs.eglot
epkgs.elisp-refs
epkgs.epl
epkgs.evil
@ -53,6 +52,7 @@
epkgs.hydra
epkgs.know-your-http-well
epkgs.languagetool
epkgs.lsp-mode
epkgs.lv
epkgs.magit
epkgs.makey

View File

@ -1,6 +1,26 @@
(use-package eglot
(use-package lsp-mode
:init
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
(setq lsp-keymap-prefix "C-c l")
:hook (
(python-mode . lsp)
(ansible . lsp)
;; if you want which-key integration
(lsp-mode . lsp-enable-which-key-integration))
:config
(add-to-list 'eglot-server-programs
'(yaml-mode . ("ansible-language-server" "--stdio")))
;; (add-hook 'yaml-mode-hook 'eglot-ensure)
(add-hook 'python-mode-hook #'eglot-ensure))
:commands lsp)
;; optionally
(use-package lsp-ui :commands lsp-ui-mode)
;; if you are ivy user
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol)
;; (use-package lsp-treemacs :commands lsp-treemacs-errors-list)
;; optionally if you want to use debugger
(use-package dap-mode)
;; (use-package dap-LANGUAGE) to load the dap adapter for your language
;; optional if you want which-key integration
(use-package which-key
:config
(which-key-mode))