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