plugins/completion: move to by-name

- Move nvim-cmp to plugins/cmp
- Move other completion plugins to plugins/by-name
This commit is contained in:
Matt Sturgeon 2024-09-05 02:36:41 +01:00
parent 3211a63306
commit ad85cd760e
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
36 changed files with 2 additions and 9 deletions

View file

@ -0,0 +1,38 @@
{
empty = {
plugins.codeium-nvim.enable = true;
};
enabled-by-cmp = {
plugins.cmp = {
enable = true;
settings.sources = [ { name = "codeium"; } ];
};
};
defaults = {
plugins.codeium-nvim = {
enable = true;
settings = {
manager_path = null;
bin_path.__raw = "vim.fn.stdpath('cache') .. '/codeium/bin'";
config_path.__raw = "vim.fn.stdpath('cache') .. '/codeium/config.json'";
language_server_download_url = "https://github.com";
api = {
host = "server.codeium.com";
port = "443";
};
enterprise_mode = null;
detect_proxy = null;
tools = { };
wrapper = null;
enable_chat = false;
enable_local_search = false;
enable_index_service = false;
search_max_workspace_file_count = 5000;
};
};
};
}

View file

@ -0,0 +1,40 @@
{
empty = {
# For some reason, nvim hangs when using codeium-vim. After checking, it doesn't look like a bug though.
test.runNvim = false;
plugins.codeium-vim.enable = true;
};
example = {
# For some reason, nvim hangs when using codeium-vim. After checking, it doesn't look like a bug though.
test.runNvim = false;
plugins.codeium-vim = {
enable = true;
keymaps = {
clear = "<C-]>";
next = "<M-]>";
prev = "<M-[>";
accept = "<Tab>";
complete = "<M-Bslash>";
};
settings = {
filetypes = {
help = false;
gitcommit = false;
gitrebase = false;
"." = false;
};
manual = false;
no_map_tab = false;
idle_delay = 75;
render = true;
tab_fallback = "\t";
disable_bindings = true;
};
};
};
}

View file

@ -0,0 +1,86 @@
{
empty = {
plugins.copilot-lua.enable = true;
};
nvim-cmp = {
plugins = {
copilot-lua = {
enable = true;
panel.enabled = false;
suggestion.enabled = false;
};
copilot-cmp = {
event = [
"InsertEnter"
"LspAttach"
];
fixPairs = true;
};
cmp = {
enable = true;
settings.sources = [ { name = "copilot"; } ];
};
};
};
default = {
plugins.copilot-lua = {
enable = true;
panel = {
enabled = true;
autoRefresh = false;
keymap = {
jumpPrev = "[[";
jumpNext = "]]";
accept = "<CR>";
refresh = "gr";
open = "<M-CR>";
};
layout = {
position = "bottom";
ratio = 0.4;
};
};
suggestion = {
enabled = true;
autoTrigger = false;
debounce = 75;
keymap = {
accept = "<M-l>";
acceptWord = false;
acceptLine = false;
next = "<M-]>";
prev = "<M-[>";
dismiss = "<C-]>";
};
};
filetypes = {
markdown = true;
terraform = false;
sh.__raw = ''
function ()
if string.match(vim.fs.basename(vim.api.nvim_buf_get_name(0)), '^%.env.*') then
-- disable for .env files
return false
end
return true
end
'';
};
serverOptsOverrides = {
trace = "verbose";
settings = {
advanced = {
listCount = 10; # number of completions for panel
inlineSuggestCount = 3; # number of completions for getCompletions
};
};
};
};
};
}

View file

@ -0,0 +1,21 @@
{
empty = {
plugins.copilot-vim.enable = true;
};
example = {
plugins.copilot-vim = {
enable = true;
settings = {
filetypes = {
"*" = false;
python = true;
};
proxy = "localhost:3128";
proxy_strict_ssl = false;
workspace_folders = [ "~/Projects/myproject" ];
};
};
};
}

View file

@ -0,0 +1,28 @@
{
empty = {
plugins.coq-nvim.enable = true;
};
nixvim-defaults =
{ pkgs, ... }:
{
plugins.coq-nvim = {
# It seems that the plugin has issues being executed in the same derivation
enable = !(pkgs.stdenv.isDarwin && pkgs.stdenv.isx86_64);
settings = {
xdg = true;
auto_start = true;
keymap.recommended = true;
completion.always = true;
};
};
};
artifacts = {
plugins.coq-nvim = {
enable = true;
installArtifacts = true;
};
};
}

View file

@ -0,0 +1,29 @@
{
# Empty configuration
empty = {
plugins.coq-thirdparty.enable = true;
};
example = {
plugins.coq-thirdparty = {
enable = true;
sources = [
{
src = "nvimlua";
short_name = "nLUA";
}
{
src = "vimtex";
short_name = "vTEX";
}
{
src = "copilot";
short_name = "COP";
accept_key = "<c-f>";
}
{ src = "demo"; }
];
};
};
}

View file

@ -0,0 +1,32 @@
{
empty = {
plugins.lspkind.enable = true;
};
example = {
plugins = {
lsp = {
enable = true;
servers.clangd.enable = true;
};
cmp.enable = true;
lspkind.enable = true;
};
};
defaults = {
plugins.lspkind = {
enable = true;
mode = "symbol_text";
preset = "codicons";
symbolMap = null;
cmp = {
enable = true;
maxWidth = 50;
ellipsisChar = "...";
menu = null;
after = null;
};
};
};
}