Skip to content

Instantly share code, notes, and snippets.

@shapr
Created October 27, 2021 22:59
Show Gist options
  • Select an option

  • Save shapr/393c96db4aac56135f2297dc344a3bdb to your computer and use it in GitHub Desktop.

Select an option

Save shapr/393c96db4aac56135f2297dc344a3bdb to your computer and use it in GitHub Desktop.
;;lsp-doctor suggestions https://emacs-lsp.github.io/lsp-mode/page/performance/
(setq gc-cons-threshold 100000000)
(setq read-process-output-max (* 1024 1024)) ;; 1mb
(setq lsp-idle-delay 0.500)
(use-package lsp-treemacs
:ensure t)
(use-package lsp-mode
:ensure t
:hook ((rust-mode . lsp)
(haskell-mode . lsp)
(js-mode . lsp))
:commands lsp-ui-mode
:config
(when (boundp 'cb/enterprise-github)
(setq lsp-clients-go-imports-local-prefix cb/enterprise-github)
)
)
(use-package lsp-ui
:ensure t
:after (lsp-mode)
:hook ((lsp-mode . lsp-ui-mode)
(lsp-mode . flycheck-mode))
:config
(setq lsp-prefer-flymake nil)
)
(use-package haskell-mode
:ensure t
:init
(progn
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(add-hook 'haskell-mode-hook 'pragmatapro-lig-mode)
(add-hook 'haskell-mode-hook #'company-mode)
(setq haskell-process-args-cabal-new-repl
'("--ghc-options=-ferror-spans -fshow-loaded-modules"))
(setq haskell-process-type 'cabal-new-repl)
(setq haskell-stylish-on-save 't)
(setq haskell-mode-stylish-haskell-path "ormolu")
(setq haskell-tags-on-save 't)
))
(require 'lsp)
(use-package lsp-haskell
:ensure t
:config
(setq lsp-haskell-process-path-hie "haskell-language-server-wrapper")
)
(add-hook 'haskell-mode-hook #'lsp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment