Compare commits
3 commits
e5649b9c80
...
3418e6600b
| Author | SHA1 | Date | |
|---|---|---|---|
| 3418e6600b | |||
| 63340c2aaa | |||
| 8786575166 |
1 changed files with 46 additions and 16 deletions
|
|
@ -68,11 +68,11 @@
|
|||
smartcase = true;
|
||||
};
|
||||
|
||||
keymaps = with config.lib.nixvim; [
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>d";
|
||||
mode = "n";
|
||||
action = mkRaw "vim.diagnostic.open_float";
|
||||
action = "vim.diagnostic.open_float()";
|
||||
}
|
||||
# -- Easy Split Navigation
|
||||
# -- nnoremap <C-J> <C-W><C-J>
|
||||
|
|
@ -111,19 +111,49 @@
|
|||
cmp = {
|
||||
enable = nvimcmp.enable;
|
||||
autoEnableSources = true;
|
||||
settings = {
|
||||
sources = [
|
||||
settings.sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
] ++ lib.optional luasnip.enable { name = "cmp-luasnip"; };
|
||||
|
||||
mapping = with config.lib.nixvim; {
|
||||
"<C-Space>" = mkRaw "cmp.mapping.abort()";
|
||||
"<Tab>" = mkRaw
|
||||
"cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<S-Tab>" = mkRaw
|
||||
"cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete {}";
|
||||
"<CR>" = "cmp.mapping.confirm {
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}";
|
||||
"<Tab>" = {
|
||||
actions = ''
|
||||
function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
'' + lib.optionalString luasnip.enable ''
|
||||
elseif luasnip.expand_or_locally_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
'' + ''
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
modes = [ "i" "s" ];
|
||||
};
|
||||
"<S-Tab>" = {
|
||||
actions = ''
|
||||
function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
'' + lib.optionalString luasnip.enable ''
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
'' + ''
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
'';
|
||||
modes = [ "i" "s" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -149,7 +179,7 @@
|
|||
enable = treesitter.enable;
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
folding.enable = false;
|
||||
folding.enable = true;
|
||||
};
|
||||
|
||||
vimwiki = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue