feat: all yanky and debugprint

This commit is contained in:
gwg313 2024-09-28 11:31:48 -04:00
parent eaf110c96f
commit 63bbeaca3b
Signed by: gwg313
GPG key ID: 60FF63B4826B7400
7 changed files with 221 additions and 7 deletions

View file

@ -69,10 +69,10 @@
"<CR>" = "cmp.mapping.confirm({ select = true })";
"<Tab>" = ''
cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_locally_jumpable() then
if require("luasnip").expand_or_locally_jumpable() then
require("luasnip").expand_or_jump()
elseif cmp.visible() then
cmp.select_next_item()
elseif has_words_before() then
cmp.complete()
else
@ -82,10 +82,10 @@
'';
"<S-Tab>" = ''
cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
if require("luasnip").jumpable(-1) then
require("luasnip").jump(-1)
elseif cmp.visible() then
cmp.select_prev_item()
else
fallback()
end

View file

@ -0,0 +1,38 @@
{...}: {
programs.nixvim = {
plugins = {
debugprint = {
enable = true;
settings = {
commands = {
toggle_comment_debug_prints = "ToggleCommentDebugPrints";
delete_debug_prints = "DeleteDebugPrints";
};
display_counter = true;
display_snippet = true;
keymaps = {
normal = {
plain_below = "g?p";
plain_above = "g?P";
variable_below = "g?v";
variable_above = "g?V";
variable_below_alwaysprompt.__raw = "nil";
variable_above_alwaysprompt.__raw = "nil";
textobj_below = "g?o";
textobj_above = "g?O";
toggle_comment_debug_prints.__raw = "nil";
delete_debug_prints.__raw = "nil";
};
visual = {
variable_below = "g?v";
variable_above = "g?V";
};
};
};
};
};
};
}

View file

@ -8,12 +8,14 @@ _: {
./conform.nix
./clangd-extensions.nix
./cmp.nix
./debugprint.nix
./diffview.nix
./flash.nix
./git-conflict.nix
./gitsigns.nix
./harpoon.nix
./illuminate.nix
./indent-blankline.nix
./lightbulb.nix
./lualine.nix
./luasnip.nix
@ -37,6 +39,7 @@ _: {
./which-key.nix
./undotree.nix
./yazi.nix
./yanky.nix
./vimtex.nix
];
}

View file

@ -0,0 +1,30 @@
{...}: {
programs.nixvim = {
plugins.indent-blankline = {
enable = true;
settings = {
scope.enabled = false;
};
};
keymaps = [
{
mode = "n";
key = "<leader>ui";
action = "<cmd>IBLToggle<CR>";
options = {
desc = "Indent-Blankline toggle";
};
}
{
mode = "n";
key = "<leader>uI";
action = "<cmd>IBLToggleScope<CR>";
options = {
desc = "Indent-Blankline Scope toggle";
};
}
];
};
}

View file

@ -2,6 +2,138 @@
programs.nixvim = {
plugins.noice = {
enable = true;
# Hides the title above noice boxes
cmdline = {
format = {
cmdline = {
pattern = "^:";
icon = "";
lang = "vim";
opts = {
border = {
text = {
top = "Cmd";
};
};
};
};
search_down = {
kind = "search";
pattern = "^/";
icon = " ";
lang = "regex";
};
search_up = {
kind = "search";
pattern = "^%?";
icon = " ";
lang = "regex";
};
filter = {
pattern = "^:%s*!";
icon = "";
lang = "bash";
opts = {
border = {
text = {
top = "Bash";
};
};
};
};
lua = {
pattern = "^:%s*lua%s+";
icon = "";
lang = "lua";
};
help = {
pattern = "^:%s*he?l?p?%s+";
icon = "󰋖";
};
input = {};
};
};
messages = {
view = "mini";
viewError = "mini";
viewWarn = "mini";
};
lsp = {
override = {
"vim.lsp.util.convert_input_to_markdown_lines" = true;
"vim.lsp.util.stylize_markdown" = true;
"cmp.entry.get_documentation" = true;
};
progress.enabled = true;
signature.enabled = true;
};
popupmenu.backend = "nui";
# Doesn't support the standard cmdline completions
# popupmenu.backend = "cmp";
presets = {
bottom_search = false;
command_palette = true;
long_message_to_split = true;
inc_rename = true;
lsp_doc_border = true;
};
routes = [
{
filter = {
event = "msg_show";
kind = "search_count";
};
opts = {
skip = true;
};
}
{
# skip progress messages from noisy servers
filter = {
event = "lsp";
kind = "progress";
cond.__raw = ''
function(message)
local client = vim.tbl_get(message.opts, 'progress', 'client')
local servers = { 'jdtls' }
for index, value in ipairs(servers) do
if value == client then
return true
end
end
end
'';
};
opts = {
skip = true;
};
}
];
views = {
cmdline_popup = {
border = {
style = "single";
};
};
confirm = {
border = {
style = "single";
text = {
top = "";
};
};
};
};
};
};
}

View file

@ -0,0 +1,9 @@
{...}: {
programs.nixvim = {
plugins = {
yanky = {
enable = true;
};
};
};
}

View file

@ -72,6 +72,8 @@
size = 10000;
path = "${config.xdg.dataHome}/zsh/history";
};
initExtra = '''';
initExtra = ''
eval $(thefuck --alias)
'';
};
}