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 = {
enable = true;
settings = {
color_theme = "TTY";
};
};
}

View file

@ -196,39 +196,39 @@
keymaps = {
"<leader><leader>" = {
action = "find_files";
desc = "Search files by name";
options.desc = "Search files by name";
};
"<leader>s" = {
action = "live_grep";
desc = "Search by live grep";
options.desc = "Search by live grep";
};
"<leader>bl" = {
action = "buffers";
desc = "[L]list open [B]uffers";
options.desc = "[L]list open [B]uffers";
};
"<leader>h" = {
action = "help_tags";
desc = "Search [H]elp";
options.desc = "Search [H]elp";
};
"<leader>W" = {
action = "grep_string";
desc = "Search for [W]ord under cursor";
options.desc = "Search for [W]ord under cursor";
};
"<leader>gs" = {
action = "git_status";
desc = "Search [G]it [S]tatus";
options.desc = "Search [G]it [S]tatus";
};
"<leader>gl" = {
action = "git_commits";
desc = "View [G]it [L]ogs";
options.desc = "View [G]it [L]ogs";
};
"<leader>r" = {
action = "oldfiles";
desc = "Search [R]ecently opened files by name";
options.desc = "Search [R]ecently opened files by name";
};
"<leader>cs" = {
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-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 = {
enable = true;
autoEnableSources = true;
@ -19,50 +32,28 @@
"<C-e>" = "cmp.mapping.close()";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<S-Tab>" = {
action = "cmp.mapping.select_prev_item()";
modes = [
"i"
"s"
];
};
"<Tab>" = {
action = "cmp.mapping.select_next_item()";
modes = [
"i"
"s"
];
};
"<S-Tab>" = "cmp.mapping.select_prev_item()";
"<Tab>" = "cmp.mapping.select_next_item()";
};
sources = [
{ name = "nvim_lua"; }
{ name = "nvim_lsp"; }
# { name = "nvim_lsp_signature_help"; }
{ name = "calc"; }
{ name = "path"; }
{ name = "buffer"; }
{ name = "luasnip"; }
];
snippet.expand = "luasnip";
window = {
completion.border = "rounded";
documentation.border = "rounded";
};
formatting = {
fields = [ "menu" "abbr" "kind" ];
# https://rsdlt.github.io/posts/rust-nvim-ide-guide-walkthrough-development-debug/
format = ''
function(entry, item)
local menu_icon = {
nvim_lsp = 'λ',
luasnip = '',
buffer = 'Ω',
path = '🖫',
}
item.menu = menu_icon[entry.source.name]
return item
end,
'';
window = {
completion.border = "rounded";
documentation.border = "rounded";
};
formatting = {
fields = [ "menu" "abbr" "kind" ];
# https://rsdlt.github.io/posts/rust-nvim-ide-guide-walkthrough-development-debug/
format = ''
function(entry, item)
local menu_icon = {
nvim_lsp = 'λ',
luasnip = '',
buffer = 'Ω',
path = '🖫',
}
item.menu = menu_icon[entry.source.name]
return item
end,
'';
};
};
};