diff options
author | Cody Hiar <cody@hiar.ca> | 2021-09-04 12:48:03 -0600 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2021-09-04 12:48:03 -0600 |
commit | 84eab813d56e35d3626ff14da85af502b835e975 (patch) | |
tree | 3c067290c76409c61b2d24685c707b0f87575180 /lua/nvimlintconf.lua | |
parent | 6c1793d98f244f0b6fc1b9eb163647dc9032f358 (diff) |
move everything into 1 file
Diffstat (limited to 'lua/nvimlintconf.lua')
-rw-r--r-- | lua/nvimlintconf.lua | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/lua/nvimlintconf.lua b/lua/nvimlintconf.lua deleted file mode 100644 index 026ebe1..0000000 --- a/lua/nvimlintconf.lua +++ /dev/null @@ -1,34 +0,0 @@ -local null_ls = require("null-ls") -local helpers = require("null-ls.helpers") - -local blacklint = { - method = null_ls.methods.DIAGNOSTICS, - filetypes = { "python" }, - -- null_ls.generator creates an async source - -- that spawns the command with the given arguments and options - generator = null_ls.generator({ - command = "black", - args = { "--stdin" }, - to_stdin = true, - from_stderr = true, - -- choose an output format (raw, json, or line) - format = "line", - check_exit_code = function(code) - return code <= 1 - end, - -- use helpers to parse the output from string matchers, - -- or parse it manually with a function - on_output = helpers.diagnostics.from_patterns({ - { - pattern = [[:(%d+):(%d+) [%w-/]+ (.*)]], - groups = { "row", "col", "message" }, - }, - { - pattern = [[:(%d+) [%w-/]+ (.*)]], - groups = { "row", "message" }, - }, - }), - }), -} - -null_ls.register(blacklint) |