mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-04 17:57:15 +00:00
Compare commits
No commits in common. "a3051d49aa5f32d9ceab672bad52d591b8a78a8e" and "1f8a44c4320f12c791d5eabaa3d55bff7e838ad0" have entirely different histories.
a3051d49aa
...
1f8a44c432
2 changed files with 33 additions and 39 deletions
|
|
@ -28,9 +28,18 @@ in {
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
function nvf_lint(buf)
|
||||
local ft = vim.api.nvim_get_option_value("filetype", { buf = buf })
|
||||
'';
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.enable && cfg.lint_after_save) {
|
||||
vim = {
|
||||
augroups = [{name = "nvf_nvim_lint";}];
|
||||
autocmds = [
|
||||
{
|
||||
event = ["BufWritePost"];
|
||||
callback = mkLuaInline ''
|
||||
function(args)
|
||||
local ft = vim.api.nvim_get_option_value("filetype", { buf = args.buf })
|
||||
local linters = require("lint").linters
|
||||
local linters_from_ft = require("lint").linters_by_ft[ft]
|
||||
|
||||
|
|
@ -64,19 +73,6 @@ in {
|
|||
end
|
||||
end
|
||||
'';
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.enable && cfg.lint_after_save) {
|
||||
vim = {
|
||||
augroups = [{name = "nvf_nvim_lint";}];
|
||||
autocmds = [
|
||||
{
|
||||
event = ["BufWritePost"];
|
||||
callback = mkLuaInline ''
|
||||
function(args)
|
||||
nvf_lint(args.buf)
|
||||
end
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -98,9 +98,7 @@ builtins.mapAttrs
|
|||
Channel = getZip;
|
||||
Tarball = getUrl;
|
||||
}
|
||||
.${
|
||||
spec.type
|
||||
}
|
||||
.${spec.type}
|
||||
or (builtins.throw "Unknown source type ${spec.type}");
|
||||
in
|
||||
spec // {outPath = mayOverride (func spec);}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue