This commit is contained in:
2025-08-13 21:46:48 +02:00
commit c3e2e6509b
818 changed files with 54187 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
build = "make",
opts = {
openai = {
endpoint = "http://127.0.0.1:11434",
model = "deepseek-coder-v2",
temperature = 60,
max_tokens = 4096,
["local"] = true,
},
},
dependencies = {
"MeanderingProgrammer/render-markdown.nvim",
ft = { "markdown", "norg", "rmd", "org", "Avante" },
},
},
}

View File

@@ -0,0 +1,91 @@
local prefix = "<leader>a"
local user = vim.env.USER or "User"
vim.api.nvim_create_autocmd("User", {
pattern = "CodeCompanionChatAdapter",
callback = function(args)
if args.data.adapter == nil or vim.tbl_isempty(args.data) then
return
end
vim.g.llm_name = args.data.adapter.name
end,
})
return {
{
"olimorris/codecompanion.nvim",
cmd = { "CodeCompanion", "CodeCompanionActions", "CodeCompanionToggle", "CodeCompanionAdd", "CodeCompanionChat" },
opts = {
adapters = {
deepseek_coder = function()
return require("codecompanion.adapters").extend("ollama", {
name = "deepseek_coder",
schema = {
model = {
default = "deepseek-coder-v2:latest",
},
},
})
end,
deepseek_r1 = function()
return require("codecompanion.adapters").extend("ollama", {
name = "deepseek_r1",
schema = {
model = {
default = "deepseek-r1:14b",
},
},
})
end,
},
strategies = {
chat = {
adapter = "deepseek_r1",
roles = {
llm = " CodeCompanion",
user = "" .. user:sub(1, 1):upper() .. user:sub(2),
},
keymaps = {
close = { modes = { n = "q", i = "<C-c>" } },
stop = { modes = { n = "<C-c>" } },
},
},
inline = { adapter = "deepseek_r1" },
agent = { adapter = "deepseek_r1" },
},
display = {
chat = {
show_settings = true,
render_headers = false,
},
},
},
keys = {
{ prefix .. "a", "<cmd>CodeCompanionActions<cr>", mode = { "n", "v" }, desc = "Action Palette" },
{ prefix .. "c", "<cmd>CodeCompanionChat<cr>", mode = { "n", "v" }, desc = "New Chat" },
{ prefix .. "A", "<cmd>CodeCompanionAdd<cr>", mode = "v", desc = "Add Code" },
{ prefix .. "i", "<cmd>CodeCompanion<cr>", mode = "n", desc = "Inline Prompt" },
{ prefix .. "C", "<cmd>CodeCompanionToggle<cr>", mode = "n", desc = "Toggle Chat" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "ai", icon = "󱚦 ", mode = { "n", "v" } },
},
},
},
{
"folke/edgy.nvim",
optional = true,
opts = function(_, opts)
opts.right = opts.right or {}
table.insert(opts.right, {
ft = "codecompanion",
title = "CodeCompanion",
size = { width = 70 },
})
end,
},
}

View File

@@ -0,0 +1,65 @@
return {
{
"Exafunction/codeium.vim",
event = "InsertEnter",
config = function()
if vim.g.codeium_cmp_hide == true then
local cmp = require("cmp")
cmp.event:on("menu_opened", function()
vim.g.codeium_manual = true
vim.fn["codeium#Clear"]()
end)
cmp.event:on("menu_closed", function()
vim.g.codeium_manual = false
vim.fn["codeium#Complete"]()
end)
end
vim.g.codeium_filetypes = {
TelescopePrompt = false,
DressingInput = false,
["neo-tree-popup"] = false,
["dap-repl"] = false,
["snacks_picker_input"] = false,
}
local opts = { expr = true, silent = true }
vim.g.codeium_disable_bindings = 1
vim.keymap.set("i", "<M-CR>", function()
return vim.fn["codeium#Accept"]()
end, opts)
vim.keymap.set("n", "<leader>ch", function()
return vim.fn["codeium#Chat"]()
end, { desc = "Chat with IA (Codeium)" })
vim.keymap.set("i", "<M-]>", function()
return vim.fn["codeium#CycleCompletions"](1)
end, opts)
vim.keymap.set("i", "<M-[>", function()
return vim.fn["codeium#CycleCompletions"](-1)
end, opts)
vim.keymap.set("i", "<M-c>", function()
return vim.fn["codeium#Clear"]()
end, opts)
vim.keymap.set("n", "<leader>cI", "<cmd>CodeiumToggle<cr>", { desc = "Toggle IA (Codeium)" })
end,
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local icon = require("lazyvim.config").icons.kinds.Codeium
local function show_codeium_status()
return icon .. vim.fn["codeium#GetStatusString"]()
end
-- Insert the icon
table.insert(opts.sections.lualine_x, 2, show_codeium_status)
end,
},
}

View File

@@ -0,0 +1,24 @@
return {
{ import = "lazyvim.plugins.extras.ai.copilot" },
{
"zbirenbaum/copilot.lua",
event = "InsertEnter",
opts = {
suggestion = {
enabled = true,
auto_trigger = true,
keymap = {
accept = "<M-CR>",
accept_line = "<M-l>",
accept_word = "<M-k>",
next = "<M-]>",
prev = "<M-[>",
dismiss = "<M-c>",
},
},
},
keys = {
{ "<leader>cI", "<cmd>Copilot toggle<cr>", desc = "Toggle IA (Copilot)" },
},
},
}

View File

@@ -0,0 +1,65 @@
local prefix = "<leader>a"
return {
{
"jellydn/gen.nvim",
opts = {
model = "codellama",
host = "localhost",
port = "11434",
display_mode = "split",
show_prompt = true,
show_model = true,
no_auto_close = false,
init = function(options)
pcall(io.popen, "ollama serve > /dev/null 2>&1 &")
end,
command = function(options)
local body = { model = options.model, stream = true }
return "curl --silent --no-buffer -X POST http://"
.. options.host
.. ":"
.. options.port
.. "/api/generate -d $body"
end,
},
config = function(_, opts)
local gen = require("gen")
gen.setup(opts)
gen.prompts["Elaborate_Text"] = {
prompt = "Elaborate the following text:\n$text",
}
gen.prompts["Fix_Code"] = {
prompt = "Fix the following code. Only output the result in format ```$filetype\n...\n```:\n```$filetype\n$text\n```",
extract = "```$filetype\n(.-)```",
}
end,
keys = {
{ prefix .. "i", "<cmd>Gen<cr>", mode = { "n", "v" }, desc = "IA (Gen)" },
{ prefix .. "g", "<cmd>Gen Generate<cr>", mode = { "n" }, desc = "Generate" },
{ prefix .. "c", "<cmd>Gen Chat<cr>", mode = { "n" }, desc = "Chat" },
{ prefix .. "s", "<cmd>Gen Summarize<cr>", mode = { "n", "v" }, desc = "Summarize" },
{ prefix .. "a", "<cmd>Gen Ask<cr>", mode = { "v" }, desc = "Ask" },
{ prefix .. "H", "<cmd>Gen Change<cr>", mode = { "v" }, desc = "Change" },
{ prefix .. "G", "<cmd>Gen Enhance_Grammar_Spelling<cr>", mode = { "v" }, desc = "Enhance Grammar Spelling" },
{ prefix .. "w", "<cmd>Gen Enhance_Wording<cr>", mode = { "v" }, desc = "Enhance Wording" },
{ prefix .. "C", "<cmd>Gen Make_Concise<cr>", mode = { "v" }, desc = "Make Concise" },
{ prefix .. "l", "<cmd>Gen Make_List<cr>", mode = { "v" }, desc = "Make List" },
{ prefix .. "t", "<cmd>Gen Make_Table<cr>", mode = { "v" }, desc = "Make Table" },
{ prefix .. "r", "<cmd>Gen Review_Code<cr>", mode = { "v" }, desc = "Review Code" },
{ prefix .. "e", "<cmd>Gen Enhance_Code<cr>", mode = { "v" }, desc = "Enhance Code" },
{ prefix .. "h", "<cmd>Gen Change_Code<cr>", mode = { "v" }, desc = "Change Code" },
{ prefix .. "f", "<cmd>Gen Fix_Code<cr>", mode = { "v" }, desc = "Fix Code" },
{ prefix .. "E", "<cmd>Gen Elaborate_Text<cr>", mode = { "v" }, desc = "Elaborate Text" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "IA (Gen)", icon = "󱚦 " },
},
},
},
}

View File

@@ -0,0 +1,108 @@
local prefix = "<leader>C"
return {
{
"jackMort/ChatGPT.nvim",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
},
cond = function()
local api_key = os.getenv("OPENAI_API_KEY")
return api_key and api_key ~= "" and true or false
end,
opts = {
edit_with_instructions = {
diff = false,
keymaps = {
close = "<C-c>",
accept = "<C-y>",
toggle_diff = "<C-d>",
toggle_settings = "<C-o>",
cycle_windows = "<Tab>",
use_output_as_input = "<C-i>",
},
},
chat = {
welcome_message = "",
keymaps = {
close = { "<C-c>" },
yank_last = "<C-y>",
yank_last_code = "<C-k>",
scroll_up = "<C-u>",
scroll_down = "<C-d>",
new_session = "<C-n>",
cycle_windows = "<Tab>",
cycle_modes = "<C-f>",
next_message = "<C-j>",
prev_message = "<C-k>",
select_session = { "<Space>", "o", "<cr>" },
rename_session = "r",
delete_session = "d",
draft_message = "<C-d>",
edit_message = "e",
delete_message = "d",
toggle_settings = "<C-o>",
toggle_message_role = "<C-r>",
toggle_system_role_open = "<C-s>",
stop_generating = "<C-x>",
},
},
openai_params = {
model = "gpt-3.5-turbo-16k",
-- model = "gpt-4",
frequency_penalty = 0,
presence_penalty = 0,
max_tokens = 300,
temperature = 0.3,
top_p = 0.3,
n = 1,
-- temperature = 0,
-- top_p = 1,
},
openai_edit_params = {
model = "gpt-3.5-turbo-16k",
-- model = "gpt-4",
frequency_penalty = 0,
presence_penalty = 0,
temperature = 0,
top_p = 1,
n = 1,
},
show_quickfixes_cmd = "Trouble quickfix",
-- actions_paths = { "~/.config/nvim/custom_actions.json" },
},
cmd = {
"ChatGPT",
"ChatGPTActAs",
"ChatGPTCompleteCode",
"ChatGPTEditWithInstructions",
"ChatGPTRun",
},
-- stylua: ignore
keys = {
{ prefix .. "c", "<cmd>ChatGPT<CR>", desc = "ChatGPT" },
{ prefix .. "e", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit With Instruction", mode = { "n", "v" } },
{ prefix .. "g", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
{ prefix .. "t", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } },
{ prefix .. "k", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } },
{ prefix .. "d", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } },
{ prefix .. "T", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } },
{ prefix .. "o", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
{ prefix .. "s", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } },
{ prefix .. "f", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
{ prefix .. "x", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } },
{ prefix .. "r", "<cmd>ChatGPTRun roxygen_edit<CR>", desc = "Roxygen Edit", mode = { "n", "v" } },
{ prefix .. "l", "<cmd>ChatGPTRun code_readability_analysis<CR>", desc = "Code Readability Analysis", mode = { "n", "v" }, },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "chatGPT", icon = "󰚩 " },
},
},
},
}

View File

@@ -0,0 +1,40 @@
return {
"monkoose/neocodeium",
event = "InsertEnter",
config = function()
local neocodeium = require("neocodeium")
neocodeium.setup()
local commands = require("neocodeium.commands")
if vim.g.codeium_cmp_hide == true then
local cmp = require("cmp")
cmp.event:on("menu_opened", function()
commands.disable()
neocodeium.clear()
end)
cmp.event:on("menu_closed", function()
commands.enable()
end)
end
vim.keymap.set("i", "<M-CR>", function()
require("neocodeium").accept()
end)
vim.keymap.set("i", "<A-w>", function()
require("neocodeium").accept_word()
end)
vim.keymap.set("i", "<A-a>", function()
require("neocodeium").accept_line()
end)
vim.keymap.set("i", "<M-]>", function()
require("neocodeium").cycle_or_complete()
end)
vim.keymap.set("i", "<M-[>", function()
require("neocodeium").cycle_or_complete(-1)
end)
vim.keymap.set("i", "<M-c>", function()
require("neocodeium").clear()
end)
end,
}

View File

@@ -0,0 +1,35 @@
local prefix = "<leader>A"
return {
{ import = "lazyvim.plugins.extras.coding.neogen" },
{
"danymat/neogen",
-- stylua: ignore
keys = {
{ prefix .. "d", function() require("neogen").generate() end, desc = "Default Annotation" },
{ prefix .. "C", function() require("neogen").generate({ type = "class" }) end, desc = "Class" },
{ prefix .. "f", function() require("neogen").generate({ type = "func" }) end, desc = "Function" },
{ prefix .. "t", function() require("neogen").generate({ type = "type" }) end, desc = "Type" },
{ prefix .. "F", function() require("neogen").generate({ type = "file" }) end, desc = "File" },
{ "<leader>cn", false },
},
},
{
"Zeioth/dooku.nvim",
cmd = { "DookuGenerate", "DookuOpen", "DookuAutoSetup" },
opts = {},
-- stylua: ignore
keys = {
{ prefix .. "g", "<Cmd>DookuGenerate<CR>", desc = "Generate HTML Docs" },
{ prefix .. "o", "<Cmd>DookuOpen<CR>", desc = "Open HTML Docs" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "annotation/snippets", icon = "" },
},
},
},
}

View File

@@ -0,0 +1,20 @@
return {
"saghen/blink.cmp",
opts = {
keymap = {
["<C-k>"] = { "select_prev", "fallback" },
["<C-j>"] = { "select_next", "fallback" },
},
completion = {
menu = {
border = "rounded",
winhighlight = "Normal:BlinkCmpDoc,FloatBorder:BlinkCmpDocBorder,CursorLine:BlinkCmpDocCursorLine,Search:None",
},
documentation = {
window = {
border = "rounded",
},
},
},
},
}

View File

@@ -0,0 +1,84 @@
local cmp = require("cmp")
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
},
keys = {
{ "<leader>ciC", "<cmd>CmpStatus<CR>", desc = "Cmp Status" },
},
opts = function(_, opts)
opts.mapping = cmp.mapping.preset.insert({
["<C-j>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-k>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
["<C-b>"] = cmp.mapping.scroll_docs(-4),
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<S-CR>"] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true,
}), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
["<C-CR>"] = function(fallback)
cmp.abort()
fallback()
end,
})
opts.window = {
completion = {
border = "rounded",
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None",
scrollbar = false,
col_offset = -3,
side_padding = 1,
},
documentation = {
border = "rounded",
winhighlight = "Normal:Normal,FloatBorder:Normal,CursorLine:Visual,Search:None",
scrollbar = false,
},
}
opts.performance = {
debounce = 0,
throttle = 0,
fetching_timeout = 20,
confirm_resolve_timeout = 20,
async_budget = 1,
max_view_entries = 50,
}
cmp.setup.cmdline({ "/", "?" }, {
mapping = cmp.mapping.preset.cmdline({
["<C-j>"] = {
c = function(fallback)
if cmp.visible() then
cmp.select_next_item()
else
fallback()
end
end,
},
["<C-k>"] = {
c = function(fallback)
if cmp.visible() then
cmp.select_prev_item()
else
fallback()
end
end,
},
}),
sources = {
{ name = "buffer" },
},
})
end,
}

View File

@@ -0,0 +1,125 @@
return {
{
"hrsh7th/nvim-cmp",
dependencies = {
"windwp/nvim-autopairs",
opts = {},
},
opts = function()
local cmp = require("cmp")
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
local ts_utils = require("nvim-treesitter.ts_utils")
local ts_node_func_parens_disabled = {
-- ecma
named_imports = true,
-- rust
use_declaration = true,
}
local npairs = require("nvim-autopairs")
local Rule = require("nvim-autopairs.rule")
local cond = require("nvim-autopairs.conds")
local brackets = { { "(", ")" }, { "[", "]" }, { "{", "}" } }
local default_handler = cmp_autopairs.filetypes["*"]["("].handler
cmp_autopairs.filetypes["*"]["("].handler = function(char, item, bufnr, rules, commit_character)
local node_type = ts_utils.get_node_at_cursor():type()
if ts_node_func_parens_disabled[node_type] then
if item.data then
item.data.funcParensDisabled = true
else
char = ""
end
end
default_handler(char, item, bufnr, rules, commit_character)
end
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
npairs.add_rules({
-- Rule for a pair with left-side ' ' and right side ' '
Rule(" ", " ")
-- Pair will only occur if the conditional function returns true
:with_pair(function(opts)
-- We are checking if we are inserting a space in (), [], or {}
local pair = opts.line:sub(opts.col - 1, opts.col)
return vim.tbl_contains({
brackets[1][1] .. brackets[1][2],
brackets[2][1] .. brackets[2][2],
brackets[3][1] .. brackets[3][2],
}, pair)
end)
:with_move(cond.none())
:with_cr(cond.none())
-- We only want to delete the pair of spaces when the cursor is as such: ( | )
:with_del(
function(opts)
local col = vim.api.nvim_win_get_cursor(0)[2]
local context = opts.line:sub(col - 1, col + 2)
return vim.tbl_contains({
brackets[1][1] .. " " .. brackets[1][2],
brackets[2][1] .. " " .. brackets[2][2],
brackets[3][1] .. " " .. brackets[3][2],
}, context)
end
),
-- Javascript arrow key
Rule("%(.*%)%s*%=>$", " { }", { "typescript", "typescriptreact", "javascript" })
:use_regex(true)
:set_end_pair_length(2),
-- Auto addspace on =
Rule("=", "")
:with_pair(cond.not_inside_quote())
:with_pair(function(opts)
local last_char = opts.line:sub(opts.col - 1, opts.col - 1)
if last_char:match("[%w%=%s]") then
return true
end
return false
end)
:replace_endpair(function(opts)
local prev_2char = opts.line:sub(opts.col - 2, opts.col - 1)
local next_char = opts.line:sub(opts.col, opts.col)
next_char = next_char == " " and "" or " "
if prev_2char:match("%w$") then
return "<bs> =" .. next_char
end
if prev_2char:match("%=$") then
return next_char
end
if prev_2char:match("=") then
return "<bs><bs>=" .. next_char
end
return ""
end)
:set_end_pair_length(0)
:with_move(cond.none())
:with_del(cond.none()),
})
-- For each pair of brackets we will add another rule
for _, bracket in pairs(brackets) do
npairs.add_rules({
-- Each of these rules is for a pair with left-side '( ' and right-side ' )' for each bracket type
Rule(bracket[1] .. " ", " " .. bracket[2])
:with_pair(cond.none())
:with_move(function(opts)
return opts.char == bracket[2]
end)
:with_del(cond.none())
:use_key(bracket[2])
-- Removes the trailing whitespace that can occur without this
:replace_map_cr(function(_)
return "<C-c>2xi<CR><C-c>O"
end),
})
end
end,
},
{
"echasnovski/mini.pairs",
enabled = false,
},
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"SergioRibera/cmp-dotenv",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "dotenv" })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"amarakon/nvim-cmp-fonts",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "fonts", option = { space_filter = "-" } })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"chrisgrieser/cmp-nerdfont",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "nerdfont" })
end,
}

View File

@@ -0,0 +1,12 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"David-Kunz/cmp-npm",
dependencies = "nvim-lua/plenary.nvim",
ft = "json",
opts = {},
},
opts = function(_, opts)
table.insert(opts.sources, { name = "npm", keyword_length = 4 })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"lukas-reineke/cmp-rg",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "rg", keyword_length = 3 })
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"lukas-reineke/cmp-under-comparator",
},
opts = function(_, opts)
table.insert(opts.sorting.comparators, 4, require("cmp-under-comparator").under)
end,
}

View File

@@ -0,0 +1,9 @@
return {
"hrsh7th/nvim-cmp",
dependencies = {
"chrisgrieser/cmp_yanky",
},
opts = function(_, opts)
table.insert(opts.sources, { name = "cmp_yanky" })
end,
}

View File

@@ -0,0 +1,36 @@
local prefix = "<leader>dd"
return {
{
"andrewferrier/debugprint.nvim",
opts = {
create_keymaps = false,
},
-- stylua: ignore
keys = {
{ prefix .. "l", function() return require("debugprint").debugprint() end, desc = "Under Line", expr = true },
{ prefix .. "L", function() return require("debugprint").debugprint({ above = true }) end, desc = "Above Line", expr = true },
{
prefix .. "v",
function() return require("debugprint").debugprint({ variable = true }) end,
desc = "Variable Under Line",
expr = true,
},
{
prefix .. "V",
function() return require("debugprint").debugprint({ above = true, variable = true }) end,
desc = "Variable Above Line",
expr = true,
},
{ prefix .. "d", function() return require("debugprint").deleteprints() end, desc = "Delete All" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "debugPrint", icon = "󰐪 " },
},
},
},
}

View File

@@ -0,0 +1,5 @@
return {
"kevinhwang91/nvim-ibus-sw",
event = "InsertLeave",
opts = {},
}

View File

@@ -0,0 +1,32 @@
return {
{ import = "lazyvim.plugins.extras.coding.luasnip" },
{
"L3MON4D3/LuaSnip",
dependencies = {
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip").filetype_extend("typescript", { "tsdoc" })
require("luasnip").filetype_extend("typescript", { "next-ts" })
require("luasnip").filetype_extend("javascript", { "jsdoc" })
require("luasnip").filetype_extend("javascript", { "next" })
require("luasnip").filetype_extend("lua", { "luadoc" })
require("luasnip").filetype_extend("python", { "pydoc" })
require("luasnip").filetype_extend("rust", { "rustdoc" })
require("luasnip").filetype_extend("cs", { "csharpdoc" })
require("luasnip").filetype_extend("java", { "javadoc" })
require("luasnip").filetype_extend("c", { "cdoc" })
require("luasnip").filetype_extend("cpp", { "cppdoc" })
require("luasnip").filetype_extend("php", { "phpdoc" })
require("luasnip").filetype_extend("kotlin", { "kdoc" })
require("luasnip").filetype_extend("ruby", { "rdoc" })
require("luasnip").filetype_extend("sh", { "shelldoc" })
require("luasnip.loaders.from_vscode").lazy_load({ paths = vim.fn.stdpath("config") .. "/snippets" })
end,
},
},
{
"garymjr/nvim-snippets",
enabled = false,
},
}

View File

@@ -0,0 +1,48 @@
return {
{
"smoka7/multicursors.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"smoka7/hydra.nvim",
},
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
-- stylua: ignore
keys = {
{ mode = { "v", "n" }, "<leader>M", "<cmd>MCstart<cr>", desc = "Multicursor" },
},
opts = {
hint_config = {
border = "rounded",
position = "bottom-right",
},
generate_hints = {
normal = true,
insert = true,
extend = true,
config = {
column_count = 1,
},
},
},
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
local function is_active()
local ok, hydra = pcall(require, "hydra.statusline")
return ok and hydra.is_active()
end
local function get_name()
local ok, hydra = pcall(require, "hydra.statusline")
if ok then
return hydra.get_name()
end
return ""
end
table.insert(opts.sections.lualine_b, { get_name, cond = is_active })
end,
},
}

View File

@@ -0,0 +1,34 @@
return {
{
"chrisgrieser/nvim-recorder",
event = "VeryLazy",
vscode = true,
keys = {
{ "q", desc = "Start Recording" },
{ "Q", desc = "Play Recording" },
{ "<C-q>", desc = "Switch Slot" },
{ "cq", desc = "Edit Macro" },
{ "yq", desc = "Yank Macro" },
{ "dq", desc = "Delete All Macros" },
},
opts = {
useNerdFontsIcons = false,
slots = { "a", "b", "c", "d" },
mapping = {
startStopRecording = "q",
playMacro = "Q",
editMacro = "cq",
switchSlot = "<C-q>",
deleteAllMacros = "dq",
yankMacro = "yq",
},
},
},
{
"nvim-lualine/lualine.nvim",
optional = true,
opts = function(_, opts)
table.insert(opts.sections.lualine_x, require("recorder").displaySlots)
end,
},
}

View File

@@ -0,0 +1,23 @@
local prefix = "<leader>a"
return {
{
"chrisgrieser/nvim-scissors",
opts = {
jsonFormatter = "jq",
},
-- stylua: ignore
keys = {
{ prefix .. "S", function() require("scissors").editSnippet() end, desc = "Edit Snippets" },
{ prefix .. "s", mode = { "n", "v" }, function() require("scissors").addNewSnippet() end, desc = "Add Snippets" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "annotation/snippets", icon = "" },
},
},
},
}

View File

@@ -0,0 +1,71 @@
local prefix = "<leader>cu"
return {
{
"michaelb/sniprun",
run = "bash ./install.sh",
cmd = { "SnipRun", "SnipInfo", "SnipLive", "SnipClose", "SnipReset", "SnipReplMemoryClean" },
opts = {
selected_interpreters = {}, --# use those instead of the default for the current filetype
repl_enable = { "javascript", "typescript" }, --# enable REPL-like behavior for the given interpreters
repl_disable = {}, --# disable REPL-like behavior for the given interpreters
interpreter_options = {
GFM_original = {
use_on_filetypes = { "markdown.pandoc" }, --# the 'use_on_filetypes' configuration key is
},
Python3_original = {
error_truncate = "auto", --# Truncate runtime errors 'long', 'short' or 'auto'
},
},
display = {
"VirtualText", --# display results as virtual text
},
live_display = { "VirtualTextOk" }, --# display mode used in live_mode
display_options = {
terminal_scrollback = vim.o.scrollback, --# change terminal display scrollback lines
terminal_line_number = false, --# whether show line number in terminal window
terminal_signcolumn = false, --# whether show signcolumn in terminal window
terminal_persistence = true, --# always keep the terminal open (true) or close it at every occasion (false)
terminal_width = 45, --# change the terminal display option width
notification_timeout = 5, --# timeout for nvim_notify output
},
--# You can use the same keys to customize whether a sniprun producing
--# no output should display nothing or '(no output)'
show_no_output = {
"Classic",
"TempFloatingWindow", --# implies LongTempFloatingWindow, which has no effect on its own
},
live_mode_toggle = "off", --# live mode toggle, see Usage - Running for more info
inline_messages = false, --# inline_message (0/1) is a one-line way to display messages
borders = "single", --# display borders around floating windows
--# possible values are 'none', 'single', 'double', or 'shadow'
},
-- stylua: ignore
keys = {
{ prefix .. "r", "<cmd>SnipRun<cr>", desc = "Run" },
{ "<F6>", "<cmd>SnipRun<cr>", desc = "Run" },
{ prefix .. "r", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" },
{ "<F6>", function() require("sniprun").run("v") end, mode = { "v" }, desc = "Run" },
{ prefix .. "i", function() require("sniprun").info() end, desc = "Info" },
{ prefix .. "R", function() require("sniprun").reset() end, desc = "Reset" },
{ "<S-F6>", function() require("sniprun").reset() end, desc = "Reset" },
{ prefix .. "l", function() require("sniprun.live_mode").toggle() end, desc = "Live" },
},
},
{
"folke/which-key.nvim",
opts = {
spec = {
{ prefix, group = "runner", icon = "󰜎 " },
},
},
},
}

View File

@@ -0,0 +1,11 @@
return {
"vidocqh/auto-indent.nvim",
event = "LazyFile",
opts = {
---@param lnum: number
---@return number
indentexpr = function(lnum)
return require("nvim-treesitter.indent").get_indent(lnum)
end,
},
}

View File

@@ -0,0 +1,11 @@
return {
"nvim-treesitter/nvim-treesitter",
dependencies = {
"RRethy/nvim-treesitter-endwise",
},
opts = {
endwise = {
enable = true,
},
},
}

View File

@@ -0,0 +1,5 @@
return {
"nmac427/guess-indent.nvim",
event = "LazyFile",
opts = {},
}

View File

@@ -0,0 +1,9 @@
return {
"echasnovski/mini.align",
opts = {},
vscode = true,
keys = {
{ "ga", mode = { "n", "v" }, desc = "Align" },
{ "gA", mode = { "n", "v" }, desc = "Align Preview" },
},
}

View File

@@ -0,0 +1,10 @@
return {
"ckolkey/ts-node-action",
dependencies = { "nvim-treesitter" },
vscode = true,
opts = {},
--stylua: ignore
keys = {
{ "J", "<cmd>NodeAction<cr>", mode = "n", desc = "Node action" }
},
}

View File

@@ -0,0 +1,4 @@
return {
"nvim-treesitter/nvim-treesitter",
dependencies = { "chrisgrieser/nvim-puppeteer" },
}

View File

@@ -0,0 +1,14 @@
return {
"Wansmer/sibling-swap.nvim",
dependencies = "nvim-treesitter/nvim-treesitter",
vscode = true,
opts = {
use_default_keymaps = false,
highlight_node_at_cursor = true,
},
-- stylua: ignore
keys = {
{ "<C-.>", function() require("sibling-swap").swap_with_right() end, desc = "Move Node Right" },
{ "<C-,>", function() require("sibling-swap").swap_with_left() end, desc = "Move Node Left" },
},
}

View File

@@ -0,0 +1,12 @@
return {
"chrisgrieser/nvim-spider",
opts = {},
vscode = true,
-- stylua: ignore
keys = {
{ "e", mode = { "n", "o", "x" }, function() require("spider").motion("e") end, desc = "Spider-e" },
{ "w", mode = { "n", "o", "x" }, function() require("spider").motion("w") end, desc = "Spider-w" },
{ "b", mode = { "n", "o", "x" }, function() require("spider").motion("b") end, desc = "Spider-b" },
{ "E", mode = { "n", "x", "o" }, function() require("spider").motion("ge") end, desc = "Spider-E" },
},
}

View File

@@ -0,0 +1,12 @@
return {
"johmsalas/text-case.nvim",
config = function()
require("textcase").setup()
LazyVim.on_load("telescope.nvim", function()
require("telescope").load_extension("lazy")
end)
end,
keys = {
{ "gC", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "v" }, desc = "Text Case" },
},
}

View File

@@ -0,0 +1,35 @@
return {
"chrisgrieser/nvim-various-textobjs",
opts = {
keymaps = {
useDefaults = false,
},
},
vscode = true,
-- stylua: ignore
keys = {
{ "im", ft = { "markdown", "toml" }, mode = { "o", "x" }, function() require("various-textobjs").mdlink("inner") end, desc = "Markdown Link" },
{ "am", ft = { "markdown", "toml" }, mode = { "o", "x" }, function() require("various-textobjs").mdlink("outer") end, desc = "Markdown Link" },
{ "iC", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdFencedCodeBlock("inner") end, desc = "CodeBlock" },
{ "aC", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdFencedCodeBlock("outer") end, desc = "CodeBlock" },
{ "ie", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdEmphasis("inner") end, desc = "Emphasis" },
{ "ae", ft = { "markdown" }, mode = { "o", "x" }, function() require("various-textobjs").mdEmphasis("outer") end, desc = "Emphasis" },
{ "gd", mode = { "o", "x" }, function() require("various-textobjs").diagnostics() end, desc = "Diagnostics" },
{ "iy", ft = { "python" }, mode = { "o", "x" }, function() require("various-textobjs").pyTripleQuotes("inner") end, desc = "Triple Quotes" },
{ "ay", ft = { "python" }, mode = { "o", "x" }, function() require("various-textobjs").pyTripleQuotes("outer") end, desc = "Triple Quotes" },
{ "iC", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssSelector("inner") end, desc = "CSS Selector" },
{ "aC", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssSelector("outer") end, desc = "CSS Selector" },
{ "i#", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssColor("inner") end, desc = "CSS Color" },
{ "a#", ft = { "css", "scss", "less" }, mode = { "o", "x" }, function() require("various-textobjs").cssColor("outer") end, desc = "CSS Color" },
{ "iP", ft = { "sh" }, mode = { "o", "x" }, function() require("various-textobjs").shellPipe("inner") end, desc = "Pipe" },
{ "aP", ft = { "sh" }, mode = { "o", "x" }, function() require("various-textobjs").shellPipe("outer") end, desc = "Pipe" },
{ "iH", ft = { "html, xml, css, scss, less" }, mode = { "o", "x" }, function() require("various-textobjs").htmlAttribute("inner") end, desc = "HTML Attribute" },
{ "iv", mode = { "o", "x" }, function() require("various-textobjs").value("inner") end, desc = "Value" },
{ "av", mode = { "o", "x" }, function() require("various-textobjs").value("outer") end, desc = "Value" },
{ "ik", mode = { "o", "x" }, function() require("various-textobjs").key("inner") end, desc = "Key" },
{ "ak", mode = { "o", "x" }, function() require("various-textobjs").key("outer") end, desc = "Key" },
{ "L", mode = { "o", "x" }, function() require("various-textobjs").url() end, desc = "Link" },
{ "iN", mode = { "o", "x" }, function() require("various-textobjs").number("inner") end, desc = "Number" },
{ "aN", mode = { "o", "x" }, function() require("various-textobjs").number("outer") end, desc = "Number" },
},
}

View File

@@ -0,0 +1,6 @@
return {
"sustech-data/wildfire.nvim",
event = "BufEnter",
vscode = true,
opts = {},
}

View File

@@ -0,0 +1,12 @@
return {
{
"altermo/ultimate-autopair.nvim",
event = { "InsertEnter", "CmdlineEnter" },
branch = "v0.6", --recomended as each new version will have breaking changes
opts = {},
},
{
"echasnovski/mini.pairs",
enabled = false,
},
}

View File

@@ -0,0 +1,45 @@
return {
{ import = "lazyvim.plugins.extras.coding.yanky" },
{
"gbprod/yanky.nvim",
opts = function(_, opts)
opts.highlight = { timer = 250 }
if LazyVim.has("telescope.nvim") then
local utils = require("yanky.utils")
local mapping = require("yanky.telescope.mapping")
opts.picker = {
telescope = {
use_default_mappings = false,
mappings = {
default = mapping.put("p"),
i = {
["<c-g>"] = mapping.put("p"),
["<c-h>"] = mapping.put("P"),
["<c-x>"] = mapping.delete(),
["<c-r>"] = mapping.set_register(utils.get_default_register()),
},
n = {
p = mapping.put("p"),
P = mapping.put("P"),
d = mapping.delete(),
r = mapping.set_register(utils.get_default_register()),
},
},
},
}
end
end,
keys = {
{
"<leader>sy",
function()
vim.cmd([[YankyRingHistory]])
end,
mode = { "n", "v" },
desc = "Yank History",
},
{ "<leader>p", mode = { "n", "x" }, false },
},
},
}