mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim: move hls to lsp.haskell module
This commit is contained in:
parent
9c817814f2
commit
f1cd9b036f
4 changed files with 52 additions and 41 deletions
|
|
@ -187,47 +187,6 @@ vim.api.nvim_create_autocmd("FileType", {
|
|||
group = nvim_metals_group,
|
||||
})
|
||||
|
||||
-- Haskell
|
||||
vim.g.haskell_tools = {
|
||||
tools = {
|
||||
log = { level = vim.log.levels.OFF },
|
||||
hover = {
|
||||
border = border,
|
||||
stylize_markdown = true,
|
||||
},
|
||||
},
|
||||
hls = {
|
||||
on_attach = function(client, bufnr)
|
||||
local ht = require("haskell-tools")
|
||||
local opts = { buffer = bufnr }
|
||||
|
||||
map("n", "<leader>hhe", ht.lsp.buf_eval_all, opts)
|
||||
map("n", "<leader>hhs", ht.hoogle.hoogle_signature, opts)
|
||||
map("n", "<leader>hhr", ht.repl.toggle, opts)
|
||||
|
||||
vim.opt_local.shiftwidth = 2
|
||||
mylsp.on_attach(client, bufnr)
|
||||
end,
|
||||
default_settings = {
|
||||
haskell = {
|
||||
checkProject = false, -- PERF: don't check the entire project on initial load
|
||||
formattingProvider = "fourmolu",
|
||||
plugin = {
|
||||
rename = {
|
||||
config = {
|
||||
diff = true, -- (experimental) rename across modules
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
settings = function(project_root)
|
||||
local ht = require("haskell-tools")
|
||||
return ht.lsp.load_hls_settings(project_root, { settings_file_pattern = "hls.json" })
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
----------
|
||||
-- Rust --
|
||||
----------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue