Compare commits

...

4 commits

Author SHA1 Message Date
4ca81595ba
chore: fix format 2024-08-21 23:07:45 +08:00
de8e9493c0
cmp,harpoon,illuminate,lspkind: added 2024-08-21 23:07:44 +08:00
c58b1d1826
lualine: added 2024-08-21 12:14:05 +08:00
04fc8f6782
lsp: enable inlay hints 2024-08-21 12:13:09 +08:00
10 changed files with 114 additions and 3 deletions

View file

@ -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.

View file

@ -6,16 +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
View file

@ -0,0 +1,5 @@
{
plugins.harpoon = {
enable = true;
};
}

15
config/illuminate.nix Normal file
View file

@ -0,0 +1,15 @@
{ ... }:
{
plugins.illuminate = {
enable = true;
underCursor = false;
filetypesDenylist = [
"Outline"
"TelescopePrompt"
"alpha"
"harpoon"
"reason"
];
};
}

View file

@ -57,7 +57,7 @@
options = {
remap = true;
};
}
}
# Use ESC to exit terminal mode
{

View file

@ -2,5 +2,6 @@
imports = [
./lsp.nix
./lsp-format.nix
./lspkind.nix
];
}

View file

@ -20,6 +20,7 @@
enable = true;
};
};
inlayHints = true;
keymaps = {
silent = true;
lspBuf = {

12
config/lsp/lspkind.nix Normal file
View file

@ -0,0 +1,12 @@
{
plugins.lspkind = {
enable = true;
symbolMap = {
Copilot = "";
};
extraOptions = {
maxwidth = 50;
ellipsis_char = "...";
};
};
}

5
config/lualine.nix Normal file
View file

@ -0,0 +1,5 @@
{
plugins.lualine = {
enable = true;
};
}

39
config/nvim-cmp.nix Normal file
View 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;
};
}