From a06dbef4b6563cc0ae47eec8b89c5f4f9e492b4f Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Sat, 18 Apr 2020 17:44:24 +0900 Subject: [PATCH] Add purescript-language-server --- README.org | 1 + lsp-clients.el | 32 ++++++++++++++++++++++++++++++++ lsp-mode.el | 1 + 3 files changed, 34 insertions(+) diff --git a/README.org b/README.org index 7018558eca..7bdc876e16 100644 --- a/README.org +++ b/README.org @@ -277,6 +277,7 @@ | PHP(recommended) | [[https://github.com/bmewburn/vscode-intelephense][intelephense]] | Yes | npm i intelephense -g | Yes | | PHP | [[https://github.com/felixfbecker/php-language-server][php-language-server]] | Yes | [[https://github.com/felixfbecker/php-language-server][php-language-server]] | Yes | | Powershell | [[https://github.com/PowerShell/PowerShellEditorServices][PowerShellEditorServices]] | Yes | Automatic | Yes | + | PureScript | [[https://github.com/nwolverson/purescript-language-server][purescript-language-server]] | Yes | npm i purescript-language-server | No | | Python | [[https://github.com/palantir/python-language-server][pyls]] | Yes | pip install 'python-language-server[all]' | Yes | | Python(Microsoft) | [[https://github.com/Microsoft/python-language-server][Microsoft Python Language Server]] | [[https://github.com/emacs-lsp/lsp-python-ms][lsp-python-ms]] | [[https://github.com/emacs-lsp/lsp-python-ms][lsp-python-ms]] | Yes | | R | [[https://github.com/REditorSupport/languageserver][languageserver]] | Yes | install.packages("languageserver") | No | diff --git a/lsp-clients.el b/lsp-clients.el index fcbe8fc4ae..bef1cd6a79 100644 --- a/lsp-clients.el +++ b/lsp-clients.el @@ -830,6 +830,38 @@ responsiveness at the cost of possible stability issues." :priority -1 :server-id 'cmakels)) +;; PureScript +(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")) + +(defcustom lsp-purescript-server-executable + "purescript-language-server" + "Arguments to pass to the server." + :type 'string + :risky t + :group 'lsp-purescript) + +(defcustom lsp-purescript-server-args + '("--stdio") + "Arguments to pass to the server." + :type '(repeat string) + :risky t + :group 'lsp-purescript) + +(defun lsp-purescript--server-command () + "Generate LSP startup command for purescript-language-server." + (cons lsp-purescript-server-executable + lsp-purescript-server-args)) + +(lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection + #'lsp-purescript--server-command) + :major-modes '(purescript-mode) + :priority -1 + :server-id 'pursls)) + ;;; Rf (defgroup lsp-rf nil "Settings for Robot Framework Language Server." diff --git a/lsp-mode.el b/lsp-mode.el index 92c9043f5c..dd76c69695 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -671,6 +671,7 @@ Changes take effect only when a new session is started." (nim-mode . "nim") (dhall-mode . "dhall") (cmake-mode . "cmake") + (purescript-mode . "purescript") (gdscript-mode . "gdscript") (perl-mode . "perl") (robot-mode . "robot"))