mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-01 03:22:39 +00:00
Compare commits
6 commits
16d396f039
...
22fb0d22cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
22fb0d22cc |
|||
|
b4dac8d635 |
|||
|
fa52e006eb |
|||
|
085df81edf |
|||
|
|
514ed8bdd4 |
||
|
8a148ad71e |
8 changed files with 135 additions and 66 deletions
|
|
@ -35,6 +35,7 @@
|
|||
[yanky.nvim]: https://github.com/gbprod/yanky.nvim
|
||||
[yazi.nvim]: https://github.com/mikavilpas/yazi.nvim
|
||||
[snacks.nvim]: https://github.com/folke/snacks.nvim
|
||||
[colorful-menu.nvim]: https://github.com/xzbdmw/colorful-menu.nvim
|
||||
[oil.nvim]: https://github.com/stevearc/oil.nvim
|
||||
[hunk.nvim]: https://github.com/julienvincent/hunk.nvim
|
||||
[undotree]: https://github.com/mbbill/undotree
|
||||
|
|
@ -95,9 +96,10 @@
|
|||
|
||||
- Lazyload Lspsaga and remove default keybindings for it.
|
||||
|
||||
- Add [colorful-menu.nvim] to enhance the completion menus, with optional
|
||||
integration for blink-cmp and nvim-cmp
|
||||
- Add [oil.nvim] as an alternative file explorer. It will be available under
|
||||
`vim.utility.oil-nvim`.
|
||||
|
||||
- Add `vim.diagnostics` to interact with Neovim's diagnostics module. Available
|
||||
options for `vim.diagnostic.config()` can now be customized through the
|
||||
[](#opt-vim.diagnostics.config) in nvf.
|
||||
|
|
|
|||
|
|
@ -3,46 +3,47 @@
|
|||
inherit (lib.types) listOf attrs bool enum str oneOf int;
|
||||
in {
|
||||
options.vim.dashboard.startify = {
|
||||
enable = mkEnableOption "dashboard via vim-startify";
|
||||
enable = mkEnableOption "fancy start screen for Vim [vim-startify]";
|
||||
|
||||
bookmarks = mkOption {
|
||||
default = [];
|
||||
description = ''List of book marks to disaply on start page'';
|
||||
type = listOf attrs;
|
||||
default = [];
|
||||
example = {"c" = "~/.vimrc";};
|
||||
description = "List of book marks to display on start page";
|
||||
};
|
||||
|
||||
changeToDir = mkOption {
|
||||
default = true;
|
||||
description = "Should vim change to the directory of the file you open";
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Whether Vim should change to the directory of the file you open";
|
||||
};
|
||||
|
||||
changeToVCRoot = mkOption {
|
||||
default = false;
|
||||
description = "Should vim change to the version control root when opening a file";
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Whether Vim should change to the version control root when opening a file";
|
||||
};
|
||||
|
||||
changeDirCmd = mkOption {
|
||||
default = "lcd";
|
||||
description = "Command to change the current window with. Can be cd, lcd or tcd";
|
||||
type = enum ["cd" "lcd" "tcd"];
|
||||
default = "lcd";
|
||||
description = "Command to change the current window with.";
|
||||
};
|
||||
|
||||
customHeader = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Text to place in the header";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
customFooter = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Text to place in the footer";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
lists = mkOption {
|
||||
type = listOf attrs;
|
||||
default = [
|
||||
{
|
||||
type = "files";
|
||||
|
|
@ -66,121 +67,136 @@ in {
|
|||
}
|
||||
];
|
||||
description = "Specify the lists and in what order they are displayed on startify.";
|
||||
type = listOf attrs;
|
||||
};
|
||||
|
||||
skipList = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "List of regex patterns to exclude from MRU lists";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
updateOldFiles = mkOption {
|
||||
type = bool;
|
||||
|
||||
default = false;
|
||||
description = "Set if you want startify to always update and not just when neovim closes";
|
||||
type = bool;
|
||||
};
|
||||
|
||||
sessionAutoload = mkOption {
|
||||
default = false;
|
||||
description = "Make startify auto load Session.vim files from the current directory";
|
||||
type = bool;
|
||||
|
||||
default = false;
|
||||
description = "Make vim-startify auto load Session.vim files from the current directory";
|
||||
};
|
||||
|
||||
commands = mkOption {
|
||||
type = listOf (oneOf [str attrs (listOf str)]);
|
||||
default = [];
|
||||
description = "Commands that are presented to the user on startify page";
|
||||
type = listOf (oneOf [str attrs (listOf str)]);
|
||||
};
|
||||
|
||||
filesNumber = mkOption {
|
||||
type = int;
|
||||
default = 10;
|
||||
description = "How many files to list";
|
||||
type = int;
|
||||
};
|
||||
|
||||
customIndices = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Specify a list of default characters to use instead of numbers";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
disableOnStartup = mkOption {
|
||||
default = false;
|
||||
description = "Prevent startify from opening on startup but can be called with :Startify";
|
||||
type = bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether vim-startify should be disabled on startup.
|
||||
|
||||
This will prevent startify from opening on startup, but it can still
|
||||
be called with `:Startify`
|
||||
'';
|
||||
};
|
||||
|
||||
unsafe = mkOption {
|
||||
default = false;
|
||||
description = "Turns on unsafe mode for Startify. Stops resolving links, checking files are readable and filtering bookmark list";
|
||||
type = bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to turn on unsafe mode for Startify.
|
||||
|
||||
While enabld, vim-startify will stops resolving links, checking files
|
||||
are readable and filtering bookmark list
|
||||
'';
|
||||
};
|
||||
|
||||
paddingLeft = mkOption {
|
||||
type = int;
|
||||
default = 3;
|
||||
description = "Number of spaces used for left padding.";
|
||||
type = int;
|
||||
};
|
||||
|
||||
useEnv = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Show environment variables in path if name is shorter than value";
|
||||
type = bool;
|
||||
};
|
||||
|
||||
sessionBeforeSave = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Commands to run before saving a session";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
sessionPersistence = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Persist session before leaving vim or switching session";
|
||||
type = bool;
|
||||
};
|
||||
|
||||
sessionDeleteBuffers = mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Delete all buffers when loading or closing a session";
|
||||
type = bool;
|
||||
};
|
||||
|
||||
sessionDir = mkOption {
|
||||
type = str;
|
||||
default = "~/.vim/session";
|
||||
description = "Directory to save and load sessions from";
|
||||
type = str;
|
||||
};
|
||||
|
||||
skipListServer = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "List of vim servers to not load startify for";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
sessionRemoveLines = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "Patterns to remove from session files";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
sessionSavevars = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "List of variables to save into a session file.";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
sessionSavecmds = mkOption {
|
||||
type = listOf str;
|
||||
default = [];
|
||||
description = "List of commands to run when loading a session.";
|
||||
type = listOf str;
|
||||
};
|
||||
|
||||
sessionSort = mkOption {
|
||||
default = false;
|
||||
description = "Set if you want items sorted by date rather than alphabetically";
|
||||
type = bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = ''
|
||||
While true, sessions will be sorted by date rather than alphabetically.
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.ui.colorful-menu-nvim = {
|
||||
enable = mkEnableOption "treesitter highlighted completion menus [colorful-menu.nvim]";
|
||||
setupOpts = mkPluginSetupOption "colorful-menu-nvim" {};
|
||||
};
|
||||
}
|
||||
20
modules/plugins/ui/colorful-menu-nvim/config.nix
Normal file
20
modules/plugins/ui/colorful-menu-nvim/config.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.ui.colorful-menu-nvim;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim = {
|
||||
startPlugins = ["colorful-menu-nvim"];
|
||||
pluginRC.colorful-menu-nvim = entryAnywhere ''
|
||||
require("colorful-menu").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/plugins/ui/colorful-menu-nvim/default.nix
Normal file
6
modules/plugins/ui/colorful-menu-nvim/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./config.nix
|
||||
./colorful-menu-nvim.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -1,14 +1,15 @@
|
|||
{
|
||||
imports = [
|
||||
./noice
|
||||
./modes
|
||||
./nvim-ufo
|
||||
./notifications
|
||||
./smartcolumn
|
||||
./colorizer
|
||||
./illuminate
|
||||
./breadcrumbs
|
||||
./borders
|
||||
./breadcrumbs
|
||||
./colorful-menu-nvim
|
||||
./colorizer
|
||||
./fastaction
|
||||
./illuminate
|
||||
./modes
|
||||
./noice
|
||||
./notifications
|
||||
./nvim-ufo
|
||||
./smartcolumn
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,32 +33,33 @@ in {
|
|||
default = [];
|
||||
example = literalExpression ''
|
||||
[
|
||||
# absolute path, as a string - impure
|
||||
# Absolute path, as a string. This is the impure option.
|
||||
"$HOME/.config/nvim-extra"
|
||||
|
||||
# relative path, as a path - pure
|
||||
# Relative path inside your configuration. If your config
|
||||
# is version controlled, then this is pure and reproducible.
|
||||
./nvim
|
||||
|
||||
# source type path - pure and reproducible
|
||||
(builtins.source {
|
||||
path = ./runtime;
|
||||
name = "nvim-runtime";
|
||||
# Source type path. This pure and reproducible.
|
||||
# See `:doc builtins.path` inside a Nix repl for more options.
|
||||
(builtins.path {
|
||||
path = ./runtime; # this must be a relative path
|
||||
name = "nvim-runtime"; # name is arbitrary
|
||||
})
|
||||
]
|
||||
'';
|
||||
|
||||
description = ''
|
||||
Additional runtime paths that will be appended to the
|
||||
active runtimepath of the Neovim. This can be used to
|
||||
add additional lookup paths for configs, plugins, spell
|
||||
languages and other things you would generally place in
|
||||
your {file}`$HOME/.config/nvim`.
|
||||
Additional runtime paths that will be appended to the active
|
||||
runtimepath of the Neovim. This can be used to add additional
|
||||
lookup paths for configs, plugins, spell languages and other
|
||||
things you would generally place in your {file}`$HOME/.config/nvim`.
|
||||
|
||||
This is meant as a declarative alternative to throwing
|
||||
files into {file}`~/.config/nvim` and having the Neovim
|
||||
wrapper pick them up. For more details on
|
||||
`vim.o.runtimepath`, and what paths to use; please see
|
||||
[the official documentation](https://neovim.io/doc/user/options.html#'runtimepath')
|
||||
This is meant as a declarative alternative to throwing files into
|
||||
{file}`~/.config/nvim` and having the Neovim wrapper pick them up.
|
||||
|
||||
For more details on `vim.o.runtimepath`, and what paths to use, please see
|
||||
[the official documentation](https://neovim.io/doc/user/options.html#'runtimepath').
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
@ -67,13 +68,13 @@ in {
|
|||
default = [];
|
||||
example = literalExpression ''
|
||||
[
|
||||
# absolute path, as a string - impure
|
||||
# Absolute path, as a string - impure
|
||||
"$HOME/.config/nvim/my-lua-file.lua"
|
||||
|
||||
# relative path, as a path - pure
|
||||
# Relative path, as a path - pure
|
||||
./nvim/my-lua-file.lua
|
||||
|
||||
# source type path - pure and reproducible
|
||||
# Source type path - pure and reproducible
|
||||
(builtins.path {
|
||||
path = ./nvim/my-lua-file.lua;
|
||||
name = "my-lua-file";
|
||||
|
|
@ -82,9 +83,10 @@ in {
|
|||
'';
|
||||
|
||||
description = ''
|
||||
Additional lua files that will be sourced by Neovim.
|
||||
Takes both absolute and relative paths, all of which
|
||||
will be called via the `luafile` command in Neovim.
|
||||
Additional Lua files that will be sourced by Neovim.
|
||||
|
||||
Takes both absolute and relative paths, all of which will be called
|
||||
via the `luafile` command in Neovim.
|
||||
|
||||
See [lua-commands](https://neovim.io/doc/user/lua.html#lua-commands)
|
||||
on the Neovim documentation for more details.
|
||||
|
|
|
|||
|
|
@ -286,6 +286,19 @@
|
|||
"url": "https://github.com/gorbit99/codewindow.nvim/archive/a8e175043ce3baaa89e0a6b5171bcd920aab3dad.tar.gz",
|
||||
"hash": "12nsdynpym15fl9qwjzlzhxr2mbpa0l6sp2r1rrc300jr59q0gkr"
|
||||
},
|
||||
"colorful-menu-nvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
"type": "GitHub",
|
||||
"owner": "xzbdmw",
|
||||
"repo": "colorful-menu.nvim"
|
||||
},
|
||||
"branch": "master",
|
||||
"submodules": false,
|
||||
"revision": "f80feb8a6706f965321aff24d0ed3849f02a7f77",
|
||||
"url": "https://github.com/xzbdmw/colorful-menu.nvim/archive/f80feb8a6706f965321aff24d0ed3849f02a7f77.tar.gz",
|
||||
"hash": "1rj6yy7gchdyynhd13l35vhmn8npldmgn4vam9gv244mywpz3flw"
|
||||
},
|
||||
"comment-nvim": {
|
||||
"type": "Git",
|
||||
"repository": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue