refactor(lsp): let lsp-mode load lsp client packages
Most of these lsp packages are already in `lsp-client-packages`, which lsp-mode will eagerly load the first time `lsp-mode` is activated, so we don't need to do it ourselves, except in cases where the package isn't in `lsp-client-packages` (like lsp-julia).
This commit is contained in:
parent
374c28cedd
commit
005831bfcc
6 changed files with 9 additions and 10 deletions
|
@ -191,9 +191,6 @@ This is ignored by ccls.")
|
|||
(add-to-list 'projectile-globally-ignored-directories "^.ccls-cache$")
|
||||
(add-to-list 'projectile-project-root-files-bottom-up ".ccls-root")
|
||||
(add-to-list 'projectile-project-root-files-top-down-recurring "compile_commands.json"))
|
||||
;; Avoid using `:after' because it ties the :config below to when `lsp-mode'
|
||||
;; loads, rather than `ccls' loads.
|
||||
(after! lsp-mode (require 'ccls))
|
||||
:config
|
||||
(set-evil-initial-state! 'ccls-tree-mode 'emacs)
|
||||
(set-lsp-priority! 'ccls -2) ; Prioritize clangd over ccls
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
:init
|
||||
(add-hook 'haskell-mode-local-vars-hook #'lsp! 'append)
|
||||
(add-hook 'haskell-literate-mode-local-vars-hook #'lsp! 'append)
|
||||
(after! lsp-mode (require 'lsp-haskell))
|
||||
:config
|
||||
;; Does some strange indentation if it pastes in the snippet
|
||||
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;;###if (and (modulep! +lsp) (not (modulep! :tools lsp +eglot)))
|
||||
|
||||
(use-package! lsp-java
|
||||
:after lsp-mode
|
||||
:defer t
|
||||
:preface
|
||||
(setq lsp-java-workspace-dir (concat doom-data-dir "java-workspace"))
|
||||
(add-hook 'java-mode-local-vars-hook #'lsp! 'append)
|
||||
|
|
|
@ -76,8 +76,10 @@
|
|||
(use-package! lsp-julia
|
||||
:when (modulep! +lsp)
|
||||
:unless (modulep! :tools lsp +eglot)
|
||||
:after lsp-mode
|
||||
:preface (setq lsp-julia-default-environment nil)
|
||||
:defer t
|
||||
:preface
|
||||
(after! lsp-mode (add-to-list 'lsp-client-packages 'lsp-julia))
|
||||
(setq lsp-julia-default-environment nil)
|
||||
:init
|
||||
;; If no environment is set, then auto-detect one in ~/.julia/environments/,
|
||||
;; falling back to `lsp-julia-default-environment's default.
|
||||
|
|
|
@ -353,7 +353,7 @@
|
|||
:when (modulep! +lsp)
|
||||
:when (modulep! +pyright)
|
||||
:when (not (modulep! :tools lsp +eglot))
|
||||
:after lsp-mode
|
||||
:defer t
|
||||
:init
|
||||
(when-let ((exe (executable-find "basedpyright")))
|
||||
(setq lsp-pyright-langserver-command exe)))
|
||||
|
|
|
@ -26,8 +26,9 @@
|
|||
|
||||
|
||||
(use-package! lsp-sourcekit
|
||||
:when (and (modulep! +lsp) (not (modulep! :tools lsp +eglot)))
|
||||
:after swift-mode
|
||||
:when (modulep! +lsp)
|
||||
:when (not (modulep! :tools lsp +eglot))
|
||||
:defer t
|
||||
:init (add-hook 'swift-mode-local-vars-hook #'lsp! 'append)
|
||||
:config
|
||||
(set-formatter! 'swiftformat '("swiftformat" "--output" "stdout"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue