aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2022-07-22 08:51:20 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-07-22 08:51:20 +0100
commita3a82e146799bf6810ff5e09aa8518accfd2b81d (patch)
tree1c7cf29d3a3d3e04fbcd75c0995371140863247f
parentd5f07cc4a55e29626bbbda8bc9153f78cd34de5a (diff)
downloaddotnvim-a3a82e146799bf6810ff5e09aa8518accfd2b81d.tar.gz
dotnvim-a3a82e146799bf6810ff5e09aa8518accfd2b81d.zip
Back to haskell, see how it goes
Autoformat may or may not be a good idea.
-rw-r--r--haskell.vim5
-rw-r--r--lsp.lua3
-rw-r--r--plugins.vim3
3 files changed, 11 insertions, 0 deletions
diff --git a/haskell.vim b/haskell.vim
new file mode 100644
index 0000000..b61a36e
--- /dev/null
+++ b/haskell.vim
@@ -0,0 +1,5 @@
+" haskell LSP settings
+"
+autocmd FileType haskell setlocal omnifunc=v:lua.vim.lsp.omnifunc
+autocmd BufWritePre *.hs :lua vim.lsp.buf.formatting_seq_sync()
+
diff --git a/lsp.lua b/lsp.lua
index d48ba65..33a5b2b 100644
--- a/lsp.lua
+++ b/lsp.lua
@@ -56,6 +56,9 @@ local servers = {
staticcheck = true,
},
},
+ hls = {
+ hls = {},
+ },
}
for lsp, settings in pairs(servers) do
require('lspconfig')[lsp].setup {
diff --git a/plugins.vim b/plugins.vim
index 5c7035b..0cae193 100644
--- a/plugins.vim
+++ b/plugins.vim
@@ -78,6 +78,9 @@ source ~/.config/nvim/treesitter.lua
" scala and metals
source ~/.config/nvim/metals.vim
+" haskell
+source ~/.config/nvim/haskell.vim
+
" auto-complete
source ~/.config/nvim/cmp.lua