Update home-manager items

This commit is contained in:
albert 2024-06-06 22:01:33 +09:00
parent ade5e47e94
commit 30a00890fa
Signed by: albert
GPG key ID: 3895DD267CA11BA9
3 changed files with 43 additions and 55 deletions

View file

@ -1,8 +1,5 @@
{ ... }: { { ... }: {
programs.btop = { programs.btop = {
enable = true; enable = true;
settings = {
color_theme = "TTY";
};
}; };
} }

View file

@ -196,39 +196,39 @@
keymaps = { keymaps = {
"<leader><leader>" = { "<leader><leader>" = {
action = "find_files"; action = "find_files";
desc = "Search files by name"; options.desc = "Search files by name";
}; };
"<leader>s" = { "<leader>s" = {
action = "live_grep"; action = "live_grep";
desc = "Search by live grep"; options.desc = "Search by live grep";
}; };
"<leader>bl" = { "<leader>bl" = {
action = "buffers"; action = "buffers";
desc = "[L]list open [B]uffers"; options.desc = "[L]list open [B]uffers";
}; };
"<leader>h" = { "<leader>h" = {
action = "help_tags"; action = "help_tags";
desc = "Search [H]elp"; options.desc = "Search [H]elp";
}; };
"<leader>W" = { "<leader>W" = {
action = "grep_string"; action = "grep_string";
desc = "Search for [W]ord under cursor"; options.desc = "Search for [W]ord under cursor";
}; };
"<leader>gs" = { "<leader>gs" = {
action = "git_status"; action = "git_status";
desc = "Search [G]it [S]tatus"; options.desc = "Search [G]it [S]tatus";
}; };
"<leader>gl" = { "<leader>gl" = {
action = "git_commits"; action = "git_commits";
desc = "View [G]it [L]ogs"; options.desc = "View [G]it [L]ogs";
}; };
"<leader>r" = { "<leader>r" = {
action = "oldfiles"; action = "oldfiles";
desc = "Search [R]ecently opened files by name"; options.desc = "Search [R]ecently opened files by name";
}; };
"<leader>cs" = { "<leader>cs" = {
action = "colorscheme"; action = "colorscheme";
desc = "Change [C]olor[s]cheme"; options.desc = "Change [C]olor[s]cheme";
}; };
}; };
}; };

View file

@ -10,6 +10,19 @@
cmp-nvim-lsp-document-symbol.enable = true; cmp-nvim-lsp-document-symbol.enable = true;
cmp-nvim-lsp-signature-help.enable = true; cmp-nvim-lsp-signature-help.enable = true;
cmp.settings = {
sources = [
{ name = "nvim_lua"; }
{ name = "nvim_lsp"; }
{ name = "calc"; }
{ name = "path"; }
{ name = "buffer"; }
{ name = "luasnip"; }
];
snippet.expand = "luasnip";
};
nvim-cmp = { nvim-cmp = {
enable = true; enable = true;
autoEnableSources = true; autoEnableSources = true;
@ -19,50 +32,28 @@
"<C-e>" = "cmp.mapping.close()"; "<C-e>" = "cmp.mapping.close()";
"<C-f>" = "cmp.mapping.scroll_docs(4)"; "<C-f>" = "cmp.mapping.scroll_docs(4)";
"<CR>" = "cmp.mapping.confirm({ select = true })"; "<CR>" = "cmp.mapping.confirm({ select = true })";
"<S-Tab>" = { "<S-Tab>" = "cmp.mapping.select_prev_item()";
action = "cmp.mapping.select_prev_item()"; "<Tab>" = "cmp.mapping.select_next_item()";
modes = [
"i"
"s"
];
};
"<Tab>" = {
action = "cmp.mapping.select_next_item()";
modes = [
"i"
"s"
];
};
}; };
sources = [ window = {
{ name = "nvim_lua"; } completion.border = "rounded";
{ name = "nvim_lsp"; } documentation.border = "rounded";
# { name = "nvim_lsp_signature_help"; } };
{ name = "calc"; } formatting = {
{ name = "path"; } fields = [ "menu" "abbr" "kind" ];
{ name = "buffer"; } # https://rsdlt.github.io/posts/rust-nvim-ide-guide-walkthrough-development-debug/
{ name = "luasnip"; } format = ''
]; function(entry, item)
snippet.expand = "luasnip"; local menu_icon = {
window = { nvim_lsp = 'λ',
completion.border = "rounded"; luasnip = '',
documentation.border = "rounded"; buffer = 'Ω',
}; path = '🖫',
formatting = { }
fields = [ "menu" "abbr" "kind" ]; item.menu = menu_icon[entry.source.name]
# https://rsdlt.github.io/posts/rust-nvim-ide-guide-walkthrough-development-debug/ return item
format = '' end,
function(entry, item) '';
local menu_icon = {
nvim_lsp = 'λ',
luasnip = '',
buffer = 'Ω',
path = '🖫',
}
item.menu = menu_icon[entry.source.name]
return item
end,
'';
}; };
}; };
}; };