feat: blink.cmp, treesitter textobjects, snacks scroll, lsp cleanup
This commit is contained in:
parent
5dc158af55
commit
9c8ef71689
5 changed files with 39 additions and 27 deletions
|
|
@ -1,29 +1,14 @@
|
|||
{...}: {
|
||||
vim = {
|
||||
autocomplete.nvim-cmp = {
|
||||
enable = true;
|
||||
mappings = {
|
||||
complete = "<C-Space>";
|
||||
close = "<C-e>";
|
||||
scrollDocsUp = "<C-b>";
|
||||
scrollDocsDown = "<C-f>";
|
||||
confirm = "<CR>";
|
||||
next = "<C-j>";
|
||||
previous = "<C-k>";
|
||||
};
|
||||
vim.autocomplete.blink-cmp = {
|
||||
enable = true;
|
||||
mappings = {
|
||||
complete = "<C-Space>";
|
||||
close = "<C-e>";
|
||||
scrollDocsUp = "<C-b>";
|
||||
scrollDocsDown = "<C-f>";
|
||||
confirm = "<CR>";
|
||||
next = "<C-j>";
|
||||
previous = "<C-k>";
|
||||
};
|
||||
|
||||
snippets.luasnip.enable = true;
|
||||
|
||||
luaConfigRC.luasnip-keymaps = ''
|
||||
vim.keymap.set({"i", "s"}, "<C-l>", function()
|
||||
local ls = require("luasnip")
|
||||
if ls.expand_or_jumpable() then ls.expand_or_jump() end
|
||||
end, {silent = true})
|
||||
vim.keymap.set({"i", "s"}, "<C-h>", function()
|
||||
local ls = require("luasnip")
|
||||
if ls.jumpable(-1) then ls.jump(-1) end
|
||||
end, {silent = true})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@
|
|||
keymaps = [
|
||||
{key = "<leader>ls"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_symbols() end"; desc = "Document Symbols";}
|
||||
{key = "<leader>lS"; mode = ["n"]; lua = true; action = "function() Snacks.picker.lsp_workspace_symbols() end"; desc = "Workspace Symbols";}
|
||||
{key = "<leader>la"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.code_action() end"; desc = "Code Actions";}
|
||||
{key = "K"; mode = ["n"]; lua = true; action = "function() vim.lsp.buf.hover() end"; desc = "Hover Docs";}
|
||||
{key = "<leader>lR"; mode = ["n"]; action = "<cmd>LspRestart<CR>"; desc = "Restart LSP";}
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
lazygit.enable = true;
|
||||
rename.enable = true;
|
||||
picker.enable = true;
|
||||
scroll.enable = true;
|
||||
|
||||
dashboard = {
|
||||
enable = true;
|
||||
|
|
|
|||
27
plugins/treesitter.nix
Normal file
27
plugins/treesitter.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{...}: {
|
||||
vim.treesitter.textobjects = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
select = {
|
||||
enable = true;
|
||||
lookahead = true;
|
||||
keymaps = {
|
||||
"af" = "@function.outer";
|
||||
"if" = "@function.inner";
|
||||
"ac" = "@class.outer";
|
||||
"ic" = "@class.inner";
|
||||
"aa" = "@parameter.outer";
|
||||
"ia" = "@parameter.inner";
|
||||
};
|
||||
};
|
||||
move = {
|
||||
enable = true;
|
||||
set_jumps = true;
|
||||
goto_next_start."]f" = "@function.outer";
|
||||
goto_previous_start."[f" = "@function.outer";
|
||||
goto_next_end."]F" = "@function.outer";
|
||||
goto_previous_end."[F" = "@function.outer";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue