updated configuration

This commit is contained in:
2026-01-09 19:27:28 -07:00
parent 305f663a46
commit 6d79fde026
8 changed files with 328 additions and 0 deletions

61
lua/plugins/ai.lua Normal file
View File

@@ -0,0 +1,61 @@
return {
-- Avante: Cursor-like AI assistant
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false,
build = "make",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
"zbirenbaum/copilot.lua", -- Optional for copilot suggestions
{
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = { insert_mode = true },
},
},
},
{
"MeanderingProgrammer/render-markdown.nvim",
opts = { file_types = { "markdown", "Avante" } },
ft = { "markdown", "Avante" },
},
},
---@module 'avante'
---@type avante.Config
opts = {
debug = true,
provider = "claude",
mode = "agentic",
auto_suggestions_provider = "copilot",
providers = {
claude = {
model = "claude-sonnet-4-5",
},
},
behaviour = {
auto_seggestions = true,
auto_set_keymaps = true,
},
mappings = {
ask = "<leader>aa",
edit = "<leader>ae",
refresh = "<leader>ar",
toggle = {
default = "<leader>at",
debug = "<leader>ad",
hint = "<leader>ah",
},
},
},
},
}

65
lua/plugins/dap.lua Normal file
View File

@@ -0,0 +1,65 @@
return {
-- Ensure Mason installs debug adapters
{
"mason-org/mason.nvim",
opts = {
ensure_installed = {
"delve", -- Go debugger
"debugpy", -- Python debugger
"js-debug-adapter", -- JS/TS debugger
},
},
},
-- Mason DAP bridge - auto-configures adapters
{
"jay-babu/mason-nvim-dap.nvim",
dependencies = { "mason-org/mason.nvim", "mfussenegger/nvim-dap" },
opts = {
ensure_installed = { "delve", "debugpy", "js" },
automatic_installation = true,
handlers = {},
},
},
{
"mfussenegger/nvim-dap",
dependencies = {
"jay-babu/mason-nvim-dap.nvim",
{
"leoluz/nvim-dap-go",
opts = {},
},
{
"mfussenegger/nvim-dap-python",
config = function()
local mason_path = vim.fn.stdpath("data") .. "/mason/packages/debugpy/venv/bin/python"
require("dap-python").setup(mason_path)
end,
},
},
},
{
"rcarriga/nvim-dap-ui",
dependencies = { "nvim-neotest/nvim-nio" },
keys = {
{
"<leader>du",
function()
require("dapui").toggle()
end,
desc = "DAP UI",
},
{
"<leader>de",
function()
require("dapui").eval()
end,
desc = "Eval",
mode = { "n", "v" },
},
},
opts = {},
},
}

79
lua/plugins/editor.lua Normal file
View File

@@ -0,0 +1,79 @@
return {
-- Telescope: show gitignored files
{
"nvim-telescope/telescope.nvim",
opts = {
defaults = {
file_ignore_patterns = {}, -- Don't ignore anything by default
},
pickers = {
find_files = {
hidden = true,
no_ignore = true, -- Include .gitignore files
},
live_grep = {
additional_args = function()
return { "--hidden", "--no-ignore" }
end,
},
},
},
keys = {
-- Override default to include hidden/ignored
{ "<leader>ff", "<cmd>Telescope find_files hidden=true no_ignore=true<cr>", desc = "Find Files (all)" },
{ "<leader>fF", "<cmd>Telescope find_files<cr>", desc = "Find Files (respect gitignore)" },
},
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
version = false,
---@module 'snacks'
---@type snacks.Config
opts = {
picker = {
hidden = true,
ignored = true,
live = true,
sources = {
files = {
hidden = true,
ignored = true,
},
},
},
explorer = {
ignored = true,
hidden = true,
},
styles = {
notification = {
wo = {
wrap = true,
},
},
},
},
},
{
"folke/todo-comments.nvim",
optional = true,
keys = {
{
"<leader>st",
function()
Snacks.picker.todo_comments()
end,
desc = "Todo",
},
{
"<leader>sT",
function()
Snacks.picker.todo_comments({ keywords = { "TODO", "FIX", "FIXME" } })
end,
desc = "Todo/Fix/Fixme",
},
},
},
}

40
lua/plugins/sql.lua Normal file
View File

@@ -0,0 +1,40 @@
return {
-- vim-dadbod with project-local connections
{
"kristijanhusak/vim-dadbod-ui",
dependencies = {
{ "tpope/vim-dadbod", lazy = true },
{ "kristijanhusak/vim-dadbod-completion", ft = { "sql", "mysql", "plsql" }, lazy = true },
},
cmd = { "DBUI", "DBUIToggle", "DBUIAddConnection", "DBUIFindBuffer" },
init = function()
vim.g.db_ui_use_nerd_fonts = 1
-- Use project-local connection file
vim.g.db_ui_save_location = vim.fn.getcwd() .. "/.db"
-- Or look for a dadbod.json in project root
vim.g.db_ui_env_variable_url = "DATABASE_URL"
vim.g.db_ui_env_variable_name = "DATABASE_NAME"
-- Auto-load connections from .dadbod.json if it exists
local project_db_config = vim.fn.getcwd() .. "/.dadbod.json"
if vim.fn.filereadable(project_db_config) == 1 then
vim.g.dbs = vim.fn.json_decode(vim.fn.readfile(project_db_config))
end
end,
keys = {
{ "<leader>D", "<cmd>DBUIToggle<CR>", desc = "Toggle DBUI" },
},
},
{
"hrsh7th/nvim-cmp",
optional = true,
dependencies = { "kristijanhusak/vim-dadbod-completion" },
opts = function(_, opts)
opts.sources = opts.sources or {}
table.insert(opts.sources, { name = "vim-dadbod-completion" })
end,
},
}