Add haskell language server

pull/2/head
Ensar Sarajčić 2021-10-16 17:49:21 +02:00
parent 59092e12a2
commit 63e4ff19d4
2 changed files with 24 additions and 0 deletions

View File

@ -34,4 +34,20 @@ case $SERVER in
mkdir -p $HOME/lsp/dotnet/omnisharp mkdir -p $HOME/lsp/dotnet/omnisharp
tar -xf /tmp/omnisharp.tar.gz -C $HOME/lsp/dotnet/omnisharp tar -xf /tmp/omnisharp.tar.gz -C $HOME/lsp/dotnet/omnisharp
;; ;;
hls)
if [ -z "$VERSION" ]; then
VERSION="1.4.0"
fi
case $UNAME in
Linux)
FILE_NAME="haskell-language-server-Linux-${VERSION}.tar.gz"
;;
Darwin)
FILE_NAME="haskell-language-server-macOS-${VERSION}.tar.gz"
;;
esac
wget -O - https://github.com/haskell/haskell-language-server/releases/download/$VERSION/$FILE_NAME > /tmp/hls.tar.gz
mkdir -p $HOME/lsp/haskell/hls
tar -xf /tmp/hls.tar.gz -C $HOME/lsp/haskell/hls
;;
esac esac

View File

@ -42,6 +42,14 @@ lspconfig.omnisharp.setup {
capabilities = capabilities capabilities = capabilities
} }
-- Haskell LS
local hls_bin = vim.fn.glob('$HOME') .. "/lsp/haskell/hls/haskell-language-server-wrapper"
lspconfig.hls.setup {
cmd = { hls_bin, "--lsp" };
on_attach = common_config.on_attach;
capabilities = capabilities
}
-- Leminx (XML Language server) -- Leminx (XML Language server)
lspconfig.lemminx.setup { lspconfig.lemminx.setup {
cmd = { "lemminx" }; cmd = { "lemminx" };