mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-07 12:45:57 +01:00
Compare commits
4 commits
269d574720
...
440aca1b49
Author | SHA1 | Date | |
---|---|---|---|
|
440aca1b49 | ||
|
8bddf37b43 | ||
|
102b908deb | ||
|
8dd9aa0cb5 |
4 changed files with 32 additions and 13 deletions
17
flake.lock
17
flake.lock
|
@ -859,6 +859,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-lzn-auto-require": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1722716302,
|
||||
"narHash": "sha256-YehBjQ4m3i0yEnts7HhWW78N6g40hblfcl94d7l9aN4=",
|
||||
"owner": "horriblename",
|
||||
"repo": "lzn-auto-require",
|
||||
"rev": "57567c9db26a3b5b143ae91f35143c34706e8881",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "horriblename",
|
||||
"repo": "lzn-auto-require",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-mind-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -1873,6 +1889,7 @@
|
|||
"plugin-lspsaga": "plugin-lspsaga",
|
||||
"plugin-lualine": "plugin-lualine",
|
||||
"plugin-lz-n": "plugin-lz-n",
|
||||
"plugin-lzn-auto-require": "plugin-lzn-auto-require",
|
||||
"plugin-mind-nvim": "plugin-mind-nvim",
|
||||
"plugin-minimap-vim": "plugin-minimap-vim",
|
||||
"plugin-modes-nvim": "plugin-modes-nvim",
|
||||
|
|
|
@ -108,6 +108,11 @@
|
|||
flake = false;
|
||||
};
|
||||
|
||||
plugin-lzn-auto-require = {
|
||||
url = "github:horriblename/lzn-auto-require";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
# LSP plugins
|
||||
plugin-nvim-lspconfig = {
|
||||
url = "github:neovim/nvim-lspconfig";
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.types) nullOr str;
|
||||
inherit (lib.attrsets) isAttrs mapAttrs;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
|
||||
binds = rec {
|
||||
mkLuaBinding = key: action: desc:
|
||||
|
@ -72,23 +73,17 @@
|
|||
inherit mode lhs rhs desc;
|
||||
};
|
||||
|
||||
# Usage:
|
||||
#
|
||||
# ```
|
||||
# vim.lazy.plugins = {
|
||||
# telescope = {
|
||||
# # ...
|
||||
# keys = builtins.filter ({lhs, ...}: lhs != null) [
|
||||
# mkSetLznBinding mapping ":Telescope<CR>"
|
||||
# ];
|
||||
# }
|
||||
# }
|
||||
# ```
|
||||
mkSetLznBinding = binding: action: {
|
||||
lhs = binding.value;
|
||||
rhs = action;
|
||||
desc = binding.description;
|
||||
};
|
||||
|
||||
mkSetLuaLznBinding = binding: action: {
|
||||
lhs = binding.value;
|
||||
rhs = mkLuaInline "function() ${action} end";
|
||||
desc = binding.description;
|
||||
};
|
||||
};
|
||||
in
|
||||
binds
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
inherit (builtins) map mapAttrs filter;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.attrsets) filterAttrs getAttrs attrValues attrNames;
|
||||
inherit (lib.strings) concatLines concatMapStringsSep;
|
||||
inherit (lib.strings) concatLines concatMapStringsSep optionalString;
|
||||
inherit (lib.misc) mapAttrsFlatten;
|
||||
inherit (lib.trivial) showWarnings;
|
||||
inherit (lib.types) str nullOr;
|
||||
|
@ -138,6 +138,8 @@ in {
|
|||
pluginConfigs = entryAfter ["theme"] pluginConfigs;
|
||||
extraPluginConfigs = entryAfter ["pluginConfigs"] extraPluginConfigs;
|
||||
mappings = entryAfter ["extraPluginConfigs"] mappings;
|
||||
# FIXME: put this somewhere less stupid
|
||||
footer = entryAfter ["mappings"] (optionalString config.vim.lazy.enable "require('lzn-auto-require.loader').register_loader()");
|
||||
};
|
||||
|
||||
builtLuaConfigRC = let
|
||||
|
|
Loading…
Reference in a new issue