mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 10:51:36 +00:00
Merge branch 'NotAShelf:main' into feat-ruff
This commit is contained in:
commit
7868198945
10 changed files with 74 additions and 5 deletions
|
@ -37,6 +37,12 @@ in {
|
|||
inherit (cfg) setupOpts;
|
||||
after = mkIf cfg.cmp.enable "require('copilot_cmp').setup()";
|
||||
|
||||
event = [
|
||||
{
|
||||
event = "User";
|
||||
pattern = "LazyFile";
|
||||
}
|
||||
];
|
||||
cmd = ["Copilot" "CopilotAuth" "CopilotDetach" "CopilotPanel" "CopilotStop"];
|
||||
keys = [
|
||||
(mkLuaKeymap ["n"] cfg.mappings.panel.accept (wrapPanelBinding ''require("copilot.panel").accept'' cfg.mappings.panel.accept) "[copilot] Accept suggestion" {})
|
||||
|
|
|
@ -13,7 +13,7 @@ in {
|
|||
vim = {
|
||||
startPlugins = ["nvim-lint"];
|
||||
pluginRC.nvim-lint = entryAnywhere ''
|
||||
require("lint").linters_by_ft(${toLuaObject cfg.linters_by_ft})
|
||||
require("lint").linters_by_ft = ${toLuaObject cfg.linters_by_ft}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -72,6 +72,16 @@
|
|||
ls_sources,
|
||||
null_ls.builtins.diagnostics.eslint_d.with({
|
||||
command = "${getExe pkg}",
|
||||
condition = function(utils)
|
||||
return utils.root_has_file({
|
||||
"eslint.config.js",
|
||||
"eslint.config.mjs",
|
||||
".eslintrc",
|
||||
".eslintrc.json",
|
||||
".eslintrc.js",
|
||||
".eslintrc.yml",
|
||||
})
|
||||
end,
|
||||
})
|
||||
)
|
||||
'';
|
||||
|
|
|
@ -72,6 +72,16 @@
|
|||
ls_sources,
|
||||
null_ls.builtins.diagnostics.eslint_d.with({
|
||||
command = "${getExe pkg}",
|
||||
condition = function(utils)
|
||||
return utils.root_has_file({
|
||||
"eslint.config.js",
|
||||
"eslint.config.mjs",
|
||||
".eslintrc",
|
||||
".eslintrc.json",
|
||||
".eslintrc.js",
|
||||
".eslintrc.yml",
|
||||
})
|
||||
end,
|
||||
})
|
||||
)
|
||||
'';
|
||||
|
|
|
@ -123,6 +123,16 @@
|
|||
ls_sources,
|
||||
null_ls.builtins.diagnostics.eslint_d.with({
|
||||
command = "${getExe pkg}",
|
||||
condition = function(utils)
|
||||
return utils.root_has_file({
|
||||
"eslint.config.js",
|
||||
"eslint.config.mjs",
|
||||
".eslintrc",
|
||||
".eslintrc.json",
|
||||
".eslintrc.js",
|
||||
".eslintrc.yml",
|
||||
})
|
||||
end,
|
||||
})
|
||||
)
|
||||
'';
|
||||
|
|
|
@ -134,6 +134,15 @@ in {
|
|||
startPlugins = ["lz-n" "lzn-auto-require"];
|
||||
|
||||
optPlugins = pluginPackages;
|
||||
augroups = [{name = "nvf_lazy_file_hooks";}];
|
||||
autocmds = [
|
||||
{
|
||||
event = ["BufReadPost" "BufNewFile" "BufWritePre"];
|
||||
group = "nvf_lazy_file_hooks";
|
||||
command = "doautocmd User LazyFile";
|
||||
once = true;
|
||||
}
|
||||
];
|
||||
|
||||
lazy.builtLazyConfig = ''
|
||||
require('lz.n').load(${toLuaObject lznSpecs})
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
};
|
||||
|
||||
event = mkOption {
|
||||
type = nullOr (oneOf [str (listOf str) lznEvent]);
|
||||
type = nullOr (oneOf [str lznEvent (listOf (either str lznEvent))]);
|
||||
default = null;
|
||||
description = "Lazy-load on event";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue