nvim: lua: Switch to haskell-language-server for Haskell

This is not available in upstream nvim_lsp repository but works with a
simple lua config addition for the same.

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2020-06-05 19:42:33 +05:30
parent 00cefaa665
commit 690a1bdae8
2 changed files with 13 additions and 1 deletions

View file

@ -23,7 +23,7 @@ local on_attach = function(_, bufnr)
vim.api.nvim_buf_set_keymap(bufnr, 'n', ']D', ':NextDiagnosticCycle<CR>', opts) vim.api.nvim_buf_set_keymap(bufnr, 'n', ']D', ':NextDiagnosticCycle<CR>', opts)
end end
local servers = { 'ghcide', 'purescriptls', 'rust_analyzer' } local servers = { 'hls', 'purescriptls', 'rust_analyzer' }
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
nvim_lsp[lsp].setup { nvim_lsp[lsp].setup {
on_attach = on_attach, on_attach = on_attach,

View file

@ -0,0 +1,12 @@
local configs = require 'nvim_lsp/configs'
local util = require 'nvim_lsp/util'
configs.hls = {
default_config = {
cmd = { "haskell-language-server-wrapper", "--lsp" };
filetypes = { "haskell" };
root_dir = util.root_pattern("stack.yaml", "package.yaml", ".git");
};
};
-- vim:et ts=2 sw=2