diff --git a/nvim/.config/nvim/lua/lsp.lua b/nvim/.config/nvim/lua/lsp.lua index 18ef6ec..4c10832 100644 --- a/nvim/.config/nvim/lua/lsp.lua +++ b/nvim/.config/nvim/lua/lsp.lua @@ -23,7 +23,7 @@ local on_attach = function(_, bufnr) vim.api.nvim_buf_set_keymap(bufnr, 'n', ']D', ':NextDiagnosticCycle', opts) end -local servers = { 'ghcide', 'purescriptls', 'rust_analyzer' } +local servers = { 'hls', 'purescriptls', 'rust_analyzer' } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach, diff --git a/nvim/.config/nvim/lua/nvim_lsp/hls.lua b/nvim/.config/nvim/lua/nvim_lsp/hls.lua new file mode 100644 index 0000000..f4a4f9a --- /dev/null +++ b/nvim/.config/nvim/lua/nvim_lsp/hls.lua @@ -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