mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-15 00:58:37 +00:00
Merge d00c7d6afb
into 851dbc92fb
This commit is contained in:
commit
6df1d91225
5 changed files with 41 additions and 0 deletions
|
@ -303,6 +303,7 @@
|
||||||
- Disable mini.indentscope for applicable filetypes.
|
- Disable mini.indentscope for applicable filetypes.
|
||||||
- Fix fzf-lua having a hard dependency on fzf.
|
- Fix fzf-lua having a hard dependency on fzf.
|
||||||
- Enable inlay hints support - `config.vim.lsp.inlayHints`.
|
- Enable inlay hints support - `config.vim.lsp.inlayHints`.
|
||||||
|
- Add [`auto-save-nvim`](https://github.com/pocco81/auto-save.nvim).
|
||||||
|
|
||||||
[tebuevd](https://github.com/tebuevd):
|
[tebuevd](https://github.com/tebuevd):
|
||||||
|
|
||||||
|
|
17
modules/plugins/utility/auto-save/auto-save.nix
Normal file
17
modules/plugins/utility/auto-save/auto-save.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{lib, ...}: let
|
||||||
|
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||||
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
|
inherit (lib.types) int;
|
||||||
|
in {
|
||||||
|
options.vim.auto-save = {
|
||||||
|
enable = mkEnableOption "auto-save";
|
||||||
|
setupOpts = mkPluginSetupOption "auto-save" {
|
||||||
|
debounce_delay = mkOption {
|
||||||
|
type = int;
|
||||||
|
# plugin default is 135, adding an option to setupOpts for example
|
||||||
|
default = 100;
|
||||||
|
description = "saves the file at most every `debounce_delay` milliseconds";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
16
modules/plugins/utility/auto-save/config.nix
Normal file
16
modules/plugins/utility/auto-save/config.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
|
||||||
|
cfg = config.vim.auto-save;
|
||||||
|
in {
|
||||||
|
vim.lazy.plugins."auto-save.nvim" = mkIf cfg.enable {
|
||||||
|
package = pkgs.vimPlugins.auto-save-nvim;
|
||||||
|
setupModule = "auto-save";
|
||||||
|
inherit (cfg) setupOpts;
|
||||||
|
};
|
||||||
|
}
|
6
modules/plugins/utility/auto-save/default.nix
Normal file
6
modules/plugins/utility/auto-save/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./auto-save.nix
|
||||||
|
./config.nix
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./auto-save
|
||||||
./binds
|
./binds
|
||||||
./ccc
|
./ccc
|
||||||
./diffview
|
./diffview
|
||||||
|
|
Loading…
Add table
Reference in a new issue