style: apply formatting
This commit is contained in:
+18
-6
@@ -246,10 +246,17 @@ function Linter.validate(config)
|
||||
vim.validate("config", config, "table")
|
||||
vim.validate("cmd", config.cmd, list_of("string"), "list of strings")
|
||||
vim.validate(
|
||||
"events", config.events, list_of("string"), true, "list of strings"
|
||||
"events",
|
||||
config.events,
|
||||
list_of("string"),
|
||||
true,
|
||||
"list of strings"
|
||||
)
|
||||
vim.validate(
|
||||
"clear_events", config.clear_events, list_of("string"), true,
|
||||
"clear_events",
|
||||
config.clear_events,
|
||||
list_of("string"),
|
||||
true,
|
||||
"list of strings"
|
||||
)
|
||||
vim.validate("stdin", config.stdin, "boolean", true)
|
||||
@@ -257,12 +264,15 @@ function Linter.validate(config)
|
||||
vim.validate("stderr", config.stderr, "boolean", true)
|
||||
vim.validate("pattern", config.pattern, "string", true)
|
||||
vim.validate(
|
||||
"groups", config.groups, list_of("string"), true, "list of strings"
|
||||
"groups",
|
||||
config.groups,
|
||||
list_of("string"),
|
||||
true,
|
||||
"list of strings"
|
||||
)
|
||||
vim.validate("severity_map", config.severity_map, function(t)
|
||||
return util.is_map(t, "string", "number")
|
||||
end, true, "map of string to number"
|
||||
)
|
||||
end, true, "map of string to number")
|
||||
vim.validate("debounce", config.debounce, "number", true)
|
||||
vim.validate("source", config.source, "string", true)
|
||||
vim.validate("json", config.json, "table", true)
|
||||
@@ -430,7 +440,9 @@ function Linter.add(bufnr, config)
|
||||
end, config.debounce)
|
||||
vim.api.nvim_create_autocmd(config.events, {
|
||||
buffer = linter.bufnr,
|
||||
callback = function() debouncer:call() end,
|
||||
callback = function()
|
||||
debouncer:call()
|
||||
end,
|
||||
group = linter.augroup,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user