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