mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-04 01:55:11 +02:00
plugins/copilot-lua: init + test
This commit is contained in:
parent
7ae81019d9
commit
660c865928
3 changed files with 292 additions and 0 deletions
85
tests/test-sources/plugins/completion/copilot-lua.nix
Normal file
85
tests/test-sources/plugins/completion/copilot-lua.nix
Normal file
|
@ -0,0 +1,85 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
|
||||
nvim-cmp = {
|
||||
enable = true;
|
||||
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
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue