refactor: complete overhaul
Complete overhaul of repo structure based on nvix. See https://github.com/niksingh710/nvix Signed-off-by: Lander Van den Bulcke <landervandenbulcke@gmail.com>
This commit is contained in:
parent
ff2c59724a
commit
61feed4086
75 changed files with 2916 additions and 2314 deletions
95
plugins/blink-cmp.nix
Normal file
95
plugins/blink-cmp.nix
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib.nixvim) mkRaw;
|
||||
in
|
||||
{
|
||||
plugins = {
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
completion.menu.border = "rounded";
|
||||
|
||||
signature = {
|
||||
enabled = true;
|
||||
|
||||
trigger = {
|
||||
enabled = true;
|
||||
show_on_keyword = true;
|
||||
show_on_insert = true;
|
||||
};
|
||||
|
||||
window = {
|
||||
show_documentation = true;
|
||||
};
|
||||
};
|
||||
|
||||
keymap = {
|
||||
"<C-j>" = [
|
||||
"select_next"
|
||||
"fallback"
|
||||
];
|
||||
"<C-k>" = [
|
||||
"select_prev"
|
||||
"fallback"
|
||||
];
|
||||
|
||||
"<c-l>" = [
|
||||
"snippet_forward"
|
||||
"fallback"
|
||||
];
|
||||
"<c-h>" = [
|
||||
"snippet_backward"
|
||||
"fallback"
|
||||
];
|
||||
"<c-u>" = [
|
||||
"scroll_documentation_up"
|
||||
"fallback"
|
||||
];
|
||||
"<c-d>" = [
|
||||
"scroll_documentation_down"
|
||||
"fallback"
|
||||
];
|
||||
"<C-space>" = [
|
||||
(
|
||||
# lua
|
||||
mkRaw ''
|
||||
function(cmp)
|
||||
local ok,_ = pcall(require, "copilot")
|
||||
if ok then
|
||||
vim.g.copilot_no_tab_map = true
|
||||
vim.g.copilot_assume_mapped = true
|
||||
vim.g.copilot_tab_fallback = ""
|
||||
|
||||
local suggestion = require("copilot.suggestion")
|
||||
if suggestion.is_visible() then
|
||||
suggestion.accept()
|
||||
else
|
||||
if cmp.snippet_active() then
|
||||
return cmp.select_and_accept()
|
||||
else
|
||||
return cmp.accept()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
''
|
||||
)
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
schemastore = {
|
||||
enable = true;
|
||||
|
||||
json = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
yaml = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue