feat: cmp-path + keybinds
This commit is contained in:
parent
537828c2e9
commit
6173719455
|
@ -8,6 +8,7 @@
|
||||||
sources = [
|
sources = [
|
||||||
{name = "nvim_lsp";} # LSP source for cmp
|
{name = "nvim_lsp";} # LSP source for cmp
|
||||||
{name = "luasnip";} # Snippets source for cmp
|
{name = "luasnip";} # Snippets source for cmp
|
||||||
|
{name = "path";} # Filesystem paths
|
||||||
];
|
];
|
||||||
# The snippet expansion function.
|
# The snippet expansion function.
|
||||||
snippet.expand = ''
|
snippet.expand = ''
|
||||||
|
@ -18,15 +19,15 @@
|
||||||
# cmp mappings declaration
|
# cmp mappings declaration
|
||||||
mapping = {
|
mapping = {
|
||||||
# Select next/previous item.
|
# Select next/previous item.
|
||||||
"<C-e>" = "cmp.mapping.select_next_item()";
|
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||||
"<C-o>" = "cmp.mapping.select_prev_item()";
|
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||||
# Scroll through documentation.
|
# Scroll through documentation.
|
||||||
"<C-s>" = "cmp.mapping.scroll_docs(-4)";
|
"<C-s>" = "cmp.mapping.scroll_docs(-4)";
|
||||||
"<C-t>" = "cmp.mapping.scroll_docs(4)";
|
"<C-t>" = "cmp.mapping.scroll_docs(4)";
|
||||||
# Confirm selection.
|
# Confirm selection.
|
||||||
"<C-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
||||||
# Exit completion.
|
# Exit completion.
|
||||||
"<C-Esc>" = "cmp.mapping.abort()";
|
"<C-e>" = "cmp.mapping.abort()";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Scans the sources array and enable the corresponding plugins if they are known to nixvim.
|
# Scans the sources array and enable the corresponding plugins if they are known to nixvim.
|
||||||
|
|
Loading…
Reference in a new issue