mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-11 12:43:28 +00:00
feat: separate tabnine module and configuration
This commit is contained in:
parent
3694a84646
commit
a2e724a962
3 changed files with 74 additions and 0 deletions
24
modules/assistant/tabnine/config.nix
Normal file
24
modules/assistant/tabnine/config.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.assistant.tabnine;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = ["tabnine-nvim"];
|
||||
|
||||
vim.luaConfigRC.tabnine-nvim = nvim.dag.entryAnywhere ''
|
||||
require('tabnine').setup({
|
||||
disable_auto_comment = ${boolToString cfg.disable_auto_comment},
|
||||
accept_keymap = ${cfg.accept_keymap},
|
||||
dismiss_keymap = ${cfg.dismiss_keymap},
|
||||
debounce_ms = ${cfg.debounce_ms},
|
||||
execlude_filetypes = ${cfg.execlude_filetypes},
|
||||
})
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue