mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 07:25:30 +00:00
Merge branch 'main' into feature-language-tex
This commit is contained in:
commit
d7a11ad990
16 changed files with 662 additions and 462 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
[typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim
|
[typst-preview.nvim]: https://github.com/chomosuke/typst-preview.nvim
|
||||||
[render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim
|
[render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim
|
||||||
[yanky.nvim]: https://github.com/gbprod/yanky.nvim
|
[yanky.nvim]: https://github.com/gbprod/yanky.nvim
|
||||||
|
[yazi.nvim]: https://github.com/mikavilpas/yazi.nvim
|
||||||
|
|
||||||
- Add [typst-preview.nvim] under
|
- Add [typst-preview.nvim] under
|
||||||
`languages.typst.extensions.typst-preview-nvim`.
|
`languages.typst.extensions.typst-preview-nvim`.
|
||||||
|
|
@ -46,6 +47,11 @@
|
||||||
|
|
||||||
- Add [yanky.nvim] to available plugins, under `vim.utility.yanky-nvim`.
|
- Add [yanky.nvim] to available plugins, under `vim.utility.yanky-nvim`.
|
||||||
|
|
||||||
|
- Fix plugin `setupOpts` for yanky.nvim and assert if shada is configured as a
|
||||||
|
backend while shada is disabled in Neovim options.
|
||||||
|
|
||||||
|
- Add [yazi.nvim] as a companion plugin for Yazi, the terminal file manager.
|
||||||
|
|
||||||
[amadaluzia](https://github.com/amadaluzia):
|
[amadaluzia](https://github.com/amadaluzia):
|
||||||
|
|
||||||
[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim
|
[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim
|
||||||
|
|
@ -154,7 +160,6 @@
|
||||||
Inspiration from `vim.languages.clang.dap` implementation.
|
Inspiration from `vim.languages.clang.dap` implementation.
|
||||||
- Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`.
|
- Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`.
|
||||||
|
|
||||||
|
|
||||||
[nezia1](https://github.com/nezia1)
|
[nezia1](https://github.com/nezia1)
|
||||||
|
|
||||||
- Add support for [nixd](https://github.com/nix-community/nixd) language server.
|
- Add support for [nixd](https://github.com/nix-community/nixd) language server.
|
||||||
|
|
@ -165,10 +170,12 @@
|
||||||
available plugins, under `vim.utility.multicursors`.
|
available plugins, under `vim.utility.multicursors`.
|
||||||
- Add [hydra.nvim](https://github.com/nvimtools/hydra.nvim) as dependency for
|
- Add [hydra.nvim](https://github.com/nvimtools/hydra.nvim) as dependency for
|
||||||
`multicursors.nvim` and lazy loads by default.
|
`multicursors.nvim` and lazy loads by default.
|
||||||
[folospior](https://github.com/folospior)
|
[folospior](https://github.com/folospior)
|
||||||
|
|
||||||
- Fix plugin name for lsp/lspkind.
|
- Fix plugin name for lsp/lspkind.
|
||||||
|
|
||||||
|
- Move `vim-illuminate` to `setupOpts format`
|
||||||
|
|
||||||
[iynaix](https://github.com/iynaix)
|
[iynaix](https://github.com/iynaix)
|
||||||
|
|
||||||
- Add lsp options support for [nixd](https://github.com/nix-community/nixd)
|
- Add lsp options support for [nixd](https://github.com/nix-community/nixd)
|
||||||
|
|
@ -180,5 +187,16 @@
|
||||||
|
|
||||||
[Libadoxon](https://github.com/Libadoxon)
|
[Libadoxon](https://github.com/Libadoxon)
|
||||||
|
|
||||||
- Add [git-conflict](https://github.com/akinsho/git-conflict.nvim) plugin for resolving git conflicts
|
- Add [git-conflict](https://github.com/akinsho/git-conflict.nvim) plugin for
|
||||||
- Add formatters for go: [gofmt](https://go.dev/blog/gofmt), [golines](https://github.com/segmentio/golines) and [gofumpt](https://github.com/mvdan/gofumpt)
|
resolving git conflicts
|
||||||
|
- Add formatters for go: [gofmt](https://go.dev/blog/gofmt),
|
||||||
|
[golines](https://github.com/segmentio/golines) and
|
||||||
|
[gofumpt](https://github.com/mvdan/gofumpt)
|
||||||
|
|
||||||
|
[MaxMur](https://github.com/TheMaxMur)
|
||||||
|
|
||||||
|
- Add YAML support under `vim.languages.yaml`.
|
||||||
|
|
||||||
|
[alfarel](https://github.com/alfarelcynthesis):
|
||||||
|
|
||||||
|
- Add missing `yazi.nvim` dependency (`snacks.nvim`).
|
||||||
|
|
|
||||||
26
flake.lock
generated
26
flake.lock
generated
|
|
@ -5,11 +5,11 @@
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733312601,
|
"lastModified": 1738453229,
|
||||||
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
|
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
|
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -38,11 +38,11 @@
|
||||||
},
|
},
|
||||||
"mnw": {
|
"mnw": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1735150973,
|
"lastModified": 1738852285,
|
||||||
"narHash": "sha256-OJhcCAoaMMXeD6o4qI/hxBCNELJp4dN8D5LJZc8w8XA=",
|
"narHash": "sha256-8Y1uyE6gGHxdU0Vcx2CMg/dAmDSxJw19aAl3TKbbo54=",
|
||||||
"owner": "Gerg-L",
|
"owner": "Gerg-L",
|
||||||
"repo": "mnw",
|
"repo": "mnw",
|
||||||
"rev": "40cd0b006cc48dffd0f8698ad7f54cf1d56779a6",
|
"rev": "6ae73dc9cb72cea17bcc2e3d4670825f483e80e8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -77,11 +77,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1737370608,
|
"lastModified": 1740303746,
|
||||||
"narHash": "sha256-hFA6SmioeqvGW/XvZa9bxniAeulksCOcj3kokdNT/YE=",
|
"narHash": "sha256-XcdiWLEhjJkMxDLKQJ0CCivmYYCvA5MDxu9pMybM5kM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "300081d0cc72df578b02d914df941b8ec62240e6",
|
"rev": "2d068ae5c6516b2d04562de50a58c682540de9bf",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -93,14 +93,14 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1733096140,
|
"lastModified": 1738452942,
|
||||||
"narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
|
"narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
|
"url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nmd": {
|
"nmd": {
|
||||||
|
|
|
||||||
|
|
@ -37,12 +37,6 @@ in {
|
||||||
description = "Default list of sources to enable for completion.";
|
description = "Default list of sources to enable for completion.";
|
||||||
};
|
};
|
||||||
|
|
||||||
cmdline = mkOption {
|
|
||||||
type = nullOr (listOf str);
|
|
||||||
default = [];
|
|
||||||
description = "List of sources to enable for cmdline. Null means use default source list.";
|
|
||||||
};
|
|
||||||
|
|
||||||
providers = mkOption {
|
providers = mkOption {
|
||||||
type = attrsOf providerType;
|
type = attrsOf providerType;
|
||||||
default = {};
|
default = {};
|
||||||
|
|
@ -63,6 +57,14 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cmdline = {
|
||||||
|
sources = mkOption {
|
||||||
|
type = nullOr (listOf str);
|
||||||
|
default = [];
|
||||||
|
description = "List of sources to enable for cmdline. Null means use default source list.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
completion = {
|
completion = {
|
||||||
documentation = {
|
documentation = {
|
||||||
auto_show = mkBool true "Show documentation whenever an item is selected";
|
auto_show = mkBool true "Show documentation whenever an item is selected";
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ in {
|
||||||
./typst.nix
|
./typst.nix
|
||||||
./vala.nix
|
./vala.nix
|
||||||
./wgsl.nix
|
./wgsl.nix
|
||||||
|
./yaml.nix
|
||||||
./zig.nix
|
./zig.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
72
modules/plugins/languages/yaml.nix
Normal file
72
modules/plugins/languages/yaml.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (builtins) attrNames;
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.modules) mkIf mkMerge;
|
||||||
|
inherit (lib.lists) isList;
|
||||||
|
inherit (lib.types) enum either listOf package str;
|
||||||
|
inherit (lib.nvim.types) mkGrammarOption;
|
||||||
|
inherit (lib.nvim.lua) expToLua;
|
||||||
|
|
||||||
|
cfg = config.vim.languages.yaml;
|
||||||
|
|
||||||
|
defaultServer = "yaml-language-server";
|
||||||
|
servers = {
|
||||||
|
yaml-language-server = {
|
||||||
|
package = pkgs.nodePackages.yaml-language-server;
|
||||||
|
lspConfig = ''
|
||||||
|
lspconfig.yamlls.setup {
|
||||||
|
capabilities = capabilities;
|
||||||
|
on_attach = default_on_attach;
|
||||||
|
cmd = ${
|
||||||
|
if isList cfg.lsp.package
|
||||||
|
then expToLua cfg.lsp.package
|
||||||
|
else ''{"${cfg.lsp.package}/bin/yaml-language-server", "--stdio"}''
|
||||||
|
},
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
options.vim.languages.yaml = {
|
||||||
|
enable = mkEnableOption "YAML language support";
|
||||||
|
|
||||||
|
treesitter = {
|
||||||
|
enable = mkEnableOption "YAML treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
|
|
||||||
|
package = mkGrammarOption pkgs "yaml";
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp = {
|
||||||
|
enable = mkEnableOption "YAML LSP support" // {default = config.vim.languages.enableLSP;};
|
||||||
|
|
||||||
|
server = mkOption {
|
||||||
|
type = enum (attrNames servers);
|
||||||
|
default = defaultServer;
|
||||||
|
description = "YAML LSP server to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = either package (listOf str);
|
||||||
|
default = servers.${cfg.lsp.server}.package;
|
||||||
|
description = "YAML LSP server package";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
(mkIf cfg.treesitter.enable {
|
||||||
|
vim.treesitter.enable = true;
|
||||||
|
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||||
|
})
|
||||||
|
|
||||||
|
(mkIf cfg.lsp.enable {
|
||||||
|
vim.lsp.lspconfig.enable = true;
|
||||||
|
vim.lsp.lspconfig.sources.yaml-lsp = servers.${cfg.lsp.server}.lspConfig;
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -57,8 +57,8 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings = {
|
mappings = {
|
||||||
viewToggle = mkMappingOption "Open or close the docs view panel" "lvt";
|
viewToggle = mkMappingOption "Open or close the docs view panel" "<leader>lvt";
|
||||||
viewUpdate = mkMappingOption "Manually update the docs view panel" "lvu";
|
viewUpdate = mkMappingOption "Manually update the docs view panel" "<leader>lvu";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,22 +4,20 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.lua) toLuaObject;
|
||||||
inherit (lib.nvim.dag) entryAnywhere;
|
inherit (lib.nvim.dag) entryAnywhere;
|
||||||
|
|
||||||
cfg = config.vim.ui.illuminate;
|
cfg = config.vim.ui.illuminate;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim.startPlugins = ["vim-illuminate"];
|
vim = {
|
||||||
|
startPlugins = ["vim-illuminate"];
|
||||||
|
|
||||||
vim.pluginRC.vim-illuminate = entryAnywhere ''
|
# vim-illuminate does not have a setup function. It is instead called 'configure'
|
||||||
require('illuminate').configure({
|
# and does what you expect from a setup function. Wild.
|
||||||
filetypes_denylist = {
|
pluginRC.vim-illuminate = entryAnywhere ''
|
||||||
'dirvish',
|
require('illuminate').configure(${toLuaObject cfg.setupOpts})
|
||||||
'fugitive',
|
'';
|
||||||
'NvimTree',
|
};
|
||||||
'TelescopePrompt',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,19 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkEnableOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
|
inherit (lib.types) listOf str;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
in {
|
in {
|
||||||
options.vim.ui.illuminate = {
|
options.vim.ui.illuminate = {
|
||||||
enable = mkEnableOption "automatically highlight other uses of the word under the cursor [vim-illuminate]";
|
enable = mkEnableOption ''
|
||||||
|
automatically highlight other uses of the word under the cursor [vim-illuminate]
|
||||||
|
'';
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "vim-illuminate" {
|
||||||
|
filetypes_denylist = mkOption {
|
||||||
|
type = listOf str;
|
||||||
|
default = ["dirvish" "fugitive" "NvimTree" "TelescopePrompt"];
|
||||||
|
description = "Filetypes to not illuminate, this overrides `filetypes_allowlist`";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
./gestures
|
./gestures
|
||||||
./icon-picker
|
./icon-picker
|
||||||
./images
|
./images
|
||||||
|
./leetcode-nvim
|
||||||
./motion
|
./motion
|
||||||
./multicursors
|
./multicursors
|
||||||
./new-file-template
|
./new-file-template
|
||||||
|
|
@ -16,6 +17,6 @@
|
||||||
./telescope
|
./telescope
|
||||||
./wakatime
|
./wakatime
|
||||||
./yanky-nvim
|
./yanky-nvim
|
||||||
./leetcode-nvim
|
./yazi-nvim
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
cfg = config.vim.utility.yanky-nvim;
|
cfg = config.vim.utility.yanky-nvim;
|
||||||
usingSqlite = cfg.setupOpts.ring.storage == "sqlite";
|
usingSqlite = cfg.setupOpts.ring.storage == "sqlite";
|
||||||
|
usingShada = cfg.setupOpts.ring.storage == "shada";
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
|
|
@ -28,5 +29,15 @@ in {
|
||||||
require("yanky").setup(${toLuaObject cfg.setupOpts});
|
require("yanky").setup(${toLuaObject cfg.setupOpts});
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
assertions = [
|
||||||
|
{
|
||||||
|
assertion = usingShada && ((config.vim.options.shada or "") == "");
|
||||||
|
message = ''
|
||||||
|
Yanky.nvim is configured to use 'shada' for the storage backend, but shada is disabled
|
||||||
|
in 'vim.options'. Please re-enable shada, or switch to a different backend.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkOption mkEnableOption;
|
||||||
inherit (lib.types) enum;
|
inherit (lib.types) enum;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
in {
|
in {
|
||||||
options.vim.utility.yanky-nvim = {
|
options.vim.utility.yanky-nvim = {
|
||||||
enable = mkEnableOption ''
|
enable = mkEnableOption ''
|
||||||
improved Yank and Put functionalities for Neovim [yanky-nvim]
|
improved Yank and Put functionalities for Neovim [yanky-nvim]
|
||||||
'';
|
'';
|
||||||
|
|
||||||
setupOpts = {
|
setupOpts = mkPluginSetupOption "yanky-nvim" {
|
||||||
ring.storage = mkOption {
|
ring.storage = mkOption {
|
||||||
type = enum ["shada" "sqlite" "memory"];
|
type = enum ["shada" "sqlite" "memory"];
|
||||||
default = "shada";
|
default = "shada";
|
||||||
|
|
@ -15,11 +16,11 @@ in {
|
||||||
description = ''
|
description = ''
|
||||||
storage mode for ring values.
|
storage mode for ring values.
|
||||||
|
|
||||||
- shada: this will save pesistantly using Neovim ShaDa feature.
|
- **shada**: this will save pesistantly using Neovim ShaDa feature.
|
||||||
This means that history will be persisted between each session of Neovim.
|
This means that history will be persisted between each session of Neovim.
|
||||||
- memory: each Neovim instance will have his own history and it will be
|
- **memory**: each Neovim instance will have his own history and it will be
|
||||||
lost between sessions.
|
lost between sessions.
|
||||||
- sqlite: more reliable than `shada`, requires `sqlite.lua` as a dependency.
|
- **sqlite**: more reliable than `shada`, requires `sqlite.lua` as a dependency.
|
||||||
nvf will add this dependency to `PATH` automatically.
|
nvf will add this dependency to `PATH` automatically.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
||||||
33
modules/plugins/utility/yazi-nvim/config.nix
Normal file
33
modules/plugins/utility/yazi-nvim/config.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
inherit (lib.nvim.binds) mkKeymap;
|
||||||
|
|
||||||
|
cfg = config.vim.utility.yazi-nvim;
|
||||||
|
keys = cfg.mappings;
|
||||||
|
|
||||||
|
inherit (options.vim.utility.yazi-nvim) mappings;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
vim = {
|
||||||
|
startPlugins = ["snacks-nvim"];
|
||||||
|
lazy.plugins."yazi.nvim" = {
|
||||||
|
package = pkgs.vimPlugins.yazi-nvim;
|
||||||
|
setupModule = "yazi";
|
||||||
|
inherit (cfg) setupOpts;
|
||||||
|
event = ["BufAdd" "VimEnter"];
|
||||||
|
|
||||||
|
keys = [
|
||||||
|
(mkKeymap "n" keys.openYazi "<cmd>Yazi<CR>" {desc = mappings.openYazi.description;})
|
||||||
|
(mkKeymap "n" keys.openYaziDir "<cmd>Yazi cwd<CR>" {desc = mappings.openYaziDir.description;})
|
||||||
|
(mkKeymap "n" keys.yaziToggle "<cmd>Yazi toggle<CR>" {desc = mappings.yaziToggle.description;})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
6
modules/plugins/utility/yazi-nvim/default.nix
Normal file
6
modules/plugins/utility/yazi-nvim/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./config.nix
|
||||||
|
./yazi-nvim.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
26
modules/plugins/utility/yazi-nvim/yazi-nvim.nix
Normal file
26
modules/plugins/utility/yazi-nvim/yazi-nvim.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) bool;
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
|
in {
|
||||||
|
options.vim.utility.yazi-nvim = {
|
||||||
|
enable = mkEnableOption ''
|
||||||
|
companion plugin for the yazi terminal file manager [yazi-nvim]
|
||||||
|
'';
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
openYazi = mkMappingOption "Open yazi at the current file [yazi.nvim]" "<leader>-";
|
||||||
|
openYaziDir = mkMappingOption "Open the file manager in nvim's working directory [yazi.nvim]" "<leader>cw";
|
||||||
|
yaziToggle = mkMappingOption "Resume the last yazi session [yazi.nvim]" "<c-up>";
|
||||||
|
};
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "yazi-nvim" {
|
||||||
|
open_for_directories = mkOption {
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to open Yazi instead of netrw";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -172,7 +172,14 @@
|
||||||
description = "Lazy-load on colorscheme.";
|
description = "Lazy-load on colorscheme.";
|
||||||
};
|
};
|
||||||
|
|
||||||
lazy = mkBool false "Lazy-load manually, e.g. using `trigger_load`.";
|
lazy = mkOption {
|
||||||
|
type = nullOr bool;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Force enable/disable lazy-loading. `null` means only lazy-load if
|
||||||
|
a valid lazy-load condition is set e.g. `cmd`, `ft`, `keys` etc.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
priority = mkOption {
|
priority = mkOption {
|
||||||
type = nullOr int;
|
type = nullOr int;
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue