dev: automated commit - 2025-08-27 17:32:41

This commit is contained in:
Mariano Z. 2025-08-27 17:32:41 -03:00
parent 05a716e91b
commit 4c1fd716a2
Signed by: marianozunino
GPG key ID: 4C73BAD25156DACE
11 changed files with 333 additions and 62 deletions

View file

@ -11,8 +11,24 @@ local M = {
enable_autocmd = false,
})
local function pre_hook(ctx)
local U = require("Comment.utils")
-- Check filetype
local ft = vim.bo.filetype
if ft == "c" or ft == "cpp" then
if ctx.ctype == U.ctype.linewise then
return "// %s"
elseif ctx.ctype == U.ctype.blockwise then
return "/* %s */"
end
end
return require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook()(ctx)
end
require("Comment").setup({
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
pre_hook = pre_hook,
opleader = {
line = "gc",
block = "gC",
@ -28,6 +44,7 @@ local M = {
config = function()
require("todo-comments").setup({
keywords = {
BAD = { icon = "󰇷 ", color = "error" },
FUCK = { icon = "󰇷 ", color = "error" },
SHITTY = { icon = "󰇷 ", color = "error" },
},

View file

@ -4,6 +4,20 @@ local M = {
"nvim-lua/plenary.nvim",
{ "L3MON4D3/LuaSnip", version = "v2.*" },
"folke/lazydev.nvim",
{
"MattiasMTS/cmp-dbee",
dependencies = {
{ "kndndrj/nvim-dbee" },
},
ft = "sql", -- optional but good to have
opts = {}, -- needed
},
{
"saghen/blink.compat",
version = "2.*",
lazy = true,
opts = {},
},
},
version = "*",
}
@ -34,11 +48,15 @@ M.config = function()
},
sources = {
default = { "lsp", "path", "snippets", "buffer", "dadbod", "lazydev" },
default = { "lsp", "path", "snippets", "buffer", "lazydev" },
providers = {
dadbod = { name = "Dadbod", module = "vim_dadbod_completion.blink" },
dbee = { name = "cmp-dbee", module = "blink.compat.source" },
lazydev = { module = "lazydev.integrations.blink", score_offset = 100 },
},
per_filetype = {
sql = { "dbee", "buffer" },
},
},
signature = {

View file

@ -1,18 +1,60 @@
local M = {
"tpope/vim-dadbod",
cmd = {
"DBUI",
},
return {
"kndndrj/nvim-dbee",
enabled = true,
cmd = "Dbee",
dependencies = {
"kristijanhusak/vim-dadbod-ui",
"kristijanhusak/vim-dadbod-completion",
"MunifTanjim/nui.nvim",
},
-- build = function()
-- local binary = vim.fn.expand("$HOME") .. "/.local/share/nvim/dbee/bin/dbee"
-- if vim.fn.filereadable(binary) ~= 0 then
-- require("dbee").install("go")
-- end
-- end,
config = function(_, opts)
local dbee = require("dbee")
dbee.setup({
-- connections
-- sources = {
-- require("dbee.sources").FileSource:new(vim.fn.expand("$HOME") .. "/.local/share/db_ui/connections.json"),
-- },
-- editor
-- editor = {},
-- result
result = {
-- number of rows in the results set to display per page
page_size = 50,
focus_result = false,
},
-- mappings
mappings = {
-- next/previous page
{ key = "L", mode = "", action = "page_next" },
{ key = "H", mode = "", action = "page_prev" },
{ key = "]", mode = "", action = "page_last" },
{ key = "[", mode = "", action = "page_first" },
-- yank rows as csv/json
{ key = "<leader>yj", mode = "n", action = "yank_current_json" },
{ key = "<leader>yj", mode = "v", action = "yank_selection_json" },
{ key = "<leader>YJ", mode = "", action = "yank_all_json" },
{ key = "<leader>yc", mode = "n", action = "yank_current_csv" },
{ key = "<leader>yc", mode = "v", action = "yank_selection_csv" },
{ key = "<leader>YC", mode = "", action = "yank_all_csv" },
-- cancel current call execution
{ key = "<C-c>", mode = "", action = "cancel_call" },
},
})
end,
keys = {
{
"<leader>bt",
function()
require("dbee").toggle()
end,
desc = "toggle db_ui",
mode = "n",
silent = true,
},
},
}
M.config = function()
vim.g.db_ui_use_nerd_fonts = 1
-- g:db_ui_save_location
vim.g.db_ui_save_location = "~/Sync/Work/Stuzo/queries"
end
return M

14
lua/plugins/fff.lua Normal file
View file

@ -0,0 +1,14 @@
return {
"dmtrKovalenko/fff.nvim",
build = "cargo build --release",
opts = {},
keys = {
{
"<leader>/",
function()
require("fff").find_files()
end,
desc = "Toggle FFF",
},
},
}

View file

@ -14,9 +14,9 @@ local M = {
}
M.config = function()
nmap("<leader>ff", function()
require("flash").jump()
end, { desc = "Flash" })
-- nmap("<leader>ff", function()
-- require("flash").jump()
-- end, { desc = "Flash" })
end
return M

View file

@ -36,27 +36,27 @@ M.config = function()
nmap("<leader>oc", fzf_lua.lsp_outgoing_calls, { desc = "Outgoing Calls" })
nmap("<leader>gf", fzf_lua.live_grep, { desc = "Find Live Grep" })
local exclusions = {
"node_modules",
".git",
"dist",
"build",
"coverage",
"public",
}
-- local exclusions = {
-- "node_modules",
-- ".git",
-- "dist",
-- "build",
-- "coverage",
-- "public",
-- }
local exclude_opts = ""
for _, item in ipairs(exclusions) do
exclude_opts = exclude_opts .. " --exclude " .. item
end
nmap("<leader>/", function()
fzf_lua.files({
cwd_prompt = false,
silent = true,
fd_opts = "--hidden --no-ignore --type f" .. exclude_opts,
})
end, { desc = "Find Files" })
-- local exclude_opts = ""
-- for _, item in ipairs(exclusions) do
-- exclude_opts = exclude_opts .. " --exclude " .. item
-- end
--
-- nmap("<leader>/", function()
-- fzf_lua.files({
-- cwd_prompt = false,
-- silent = true,
-- fd_opts = "--hidden --no-ignore --type f" .. exclude_opts,
-- })
-- end, { desc = "Find Files" })
nmap(";", fzf_lua.buffers, { desc = "Find Buffers" })
nmap("sb", fzf_lua.grep_curbuf, { desc = "Search Current Buffer" })
nmap("gw", fzf_lua.grep_cword, { desc = "Search word under cursor" })

View file

@ -136,7 +136,7 @@ return {
"html",
"omnisharp",
"svelte",
"vtsls",
-- "vtsls",
"templ",
"tinymist",
"jdtls",