1
Fork 0

Set up haskell-tools.nvim

This commit is contained in:
Matei Adriel 2023-09-22 21:08:11 +03:00
commit 346d1b78d9
No known key found for this signature in database
10 changed files with 128 additions and 95 deletions
dotfiles/neovim/lua/my/plugins

View file

@ -0,0 +1,24 @@
local lspconfig = require("my.plugins.lspconfig")
local M = {
"mrcjkb/haskell-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
},
version = "^2",
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
}
function M.config()
vim.g.haskell_tools = {
hls = {
on_attach = lspconfig.on_attach,
},
tools = {
hover = {
enable = false,
},
},
}
end
return M

View file

@ -97,8 +97,10 @@ end
-- {{{ General server config
---@type lspconfig.options
---@diagnostic disable-next-line: missing-fields
local servers = {
-- {{{ Typescript
---@diagnostic disable-next-line: missing-fields
tsserver = {
on_attach = function(client, bufnr)
-- We handle formatting using null-ls and prettierd
@ -110,6 +112,7 @@ local servers = {
-- {{{ Purescript
purescriptls = {
settings = {
---@diagnostic disable-next-line: missing-fields
purescript = {
censorWarnings = { "UnusedName", "ShadowedName", "UserDefinedWarning" },
formatter = "purs-tidy",
@ -117,16 +120,6 @@ local servers = {
},
},
-- }}}
-- {{{ Haskell
hls = {
settings = {
haskell = {
-- set formatter
formattingProvider = "fourmolu",
},
},
},
-- }}}
-- {{{ Lua
lua_ls = {
cmd = {
@ -134,6 +127,7 @@ local servers = {
"--logpath=/home/adrielus/.local/share/lua-language-server/log",
},
settings = {
---@diagnostic disable-next-line: missing-fields
Lua = {
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
@ -174,10 +168,13 @@ local servers = {
nil_ls = {},
nixd = {},
-- }}}
---@diagnostic disable-next-line: missing-fields
cssls = {},
---@diagnostic disable-next-line: missing-fields
jsonls = {},
dhall_lsp_server = {},
typst_lsp = {},
---@diagnostic disable-next-line: missing-fields
elmls = {},
-- {{{ Inactive
-- pylsp = {},

View file

@ -2,7 +2,7 @@ local env = require("my.helpers.env")
local M = {
"L3MON4D3/LuaSnip", -- snippeting engine
cond = env.vscode.not_active()
cond = env.vscode.not_active(),
}
local function reload()