things
This commit is contained in:
parent
4d07e39eee
commit
8d0e09607a
5 changed files with 25 additions and 13 deletions
|
@ -14,7 +14,7 @@ local function lsp_clients()
|
|||
end
|
||||
|
||||
local function langs()
|
||||
local langs = {}
|
||||
local l = {}
|
||||
for _, client in pairs(vim.lsp.buf_get_clients(0)) do
|
||||
local out = nil
|
||||
if client.name == "pyright" then
|
||||
|
@ -23,12 +23,12 @@ local function langs()
|
|||
out = "node " .. vim.fn.system({ "node", "--version" })
|
||||
end
|
||||
if out ~= nil and out ~= "" then
|
||||
langs[#langs + 1] = vim.trim(out)
|
||||
l[#l + 1] = vim.trim(out)
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(langs)
|
||||
return table.concat(langs, " • "), " "
|
||||
table.sort(l)
|
||||
return table.concat(l, " • "), " "
|
||||
end
|
||||
|
||||
return {
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -53,13 +53,6 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
severity = {
|
||||
min = vim.diagnostic.severity.ERROR,
|
||||
max = vim.diagnostic.severity.ERROR,
|
||||
}
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
git_ignored = false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue