diff options
| author | Arnaud Bailly <arnaud.oqube@gmail.com> | 2021-02-02 09:42:24 +0000 |
|---|---|---|
| committer | Arnaud Bailly <arnaud.oqube@gmail.com> | 2021-02-02 09:42:24 +0000 |
| commit | 701cf605ff9a10d665eddbf826216a71681326f7 (patch) | |
| tree | 0d672fda58f90195c8e663154efbc68592a2c89b | |
| parent | 0ac0470525216b21564c1ff31d79357734b977b2 (diff) | |
| download | dotfiles-701cf605ff9a10d665eddbf826216a71681326f7.tar.gz | |
improve configuration of lsp-mode for haskell
seems like 'lsp' is not the right package to use, switched to lsp-mode and
use deferred to give time to nix-shell to do its magic
| -rw-r--r-- | .emacs | 13 | ||||
| -rw-r--r-- | install.el | 3 |
2 files changed, 11 insertions, 5 deletions
@@ -315,13 +315,18 @@ :after (haskell-mode yasnippet) :defer) -(use-package lsp - :ensure t) +(use-package lsp-mode + :ensure t + ;; we need to defer running lsp because in case there's a direnv + ;; with use nix, it takes some time to load and lsp won't find the + ;; language server until the env is setup properly + :hook ((haskell-mode . lsp-deferred)) + :commands (lsp lsp-deferred)) + (use-package lsp-haskell :ensure t) -(add-hook 'haskell-mode-hook #'lsp-mode) -(setq lsp-log-io 't) +(setq lsp-log-io 't) ;; optionally ;; (use-package lsp-ui :commands lsp-ui-mode) @@ -34,4 +34,5 @@ elm-mode terraform-mode nix-mode - nix-sandbox)) + nix-sandbox + lsp-ui)) |
