Set up haskell-tools.nvim
This commit is contained in:
parent
c8d7224dc9
commit
346d1b78d9
10 changed files with 128 additions and 95 deletions
dotfiles/neovim/lua/my/plugins
24
dotfiles/neovim/lua/my/plugins/haskell-tools.lua
Normal file
24
dotfiles/neovim/lua/my/plugins/haskell-tools.lua
Normal 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
|
|
@ -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 = {},
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue