mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 23:17:35 +00:00
Switch text editing from ALE to null-ls
This commit is contained in:
parent
e77a79e662
commit
6475f422ac
@ -9,7 +9,7 @@ vim.g.ale_linters = {
|
|||||||
lua = {},
|
lua = {},
|
||||||
-- sh = {'language_server', 'shell', 'shellcheck'},
|
-- sh = {'language_server', 'shell', 'shellcheck'},
|
||||||
sh = {},
|
sh = {},
|
||||||
text = { "proselint", "alex" },
|
text = {},
|
||||||
}
|
}
|
||||||
vim.g.ale_linter_aliases = {
|
vim.g.ale_linter_aliases = {
|
||||||
markdown = { "text" },
|
markdown = { "text" },
|
||||||
|
@ -189,6 +189,29 @@ end
|
|||||||
|
|
||||||
function M.config_null_ls()
|
function M.config_null_ls()
|
||||||
utils.try_require("null-ls", function(null_ls)
|
utils.try_require("null-ls", function(null_ls)
|
||||||
|
local helpers = require("null-ls.helpers")
|
||||||
|
local alex_lint = {
|
||||||
|
name = "alex",
|
||||||
|
method = null_ls.methods.DIAGNOSTICS,
|
||||||
|
filetypes = { "markdown" },
|
||||||
|
generator = null_ls.generator({
|
||||||
|
command = "alex",
|
||||||
|
args = { "--stdin", "--quiet" },
|
||||||
|
to_stdin = true,
|
||||||
|
from_stderr = true,
|
||||||
|
format = "line",
|
||||||
|
check_exit_code = function(code)
|
||||||
|
return code <= 1
|
||||||
|
end,
|
||||||
|
on_output = helpers.diagnostics.from_patterns({
|
||||||
|
{
|
||||||
|
pattern = [[ *(%d+):(%d+)-(%d+):(%d+) *(%w+) *(.+) +[%w]+ +([-%l]+)]],
|
||||||
|
groups = { "row", "col", "end_row", "end_col", "severity", "message", "code" },
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
|
||||||
local sources = {
|
local sources = {
|
||||||
-- Generic
|
-- Generic
|
||||||
-- null_ls.builtins.formatting.preittier,
|
-- null_ls.builtins.formatting.preittier,
|
||||||
@ -203,7 +226,10 @@ function M.config_null_ls()
|
|||||||
-- Go
|
-- Go
|
||||||
null_ls.builtins.diagnostics.golangci_lint,
|
null_ls.builtins.diagnostics.golangci_lint,
|
||||||
-- Text
|
-- Text
|
||||||
-- null_ls.builtins.code_actions.proselint,
|
null_ls.builtins.diagnostics.proselint,
|
||||||
|
-- null_ls.builtins.diagnostics.write_good,
|
||||||
|
null_ls.builtins.code_actions.proselint,
|
||||||
|
alex_lint,
|
||||||
-- Ansible
|
-- Ansible
|
||||||
-- null_ls.builtins.diagnostics.ansiblelint,
|
-- null_ls.builtins.diagnostics.ansiblelint,
|
||||||
-- Shell
|
-- Shell
|
||||||
|
Loading…
Reference in New Issue
Block a user