comments(nvim): add tsserver variable annotation
This commit is contained in:
1 parent
3f062011c5
commit
3be72c24bc
7 files changed
+134
-78
No files matched your search
@@ -49,14 +49,38 @@ return {
|
||||
"cssmodules-language-server",
|
||||
"css-lsp",
|
||||
"htmlhint",
|
||||
"stylelint",
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
opts = function(_, opts)
|
||||
opts.linters_by_ft.html = opts.linters_by_ft.html or {}
|
||||
table.insert(opts.linters_by_ft.html, "htmlhint")
|
||||
local stylelint = "stylelint"
|
||||
|
||||
local function add_linters(tbl)
|
||||
for ft, linters in pairs(tbl) do
|
||||
if opts.linters_by_ft[ft] == nil then
|
||||
opts.linters_by_ft[ft] = linters
|
||||
else
|
||||
vim.list_extend(opts.linters_by_ft[ft], linters)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
add_linters({
|
||||
["html"] = { "htmlhint" },
|
||||
["css"] = { stylelint },
|
||||
["scss"] = { stylelint },
|
||||
["less"] = { stylelint },
|
||||
["sugarss"] = { stylelint },
|
||||
["vue"] = { stylelint },
|
||||
["wxss"] = { stylelint },
|
||||
["javascript"] = { stylelint },
|
||||
["javascriptreact"] = { stylelint },
|
||||
["typescript"] = { stylelint },
|
||||
["typescriptreact"] = { stylelint },
|
||||
})
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user