nvim: after/ftplugin/haskell: Lint on save

Now that we use static-ls as Haskell LSP which does not
have hlint support for diagnostics yet, lint on save to
get hlint diagnostics.
This commit is contained in:
Sanchayan Maity 2024-11-30 18:18:28 +05:30
parent bd98551ec9
commit cdde7294ff
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -4,3 +4,10 @@ local hls_config = lsp_utils.hls_config()
vim.lsp.start(hls_config) vim.lsp.start(hls_config)
vim.bo.makeprg = 'cabal build --write-ghc-environment-files=always all' vim.bo.makeprg = 'cabal build --write-ghc-environment-files=always all'
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
buffer = 0,
callback = function()
require("lint").try_lint()
end,
})