null-ls is back!! and ocaml
This commit is contained in:
@ -54,6 +54,17 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
|
|
||||||
require("lazy").setup("plugins")
|
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
|
-- Mappings
|
||||||
|
|
||||||
-- Save --
|
-- Save --
|
||||||
|
@ -1,4 +1,20 @@
|
|||||||
return {
|
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 },
|
{ "akinsho/toggleterm.nvim", version = "*", config = true },
|
||||||
{
|
{
|
||||||
"christoomey/vim-tmux-navigator",
|
"christoomey/vim-tmux-navigator",
|
||||||
@ -157,6 +173,10 @@ return {
|
|||||||
|
|
||||||
lsp.rust_analyzer.setup({
|
lsp.rust_analyzer.setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
|
diagnostic = {
|
||||||
|
-- Prevents the annoying popup for cancalled requests
|
||||||
|
refreshSupport = false,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
lsp.gopls.setup({
|
lsp.gopls.setup({
|
||||||
|
Reference in New Issue
Block a user