This commit is contained in:
RingOfStorms (Joshua Bell) 2023-12-27 23:36:25 -06:00
parent 4d07e39eee
commit 8d0e09607a
5 changed files with 25 additions and 13 deletions

View file

@ -85,7 +85,6 @@ return {
null_ls.builtins.diagnostics.cspell.with({
extra_args = { "--config", "~/.config/nvim/cspell.json" },
diagnostics_postprocess = function(diagnostic)
-- vim.notify(vim.inspect(diagnostic))
diagnostic.message = diagnostic.user_data.misspelled
diagnostic.severity = vim.diagnostic.severity.HINT
end,
@ -98,6 +97,17 @@ return {
config.update_in_insert = true
config.debug = true
-- Don't run this on these buffer types
local ignored_filetypes = { "NvimTree", "terminal" }
config.on_attach = function(client, bufnr)
local ft = vim.api.nvim_buf_get_option(bufnr, "filetype")
if U.table_contains(ignored_filetypes, ft) then
if client.resolved_capabilities ~= nil and next(client.resolved_capabilities) ~= nil then
client.resolved_capabilities.code_action = false
end
end
end
return config
end,
},