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
|
|
@ -4,6 +4,7 @@
|
||||||
./plugins/theme.nix
|
./plugins/theme.nix
|
||||||
./plugins/completion.nix
|
./plugins/completion.nix
|
||||||
./plugins/lsp.nix
|
./plugins/lsp.nix
|
||||||
|
./plugins/treesitter.nix
|
||||||
./plugins/formatter.nix
|
./plugins/formatter.nix
|
||||||
./plugins/statusline.nix
|
./plugins/statusline.nix
|
||||||
./plugins/git.nix
|
./plugins/git.nix
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
vim = {
|
vim.autocomplete.blink-cmp = {
|
||||||
autocomplete.nvim-cmp = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
mappings = {
|
mappings = {
|
||||||
complete = "<C-Space>";
|
complete = "<C-Space>";
|
||||||
|
|
@ -12,18 +11,4 @@
|
||||||
previous = "<C-k>";
|
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 = [
|
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_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>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";}
|
{key = "<leader>lR"; mode = ["n"]; action = "<cmd>LspRestart<CR>"; desc = "Restart LSP";}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
lazygit.enable = true;
|
lazygit.enable = true;
|
||||||
rename.enable = true;
|
rename.enable = true;
|
||||||
picker.enable = true;
|
picker.enable = true;
|
||||||
|
scroll.enable = true;
|
||||||
|
|
||||||
dashboard = {
|
dashboard = {
|
||||||
enable = true;
|
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