mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 05:19:48 +01:00
Merge pull request #255 from horriblename/unfuck-fuckups
Fix rebase mistakes
This commit is contained in:
commit
79e1691120
9 changed files with 49 additions and 35 deletions
|
@ -4,7 +4,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkRenamedOptionModule;
|
||||
inherit (lib.modules) mkRenamedOptionModule;
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) nullOr str enum float;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lspSignature = {
|
||||
enable = mkEnableOption "lsp signature viewer";
|
||||
setupOpts = lib.nvim.types.mkPluginSetupOption "lsp-signature" {};
|
||||
setupOpts = mkPluginSetupOption "lsp-signature" {};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
inherit (lib) types mkRenamedOptionModule;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.types) enum int;
|
||||
inherit (lib.modules) mkRenamedOptionModule;
|
||||
in {
|
||||
imports = let
|
||||
renamedSetupOption = oldPath: newPath:
|
||||
|
@ -18,9 +20,9 @@ in {
|
|||
options.vim.lsp.nvim-docs-view = {
|
||||
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 {
|
||||
type = types.enum ["left" "right" "top" "bottom"];
|
||||
type = enum ["left" "right" "top" "bottom"];
|
||||
default = "right";
|
||||
description = ''
|
||||
Where to open the docs view panel
|
||||
|
@ -28,7 +30,7 @@ in {
|
|||
};
|
||||
|
||||
height = mkOption {
|
||||
type = types.int;
|
||||
type = int;
|
||||
default = 10;
|
||||
description = ''
|
||||
Height of the docs view panel if the position is set to either top or bottom
|
||||
|
@ -36,7 +38,7 @@ in {
|
|||
};
|
||||
|
||||
width = mkOption {
|
||||
type = types.int;
|
||||
type = int;
|
||||
default = 60;
|
||||
description = ''
|
||||
Width of the docs view panel if the position is set to either left or right
|
||||
|
@ -44,7 +46,7 @@ in {
|
|||
};
|
||||
|
||||
update_mode = mkOption {
|
||||
type = types.enum ["auto" "manual"];
|
||||
type = enum ["auto" "manual"];
|
||||
default = "auto";
|
||||
description = ''
|
||||
Determines the mechanism used to update the docs view panel content.
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
lib,
|
||||
...
|
||||
}: 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 {
|
||||
imports = let
|
||||
renamedSetupOption = oldPath: newPath:
|
||||
|
@ -20,21 +23,21 @@ in {
|
|||
obsidian = {
|
||||
enable = mkEnableOption "complementary neovim plugins for Obsidian editor";
|
||||
|
||||
setupOpts = lib.nvim.types.mkPluginSetupOption "Obsidian.nvim" {
|
||||
setupOpts = mkPluginSetupOption "Obsidian.nvim" {
|
||||
dir = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = "~/my-vault";
|
||||
description = "Obsidian vault directory";
|
||||
};
|
||||
|
||||
daily_notes = {
|
||||
folder = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Directory in which daily notes should be created";
|
||||
};
|
||||
date_format = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "Date format used for creating daily notes";
|
||||
};
|
||||
|
@ -43,7 +46,7 @@ in {
|
|||
completion = {
|
||||
nvim_cmp = mkOption {
|
||||
# if using nvim-cmp, otherwise set to false
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
description = "If using nvim-cmp, otherwise set to false";
|
||||
default = config.vim.autocomplete.type == "nvim-cmp";
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkMerge mkIf;
|
||||
inherit (lib.modules) mkMerge mkIf;
|
||||
inherit (lib.nvim.binds) mkBinding;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
|
|
|
@ -3,8 +3,11 @@
|
|||
lib,
|
||||
...
|
||||
}: 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.types) mkPluginSetupOption;
|
||||
in {
|
||||
imports = let
|
||||
renamedSetupOption = oldPath: newPath:
|
||||
|
@ -19,10 +22,10 @@ in {
|
|||
options.vim.notes.todo-comments = {
|
||||
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 = {
|
||||
pattern = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = ''.*<(KEYWORDS)(\([^\)]*\))?:'';
|
||||
description = "vim regex pattern used for highlighting comments";
|
||||
};
|
||||
|
@ -30,19 +33,19 @@ in {
|
|||
|
||||
search = {
|
||||
pattern = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = ''\b(KEYWORDS)(\([^\)]*\))?:'';
|
||||
description = "ripgrep regex pattern used for searching comments";
|
||||
};
|
||||
|
||||
command = mkOption {
|
||||
type = types.str;
|
||||
type = str;
|
||||
default = "${pkgs.ripgrep}/bin/rg";
|
||||
description = "search command";
|
||||
};
|
||||
|
||||
args = mkOption {
|
||||
type = types.listOf types.str;
|
||||
type = listOf str;
|
||||
default = ["--color=never" "--no-heading" "--with-filename" "--line-number" "--column"];
|
||||
description = "arguments to pass to the search command";
|
||||
};
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.nvim.binds) mkMappingOption;
|
||||
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.generators) mkLuaInline;
|
||||
in {
|
||||
|
|
Loading…
Reference in a new issue