mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-12 07:03:52 +00:00
assistant/neocodeium: init (#1238)
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
Some checks failed
Set up binary cache / cachix (default) (push) Has been cancelled
Set up binary cache / cachix (maximal) (push) Has been cancelled
Set up binary cache / cachix (nix) (push) Has been cancelled
Treewide Checks / Validate flake (push) Has been cancelled
Treewide Checks / Check formatting (push) Has been cancelled
Treewide Checks / Check source tree for typos (push) Has been cancelled
Treewide Checks / Validate documentation builds (push) Has been cancelled
Treewide Checks / Validate hyperlinks in documentation sources (push) Has been cancelled
Treewide Checks / Validate Editorconfig conformance (push) Has been cancelled
Build and deploy documentation / Check latest commit (push) Has been cancelled
Build and deploy documentation / publish (push) Has been cancelled
Co-authored-by: Ching Pei Yang <59727193+horriblename@users.noreply.github.com>
This commit is contained in:
parent
cd1317aff7
commit
26c4a7e3c3
6 changed files with 217 additions and 0 deletions
33
modules/plugins/assistant/neocodeium/config.nix
Normal file
33
modules/plugins/assistant/neocodeium/config.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
options,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.nvim.binds) mkKeymap;
|
||||
cfg = config.vim.assistant.neocodeium;
|
||||
|
||||
inherit (options.vim.assistant.neocodeium) keymaps;
|
||||
mkNeoCodeiumKey = act: (mkKeymap "i" cfg.keymaps.${act} "function() require('neocodeium').${act}() end" {
|
||||
lua = true;
|
||||
desc = keymaps.${act}.description;
|
||||
});
|
||||
in {
|
||||
config = lib.mkIf cfg.enable {
|
||||
vim = {
|
||||
lazy.plugins.neocodeium = {
|
||||
package = "neocodeium";
|
||||
setupModule = "neocodeium";
|
||||
inherit (cfg) setupOpts;
|
||||
};
|
||||
keymaps = [
|
||||
(mkNeoCodeiumKey "accept")
|
||||
(mkNeoCodeiumKey "accept_word")
|
||||
(mkNeoCodeiumKey "accept_line")
|
||||
(mkNeoCodeiumKey "cycle_or_complete")
|
||||
(mkNeoCodeiumKey "cycle_or_complete_reverse")
|
||||
(mkNeoCodeiumKey "clear")
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue