2026-01-29
This commit is contained in:
@@ -1,40 +1,42 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
];
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
lspkind.enable = true;
|
||||
|
||||
blink-cmp.enable = true;
|
||||
cmp-nvim-lsp-signature-help.enable = true;
|
||||
|
||||
# cmp-nvim-lsp-signature-help.enable = true;
|
||||
#
|
||||
# cmp = {
|
||||
# enable = true;
|
||||
# autoEnableSources = true;
|
||||
# autoLoad = true;
|
||||
#
|
||||
# settings.sources = [
|
||||
# { name = "nvim_lsp"; }
|
||||
# { name = "nvim_lsp_signature_help"; }
|
||||
# { name = "path"; }
|
||||
# ];
|
||||
#
|
||||
# settings.mapping = {
|
||||
# "<Tab>" = "cmp.mapping.select_next_item()";
|
||||
# "<S-Tab>" = "cmp.mapping.select_prev_item()";
|
||||
# "<C-Space>" = "cmp.mapping.complete()";
|
||||
# "<C-S-Space>" = "cmp.mapping.close()";
|
||||
# "<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
|
||||
# };
|
||||
# };
|
||||
#
|
||||
# lsp-format.enable = true;
|
||||
#
|
||||
# none-ls = {
|
||||
# enable = true;
|
||||
# enableLspFormat = true;
|
||||
# sources.formatting = {
|
||||
# alejandra.enable = true;
|
||||
# nixpkgs_fmt.enable = true;
|
||||
# };
|
||||
# };
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
autoLoad = true;
|
||||
|
||||
settings.sources = [
|
||||
{name = "nvim_lsp";}
|
||||
{name = "nvim_lsp_signature_help";}
|
||||
{name = "path";}
|
||||
];
|
||||
|
||||
settings.mapping = {
|
||||
"<Tab>" = "cmp.mapping.select_next_item()";
|
||||
"<S-Tab>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-S-Space>" = "cmp.mapping.close()";
|
||||
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
|
||||
};
|
||||
};
|
||||
|
||||
lsp-format.enable = true;
|
||||
|
||||
none-ls = {
|
||||
enable = true;
|
||||
enableLspFormat = true;
|
||||
sources.formatting = {
|
||||
alejandra.enable = true;
|
||||
nixpkgs_fmt.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
16
home/nixvim/plugins/cmp/keymaps.nix
Normal file
16
home/nixvim/plugins/cmp/keymaps.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{...}: {
|
||||
programs.nixvim.keymaps = [
|
||||
{
|
||||
key = "grd";
|
||||
action = "<cmd>Telescope lsp_definitions<CR>";
|
||||
mode = "n";
|
||||
options.desc = "LSP: [G]oto [D]efinition";
|
||||
}
|
||||
{
|
||||
key = "gri";
|
||||
action = "<cmd>Telescope lsp_implementations<CR>";
|
||||
mode = "n";
|
||||
options.desc = "LSP: [G]oto [I]mplementations";
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user