Compare commits

..

3 Commits

Author SHA1 Message Date
Patrick Neff 13db25f74d fix commandline cmp select on tab 2024-08-07 11:04:14 +02:00
Patrick Neff aee3628a7e add workspace diagnostics filter for trouble 2024-08-07 11:04:11 +02:00
Patrick Neff 0a034da88f add nixpkgs-fmt as dependency 2024-08-07 11:00:07 +02:00
3 changed files with 43 additions and 12 deletions

View File

@ -77,6 +77,7 @@ in {
icu74
alejandra
vscode-extensions.ms-vscode.cpptools
nixpkgs-fmt
];
extraPlugins = with pkgs.vimPlugins; [
{

View File

@ -10,7 +10,7 @@
store_selection_keys = "<Tab>";
};
fromLua = [
{paths = ../../snippets;}
{ paths = ../../snippets; }
];
};
lspkind = {
@ -69,14 +69,14 @@
'';
completion.completeopt = "menu,preview";
sources = [
{name = "luasnip";}
{name = "nvim_lsp";}
{name = "nvim_lsp_signature_help";}
{name = "nvim_lsp_document_symbol";}
{name = "codeium";}
{name = "path";}
{name = "buffer";}
{name = "treesitter";}
{ name = "luasnip"; }
{ name = "nvim_lsp"; }
{ name = "nvim_lsp_signature_help"; }
{ name = "nvim_lsp_document_symbol"; }
{ name = "codeium"; }
{ name = "path"; }
{ name = "buffer"; }
{ name = "treesitter"; }
];
mapping = {
__raw = ''
@ -201,6 +201,14 @@
];
};
":" = {
completion.completeopt = "menu,menuone,noselect";
mapping = {
__raw = ''
cmp.mapping.preset.cmdline({
["<CR>"] = cmp.mapping.confirm { select = true },
})
'';
};
sources = [
{
name = "path";
@ -212,7 +220,7 @@
};
"?" = {
mapping = {
completion.completeopt = "menuone,noselect";
completion.completeopt = "menu,menuone,noselect";
__raw = "cmp.mapping.preset.cmdline({
['<C-b>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),

View File

@ -1,9 +1,31 @@
{
plugins.trouble.enable = true;
plugins.trouble = {
enable = true;
settings = {
modes = {
workspace-diagnostics = {
mode = "diagnostics";
filter = [{
any = [
{ buf = 0; }
{
__raw =
''
function(item)
return item.filename:find((vim.loop or vim.uv).cwd(), 1, true)
end
'';
}
];
}];
};
};
};
};
keymaps = [
{
key = "<leader>xx";
action = "<cmd>Trouble diagnostics toggle<CR>";
action = "<cmd>Trouble workspace-diagnostics toggle<CR>";
options = {
silent = true;
};