mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Add lvim config and nvim
This commit is contained in:
parent
0b1ace53f2
commit
d1af9278c5
19 changed files with 303 additions and 26 deletions
24
config/lvim/ftplugin/javascript.lua
Normal file
24
config/lvim/ftplugin/javascript.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
lvim.lang.javascript.formatters = {
|
||||
-- { exe = "eslint_d" },
|
||||
{ exe = "prettierd" },
|
||||
}
|
||||
|
||||
lvim.lang.javascript.linters = {
|
||||
{ exe = "eslint_d" },
|
||||
}
|
||||
|
||||
lvim.lang.javascript.lsp.setup.handlers = {
|
||||
["textDocument/publishDiagnostics"] = function(_, _, p, client_id, _, config)
|
||||
if p.diagnostics ~= nil then
|
||||
local i = 1
|
||||
while i <= #p.diagnostics do
|
||||
if p.diagnostics[i].code == 80001 then
|
||||
table.remove(p.diagnostics, i)
|
||||
else
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.lsp.diagnostic.on_publish_diagnostics(_, _, p, client_id, _, config)
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue