mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
fix: bad rebase
This commit is contained in:
parent
99fd8c9eb6
commit
3766db3503
9 changed files with 49 additions and 35 deletions
|
@ -3,7 +3,9 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf nvim;
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.projects.project-nvim;
|
||||
in {
|
||||
|
@ -12,8 +14,8 @@ in {
|
|||
"project-nvim"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.project-nvim = nvim.dag.entryAnywhere ''
|
||||
require('project_nvim').setup(${nvim.lua.toLuaObject cfg.setupOpts})
|
||||
vim.luaConfigRC.project-nvim = entryAnywhere ''
|
||||
require('project_nvim').setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkRenamedOptionModule;
|
||||
inherit (lib.types) bool listOf str enum;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
imports = let
|
||||
renamedSetupOption = oldPath: newPath:
|
||||
|
@ -24,54 +27,54 @@ in {
|
|||
options.vim.projects.project-nvim = {
|
||||
enable = mkEnableOption "project-nvim for project management";
|
||||
|
||||
setupOpts = lib.nvim.types.mkPluginSetupOption "Project.nvim" {
|
||||
setupOpts = mkPluginSetupOption "Project.nvim" {
|
||||
manual_mode = mkOption {
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "don't automatically change the root directory so the user has the option to manually do so using `:ProjectRoot` command";
|
||||
};
|
||||
|
||||
# detection methods should accept one or more strings from a list
|
||||
detection_methods = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = listOf str;
|
||||
default = ["lsp" "pattern"];
|
||||
description = "Detection methods to use";
|
||||
};
|
||||
|
||||
# patterns
|
||||
patterns = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = listOf str;
|
||||
default = [".git" "_darcs" ".hg" ".bzr" ".svn" "Makefile" "package.json" "flake.nix" "cargo.toml"];
|
||||
description = "Patterns to use for pattern detection method";
|
||||
};
|
||||
|
||||
# table of lsp servers to ignore by name
|
||||
lsp_ignored = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "LSP servers no ignore by name";
|
||||
};
|
||||
|
||||
exclude_dirs = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Directories to exclude from project root search";
|
||||
};
|
||||
|
||||
show_hidden = mkOption {
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Show hidden files in telescope picker";
|
||||
};
|
||||
|
||||
silent_chdir = mkOption {
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Silently change directory when changing project";
|
||||
};
|
||||
|
||||
scope_chdir = mkOption {
|
||||
type = types.enum ["global" "tab" "win"];
|
||||
type = enum ["global" "tab" "win"];
|
||||
default = "global";
|
||||
description = "What scope to change the directory";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue