feat: all yanky and debugprint
This commit is contained in:
parent
eaf110c96f
commit
63bbeaca3b
7 changed files with 221 additions and 7 deletions
|
|
@ -69,10 +69,10 @@
|
||||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||||
"<Tab>" = ''
|
"<Tab>" = ''
|
||||||
cmp.mapping(function(fallback)
|
cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if require("luasnip").expand_or_locally_jumpable() then
|
||||||
cmp.select_next_item()
|
|
||||||
elseif require("luasnip").expand_or_locally_jumpable() then
|
|
||||||
require("luasnip").expand_or_jump()
|
require("luasnip").expand_or_jump()
|
||||||
|
elseif cmp.visible() then
|
||||||
|
cmp.select_next_item()
|
||||||
elseif has_words_before() then
|
elseif has_words_before() then
|
||||||
cmp.complete()
|
cmp.complete()
|
||||||
else
|
else
|
||||||
|
|
@ -82,10 +82,10 @@
|
||||||
'';
|
'';
|
||||||
"<S-Tab>" = ''
|
"<S-Tab>" = ''
|
||||||
cmp.mapping(function(fallback)
|
cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if require("luasnip").jumpable(-1) then
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif require("luasnip").jumpable(-1) then
|
|
||||||
require("luasnip").jump(-1)
|
require("luasnip").jump(-1)
|
||||||
|
elseif cmp.visible() then
|
||||||
|
cmp.select_prev_item()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
38
home-manager/modules/neovim/plugins/debugprint.nix
Normal file
38
home-manager/modules/neovim/plugins/debugprint.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -8,12 +8,14 @@ _: {
|
||||||
./conform.nix
|
./conform.nix
|
||||||
./clangd-extensions.nix
|
./clangd-extensions.nix
|
||||||
./cmp.nix
|
./cmp.nix
|
||||||
|
./debugprint.nix
|
||||||
./diffview.nix
|
./diffview.nix
|
||||||
./flash.nix
|
./flash.nix
|
||||||
./git-conflict.nix
|
./git-conflict.nix
|
||||||
./gitsigns.nix
|
./gitsigns.nix
|
||||||
./harpoon.nix
|
./harpoon.nix
|
||||||
./illuminate.nix
|
./illuminate.nix
|
||||||
|
./indent-blankline.nix
|
||||||
./lightbulb.nix
|
./lightbulb.nix
|
||||||
./lualine.nix
|
./lualine.nix
|
||||||
./luasnip.nix
|
./luasnip.nix
|
||||||
|
|
@ -37,6 +39,7 @@ _: {
|
||||||
./which-key.nix
|
./which-key.nix
|
||||||
./undotree.nix
|
./undotree.nix
|
||||||
./yazi.nix
|
./yazi.nix
|
||||||
|
./yanky.nix
|
||||||
./vimtex.nix
|
./vimtex.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
home-manager/modules/neovim/plugins/indent-blankline.nix
Normal file
30
home-manager/modules/neovim/plugins/indent-blankline.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -2,6 +2,138 @@
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
plugins.noice = {
|
plugins.noice = {
|
||||||
enable = true;
|
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 = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
9
home-manager/modules/neovim/plugins/yanky.nix
Normal file
9
home-manager/modules/neovim/plugins/yanky.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{...}: {
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
yanky = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -72,6 +72,8 @@
|
||||||
size = 10000;
|
size = 10000;
|
||||||
path = "${config.xdg.dataHome}/zsh/history";
|
path = "${config.xdg.dataHome}/zsh/history";
|
||||||
};
|
};
|
||||||
initExtra = '''';
|
initExtra = ''
|
||||||
|
eval $(thefuck --alias)
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue