Skip to content

Instantly share code, notes, and snippets.

@CGenie
Created January 20, 2020 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CGenie/bda6bbcd99cdbea53e28271e2610245e to your computer and use it in GitHub Desktop.
Save CGenie/bda6bbcd99cdbea53e28271e2610245e to your computer and use it in GitHub Desktop.
lsp purescript
(use-package! lsp-mode
:config
(progn
(defgroup lsp-purescript nil
"LSP support for PureScript, using purescript-language-server."
:group 'lsp-mode
:link '(url-link "https://github.com/nwolverson/purescript-language-server"))
(define-obsolete-variable-alias
'lsp-purescript-purescript-lang-server-command
'lsp-purescript-lang-server-command
"lsp-mode 6.1")
(defcustom lsp-purescript-lang-server-command
'("yarn" "run" "purescript-language-server" "--stdio" "--config" "~/purescript-lsp-config.json")
"Command to start purescript-language-server."
:group 'lsp-purescript
:type '(choice
(string :tag "Single string value")
(repeat :tag "List of string values"
string)))
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection
(lambda () lsp-purescript-lang-server-command))
:major-modes '(purescript-mode)
:priority -1
:server-id 'purescript-ls))
(add-hook 'purescript-mode-hook #'lsp)
(add-to-list 'lsp-language-id-configuration '(purescript-mode . "purescript"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment