null-ls is back!! and ocaml

This commit is contained in:
2024-12-01 15:10:20 +00:00
parent 156cba158a
commit 03b4b2bb31
2 changed files with 31 additions and 0 deletions

View File

@ -54,6 +54,17 @@ vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")
-- LSP Ignore error
for _, method in ipairs({ "textDocument/diagnostic", "workspace/diagnostic" }) do
local default_diagnostic_handler = vim.lsp.handlers[method]
vim.lsp.handlers[method] = function(err, result, context, config)
if err ~= nil and err.code == -32802 then
return
end
return default_diagnostic_handler(err, result, context, config)
end
end
-- Mappings
-- Save --

View File

@ -1,4 +1,20 @@
return {
{
"nvimtools/none-ls.nvim",
config = function()
local null_ls = require("null-ls")
local formatting = null_ls.builtins.formatting
local sources = {
formatting.ocamlformat,
}
null_ls.setup({
sources = sources,
})
end,
},
{ "akinsho/toggleterm.nvim", version = "*", config = true },
{
"christoomey/vim-tmux-navigator",
@ -157,6 +173,10 @@ return {
lsp.rust_analyzer.setup({
capabilities = capabilities,
diagnostic = {
-- Prevents the annoying popup for cancalled requests
refreshSupport = false,
},
})
lsp.gopls.setup({