2026-01-28
This commit is contained in:
40
home/nixvim/plugins/cmp/default.nix
Normal file
40
home/nixvim/plugins/cmp/default.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{...}: {
|
||||
programs.nixvim.plugins = {
|
||||
lspkind.enable = true;
|
||||
|
||||
blink-cmp.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;
|
||||
# };
|
||||
# };
|
||||
};
|
||||
}
|
||||
25
home/nixvim/plugins/default.nix
Normal file
25
home/nixvim/plugins/default.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./lsp.nix
|
||||
./telescope
|
||||
./cmp
|
||||
];
|
||||
|
||||
programs.nixvim.plugins = {
|
||||
lualine.enable = true;
|
||||
|
||||
web-devicons.enable = true;
|
||||
|
||||
treesitter = {
|
||||
enable = true;
|
||||
folding = true;
|
||||
autoLoad = true;
|
||||
};
|
||||
|
||||
gitsigns.enable = true;
|
||||
|
||||
which-key.enable = true;
|
||||
|
||||
glow.enable = true;
|
||||
};
|
||||
}
|
||||
30
home/nixvim/plugins/lsp.nix
Normal file
30
home/nixvim/plugins/lsp.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{...}: {
|
||||
programs.nixvim = {
|
||||
dependencies.rust-analyzer.enable = true;
|
||||
|
||||
lsp = {
|
||||
inlayHints.enable = true;
|
||||
servers = {
|
||||
"*" = {
|
||||
config.capabilities.textDocument.semanticTokens.multilineTokenSupport = true;
|
||||
config.root_markers = [
|
||||
".git"
|
||||
];
|
||||
};
|
||||
clangd = {
|
||||
enable = true;
|
||||
config.root_markers = [
|
||||
"compile_commands.json"
|
||||
];
|
||||
};
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
};
|
||||
rnix.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
plugins.lspconfig.enable = true;
|
||||
plugins.clangd-extensions.enable = true;
|
||||
};
|
||||
}
|
||||
20
home/nixvim/plugins/telescope/default.nix
Normal file
20
home/nixvim/plugins/telescope/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{...}: {
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
];
|
||||
programs.nixvim.dependencies.ripgrep.enable = true;
|
||||
|
||||
programs.nixvim.plugins.telescope = {
|
||||
enable = true;
|
||||
extensions.file-browser = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git_status = true;
|
||||
hijack_netrw = true;
|
||||
respect_gitignore = true;
|
||||
fzf-native.enable = true;
|
||||
fzf-native.settings.case_mode = "ignore_case";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
19
home/nixvim/plugins/telescope/keymaps.nix
Normal file
19
home/nixvim/plugins/telescope/keymaps.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{...}: {
|
||||
programs.nixvim.keymaps = [
|
||||
{
|
||||
key = "<leader>sf";
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
options.desc = "[S]earch [F]iles";
|
||||
}
|
||||
{
|
||||
key = "<leader>sg";
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
options.desc = "[S]earch by [G]rep";
|
||||
}
|
||||
{
|
||||
key = "<leader>sw";
|
||||
action = "<cmd>Telescope grep_string<CR>";
|
||||
options.desc = "[S]earch current [W]ord";
|
||||
}
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user