mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 13:45:58 +01:00
fix: bad rebase
This commit is contained in:
parent
99fd8c9eb6
commit
3766db3503
9 changed files with 49 additions and 35 deletions
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkRenamedOptionModule;
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.types) nullOr str enum float;
|
inherit (lib.types) nullOr str enum float;
|
||||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkEnableOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
in {
|
in {
|
||||||
options.vim.lsp = {
|
options.vim.lsp = {
|
||||||
lspSignature = {
|
lspSignature = {
|
||||||
enable = mkEnableOption "lsp signature viewer";
|
enable = mkEnableOption "lsp signature viewer";
|
||||||
setupOpts = lib.nvim.types.mkPluginSetupOption "lsp-signature" {};
|
setupOpts = mkPluginSetupOption "lsp-signature" {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
inherit (lib) types mkRenamedOptionModule;
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
inherit (lib.types) enum int;
|
||||||
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
in {
|
in {
|
||||||
imports = let
|
imports = let
|
||||||
renamedSetupOption = oldPath: newPath:
|
renamedSetupOption = oldPath: newPath:
|
||||||
|
@ -18,9 +20,9 @@ in {
|
||||||
options.vim.lsp.nvim-docs-view = {
|
options.vim.lsp.nvim-docs-view = {
|
||||||
enable = mkEnableOption "nvim-docs-view, for displaying lsp hover documentation in a side panel.";
|
enable = mkEnableOption "nvim-docs-view, for displaying lsp hover documentation in a side panel.";
|
||||||
|
|
||||||
setupOpts = lib.nvim.types.mkPluginSetupOption "nvim-docs-view" {
|
setupOpts = mkPluginSetupOption "nvim-docs-view" {
|
||||||
position = mkOption {
|
position = mkOption {
|
||||||
type = types.enum ["left" "right" "top" "bottom"];
|
type = enum ["left" "right" "top" "bottom"];
|
||||||
default = "right";
|
default = "right";
|
||||||
description = ''
|
description = ''
|
||||||
Where to open the docs view panel
|
Where to open the docs view panel
|
||||||
|
@ -28,7 +30,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
height = mkOption {
|
height = mkOption {
|
||||||
type = types.int;
|
type = int;
|
||||||
default = 10;
|
default = 10;
|
||||||
description = ''
|
description = ''
|
||||||
Height of the docs view panel if the position is set to either top or bottom
|
Height of the docs view panel if the position is set to either top or bottom
|
||||||
|
@ -36,7 +38,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
width = mkOption {
|
width = mkOption {
|
||||||
type = types.int;
|
type = int;
|
||||||
default = 60;
|
default = 60;
|
||||||
description = ''
|
description = ''
|
||||||
Width of the docs view panel if the position is set to either left or right
|
Width of the docs view panel if the position is set to either left or right
|
||||||
|
@ -44,7 +46,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
update_mode = mkOption {
|
update_mode = mkOption {
|
||||||
type = types.enum ["auto" "manual"];
|
type = enum ["auto" "manual"];
|
||||||
default = "auto";
|
default = "auto";
|
||||||
description = ''
|
description = ''
|
||||||
Determines the mechanism used to update the docs view panel content.
|
Determines the mechanism used to update the docs view panel content.
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) bool str nullOr;
|
||||||
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
in {
|
in {
|
||||||
imports = let
|
imports = let
|
||||||
renamedSetupOption = oldPath: newPath:
|
renamedSetupOption = oldPath: newPath:
|
||||||
|
@ -20,21 +23,21 @@ in {
|
||||||
obsidian = {
|
obsidian = {
|
||||||
enable = mkEnableOption "complementary neovim plugins for Obsidian editor";
|
enable = mkEnableOption "complementary neovim plugins for Obsidian editor";
|
||||||
|
|
||||||
setupOpts = lib.nvim.types.mkPluginSetupOption "Obsidian.nvim" {
|
setupOpts = mkPluginSetupOption "Obsidian.nvim" {
|
||||||
dir = mkOption {
|
dir = mkOption {
|
||||||
type = types.str;
|
type = str;
|
||||||
default = "~/my-vault";
|
default = "~/my-vault";
|
||||||
description = "Obsidian vault directory";
|
description = "Obsidian vault directory";
|
||||||
};
|
};
|
||||||
|
|
||||||
daily_notes = {
|
daily_notes = {
|
||||||
folder = mkOption {
|
folder = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Directory in which daily notes should be created";
|
description = "Directory in which daily notes should be created";
|
||||||
};
|
};
|
||||||
date_format = mkOption {
|
date_format = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Date format used for creating daily notes";
|
description = "Date format used for creating daily notes";
|
||||||
};
|
};
|
||||||
|
@ -43,7 +46,7 @@ in {
|
||||||
completion = {
|
completion = {
|
||||||
nvim_cmp = mkOption {
|
nvim_cmp = mkOption {
|
||||||
# if using nvim-cmp, otherwise set to false
|
# if using nvim-cmp, otherwise set to false
|
||||||
type = types.bool;
|
type = bool;
|
||||||
description = "If using nvim-cmp, otherwise set to false";
|
description = "If using nvim-cmp, otherwise set to false";
|
||||||
default = config.vim.autocomplete.type == "nvim-cmp";
|
default = config.vim.autocomplete.type == "nvim-cmp";
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkMerge mkIf;
|
inherit (lib.modules) mkMerge mkIf;
|
||||||
inherit (lib.nvim.binds) mkBinding;
|
inherit (lib.nvim.binds) mkBinding;
|
||||||
inherit (lib.nvim.lua) toLuaObject;
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,11 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule;
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
|
inherit (lib.types) str listOf;
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
in {
|
in {
|
||||||
imports = let
|
imports = let
|
||||||
renamedSetupOption = oldPath: newPath:
|
renamedSetupOption = oldPath: newPath:
|
||||||
|
@ -19,10 +22,10 @@ in {
|
||||||
options.vim.notes.todo-comments = {
|
options.vim.notes.todo-comments = {
|
||||||
enable = mkEnableOption "todo-comments: highlight and search for todo comments like TODO, HACK, BUG in your code base";
|
enable = mkEnableOption "todo-comments: highlight and search for todo comments like TODO, HACK, BUG in your code base";
|
||||||
|
|
||||||
setupOpts = lib.nvim.types.mkPluginSetupOption "todo-comments.nvim" {
|
setupOpts = mkPluginSetupOption "todo-comments.nvim" {
|
||||||
highlight = {
|
highlight = {
|
||||||
pattern = mkOption {
|
pattern = mkOption {
|
||||||
type = types.str;
|
type = str;
|
||||||
default = ''.*<(KEYWORDS)(\([^\)]*\))?:'';
|
default = ''.*<(KEYWORDS)(\([^\)]*\))?:'';
|
||||||
description = "vim regex pattern used for highlighting comments";
|
description = "vim regex pattern used for highlighting comments";
|
||||||
};
|
};
|
||||||
|
@ -30,19 +33,19 @@ in {
|
||||||
|
|
||||||
search = {
|
search = {
|
||||||
pattern = mkOption {
|
pattern = mkOption {
|
||||||
type = types.str;
|
type = str;
|
||||||
default = ''\b(KEYWORDS)(\([^\)]*\))?:'';
|
default = ''\b(KEYWORDS)(\([^\)]*\))?:'';
|
||||||
description = "ripgrep regex pattern used for searching comments";
|
description = "ripgrep regex pattern used for searching comments";
|
||||||
};
|
};
|
||||||
|
|
||||||
command = mkOption {
|
command = mkOption {
|
||||||
type = types.str;
|
type = str;
|
||||||
default = "${pkgs.ripgrep}/bin/rg";
|
default = "${pkgs.ripgrep}/bin/rg";
|
||||||
description = "search command";
|
description = "search command";
|
||||||
};
|
};
|
||||||
|
|
||||||
args = mkOption {
|
args = mkOption {
|
||||||
type = types.listOf types.str;
|
type = listOf str;
|
||||||
default = ["--color=never" "--no-heading" "--with-filename" "--line-number" "--column"];
|
default = ["--color=never" "--no-heading" "--with-filename" "--line-number" "--column"];
|
||||||
description = "arguments to pass to the search command";
|
description = "arguments to pass to the search command";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: 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;
|
cfg = config.vim.projects.project-nvim;
|
||||||
in {
|
in {
|
||||||
|
@ -12,8 +14,8 @@ in {
|
||||||
"project-nvim"
|
"project-nvim"
|
||||||
];
|
];
|
||||||
|
|
||||||
vim.luaConfigRC.project-nvim = nvim.dag.entryAnywhere ''
|
vim.luaConfigRC.project-nvim = entryAnywhere ''
|
||||||
require('project_nvim').setup(${nvim.lua.toLuaObject cfg.setupOpts})
|
require('project_nvim').setup(${toLuaObject cfg.setupOpts})
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: 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 {
|
in {
|
||||||
imports = let
|
imports = let
|
||||||
renamedSetupOption = oldPath: newPath:
|
renamedSetupOption = oldPath: newPath:
|
||||||
|
@ -24,54 +27,54 @@ in {
|
||||||
options.vim.projects.project-nvim = {
|
options.vim.projects.project-nvim = {
|
||||||
enable = mkEnableOption "project-nvim for project management";
|
enable = mkEnableOption "project-nvim for project management";
|
||||||
|
|
||||||
setupOpts = lib.nvim.types.mkPluginSetupOption "Project.nvim" {
|
setupOpts = mkPluginSetupOption "Project.nvim" {
|
||||||
manual_mode = mkOption {
|
manual_mode = mkOption {
|
||||||
type = types.bool;
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "don't automatically change the root directory so the user has the option to manually do so using `:ProjectRoot` command";
|
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 should accept one or more strings from a list
|
||||||
detection_methods = mkOption {
|
detection_methods = mkOption {
|
||||||
type = types.listOf types.str;
|
type = listOf str;
|
||||||
default = ["lsp" "pattern"];
|
default = ["lsp" "pattern"];
|
||||||
description = "Detection methods to use";
|
description = "Detection methods to use";
|
||||||
};
|
};
|
||||||
|
|
||||||
# patterns
|
# patterns
|
||||||
patterns = mkOption {
|
patterns = mkOption {
|
||||||
type = types.listOf types.str;
|
type = listOf str;
|
||||||
default = [".git" "_darcs" ".hg" ".bzr" ".svn" "Makefile" "package.json" "flake.nix" "cargo.toml"];
|
default = [".git" "_darcs" ".hg" ".bzr" ".svn" "Makefile" "package.json" "flake.nix" "cargo.toml"];
|
||||||
description = "Patterns to use for pattern detection method";
|
description = "Patterns to use for pattern detection method";
|
||||||
};
|
};
|
||||||
|
|
||||||
# table of lsp servers to ignore by name
|
# table of lsp servers to ignore by name
|
||||||
lsp_ignored = mkOption {
|
lsp_ignored = mkOption {
|
||||||
type = types.listOf types.str;
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "LSP servers no ignore by name";
|
description = "LSP servers no ignore by name";
|
||||||
};
|
};
|
||||||
|
|
||||||
exclude_dirs = mkOption {
|
exclude_dirs = mkOption {
|
||||||
type = types.listOf types.str;
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Directories to exclude from project root search";
|
description = "Directories to exclude from project root search";
|
||||||
};
|
};
|
||||||
|
|
||||||
show_hidden = mkOption {
|
show_hidden = mkOption {
|
||||||
type = types.bool;
|
type = bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Show hidden files in telescope picker";
|
description = "Show hidden files in telescope picker";
|
||||||
};
|
};
|
||||||
|
|
||||||
silent_chdir = mkOption {
|
silent_chdir = mkOption {
|
||||||
type = types.bool;
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Silently change directory when changing project";
|
description = "Silently change directory when changing project";
|
||||||
};
|
};
|
||||||
|
|
||||||
scope_chdir = mkOption {
|
scope_chdir = mkOption {
|
||||||
type = types.enum ["global" "tab" "win"];
|
type = enum ["global" "tab" "win"];
|
||||||
default = "global";
|
default = "global";
|
||||||
description = "What scope to change the directory";
|
description = "What scope to change the directory";
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
inherit (lib.options) mkOption mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
inherit (lib.types) nullOr str enum bool package either int;
|
inherit (lib.types) nullOr str enum bool package either int;
|
||||||
inherit (lib) mkRenamedOptionModule;
|
inherit (lib.modules) mkRenamedOptionModule;
|
||||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Reference in a new issue