cmp,harpoon,illuminate,lspkind: added
This commit is contained in:
parent
c58b1d1826
commit
de8e9493c0
7 changed files with 106 additions and 2 deletions
|
@ -3,7 +3,36 @@
|
|||
# Color scheme.
|
||||
colorschemes.catppuccin = {
|
||||
enable = true;
|
||||
settings.flavour = "mocha";
|
||||
settings = {
|
||||
flavour = "mocha";
|
||||
no_bold = false;
|
||||
no_italic = false;
|
||||
no_underline = false;
|
||||
integrations = {
|
||||
cmp = true;
|
||||
neotree = true;
|
||||
harpoon = true;
|
||||
gitsigns = true;
|
||||
which_key = true;
|
||||
illuminate.enabled = true;
|
||||
treesitter = true;
|
||||
treesitter_context = true;
|
||||
telescope.enabled = true;
|
||||
indent_blankline.enabled = true;
|
||||
native_lsp = {
|
||||
enabled = true;
|
||||
inlay_hints = {
|
||||
background = true;
|
||||
};
|
||||
underlines = {
|
||||
errors = ["underline"];
|
||||
hints = ["underline"];
|
||||
information = ["underline"];
|
||||
warnings = ["underline"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Options.
|
||||
|
|
|
@ -6,17 +6,20 @@
|
|||
./core.nix
|
||||
./direnv.nix
|
||||
./gitsigns.nix
|
||||
./harpoon.nix
|
||||
./illuminate.nix
|
||||
./indent-blankline.nix
|
||||
./keybindings.nix
|
||||
./lazygit.nix
|
||||
./lsp
|
||||
./lualine.nix
|
||||
./neo-tree.nix
|
||||
./nvim-cmp.nix
|
||||
./project.nix
|
||||
./rainbow-delimiters.nix
|
||||
./telescope.nix
|
||||
./toggleterm.nix
|
||||
./treesitter.nix
|
||||
./neo-tree.nix
|
||||
./which-key.nix
|
||||
];
|
||||
}
|
||||
|
|
5
config/harpoon.nix
Normal file
5
config/harpoon.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
plugins.harpoon = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
15
config/illuminate.nix
Normal file
15
config/illuminate.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
plugins.illuminate = {
|
||||
enable = true;
|
||||
underCursor = false;
|
||||
filetypesDenylist = [
|
||||
"Outline"
|
||||
"TelescopePrompt"
|
||||
"alpha"
|
||||
"harpoon"
|
||||
"reason"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -2,5 +2,6 @@
|
|||
imports = [
|
||||
./lsp.nix
|
||||
./lsp-format.nix
|
||||
./lspkind.nix
|
||||
];
|
||||
}
|
||||
|
|
12
config/lsp/lspkind.nix
Normal file
12
config/lsp/lspkind.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
plugins.lspkind = {
|
||||
enable = true;
|
||||
symbolMap = {
|
||||
Copilot = "";
|
||||
};
|
||||
extraOptions = {
|
||||
maxwidth = 50;
|
||||
ellipsis_char = "...";
|
||||
};
|
||||
};
|
||||
}
|
39
config/nvim-cmp.nix
Normal file
39
config/nvim-cmp.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
plugins = {
|
||||
cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = false;
|
||||
settings = {
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{
|
||||
name = "buffer"; # text within current buffer
|
||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "path"; # file system paths
|
||||
keywordLength = 3;
|
||||
}
|
||||
{
|
||||
name = "luasnip"; # snippets
|
||||
keywordLength = 3;
|
||||
}
|
||||
];
|
||||
mapping = {
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
"<C-j>" = "cmp.mapping.select_next_item()";
|
||||
"<C-k>" = "cmp.mapping.select_prev_item()";
|
||||
"<C-e>" = "cmp.mapping.abort()";
|
||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true })";
|
||||
};};
|
||||
};
|
||||
cmp-nvim-lsp.enable = true;
|
||||
cmp-path.enable = true;
|
||||
cmp-buffer.enable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue