Massive Updates
This commit is contained in:
1 parent
28d3a2c1d2
commit
e19a04e930
29 files changed
+462
-193
No files matched your search
@@ -9,8 +9,24 @@ return {
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
opts = function(_, opts)
|
||||
opts.linters_by_ft.go = opts.linters_by_ft.go or {}
|
||||
table.insert(opts.linters_by_ft.go, "golangcilint")
|
||||
--- Extend the conform plugin config and add given formatters
|
||||
---@param tbl table<string, conform.FormatterUnit[]> Table of filetype to formatters mappings
|
||||
local function add_formatters(tbl)
|
||||
for ft, formatters in pairs(tbl) do
|
||||
if opts.formatters_by_ft[ft] == nil then
|
||||
opts.formatters_by_ft[ft] = formatters
|
||||
else
|
||||
vim.list_extend(opts.formatters_by_ft[ft], formatters)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
add_formatters({
|
||||
["go"] = { "golangcilint" },
|
||||
["gomod"] = { "golangcilint" },
|
||||
["gowork"] = { "golangcilint" },
|
||||
})
|
||||
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user