-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a generic makeprg/errorformat
compiler
linter
- Loading branch information
1 parent
1dd697a
commit 24926d7
Showing
4 changed files
with
117 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
local api = vim.api | ||
|
||
|
||
return function() | ||
local errorformat = api.nvim_buf_get_option(0, 'errorformat') | ||
local makeprg = api.nvim_buf_get_option(0, 'makeprg') | ||
local bufname = api.nvim_buf_get_name(0) | ||
local args = { | ||
api.nvim_get_option('shellcmdflag'), | ||
makeprg:gsub(' %%', ' ' .. bufname), | ||
} | ||
return { | ||
cmd = vim.opt.shell:get(), | ||
args = args, | ||
stdin = false, | ||
append_fname = false, | ||
stream = 'stderr', | ||
ignore_exitcode = true, | ||
parser = require('lint.parser').from_errorformat(errorformat) | ||
} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters