mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-05 18:20:29 -08:00
fix(haskell): lsp activation w/ treesit & eglot
Fixed an issue where eglot wouldn't activate if lsp-haskell was disabled or the user had +tree-sitter enabled. Fix: #8528
This commit is contained in:
parent
f727456a27
commit
15db7620e4
1 changed files with 7 additions and 4 deletions
|
|
@ -28,6 +28,10 @@
|
|||
#'haskell-collapse-mode ; support folding haskell code blocks
|
||||
#'interactive-haskell-mode)
|
||||
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'haskell-mode-local-vars-hook #'lsp! 'append)
|
||||
(add-hook 'haskell-literate-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
(add-to-list 'completion-ignored-extensions ".hi")
|
||||
|
||||
(map! :map haskell-mode-map
|
||||
|
|
@ -52,15 +56,14 @@
|
|||
'((haskell :url "https://github.com/tree-sitter/tree-sitter-haskell")))
|
||||
:config
|
||||
(set-repl-handler! 'haskell-ts-mode #'run-haskell :persist t)
|
||||
(set-eglot-client! 'haskell-ts-mode '("haskell-language-server-wrapper" "--lsp")))
|
||||
(set-eglot-client! 'haskell-ts-mode '("haskell-language-server-wrapper" "--lsp"))
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'haskell-ts-mode-local-vars-hook #'lsp! 'append)))
|
||||
|
||||
|
||||
(use-package! lsp-haskell
|
||||
:when (modulep! +lsp)
|
||||
:defer t
|
||||
:init
|
||||
(add-hook 'haskell-mode-local-vars-hook #'lsp! 'append)
|
||||
(add-hook 'haskell-literate-mode-local-vars-hook #'lsp! 'append)
|
||||
:config
|
||||
;; Does some strange indentation if it pastes in the snippet
|
||||
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue