diff --git a/lua/plugins/avante.lua b/lua/plugins/avante.lua index 7c29108..5082019 100644 --- a/lua/plugins/avante.lua +++ b/lua/plugins/avante.lua @@ -1,31 +1,41 @@ +-- Avante.nvim configuration +-- A modern and feature-rich note-taking plugin for Neovim return { "yetone/avante.nvim", + -- Load on startup since it's a core functionality event = "VeryLazy", lazy = false, + -- Track main branch for latest features version = false, opts = { file_selector = { + -- Use fzf for file selection interface provider = "fzf", provider_opts = {}, }, }, + -- Required build step build = "make", + -- Required dependencies for full functionality dependencies = { - "stevearc/dressing.nvim", - "nvim-lua/plenary.nvim", - "MunifTanjim/nui.nvim", - "ibhagwan/fzf-lua", - "echasnovski/mini.icons", -- or echasnovski/mini.icons - "zbirenbaum/copilot.lua", -- for providers='copilot' + "stevearc/dressing.nvim", -- Enhanced UI components + "nvim-lua/plenary.nvim", -- Lua utility functions + "MunifTanjim/nui.nvim", -- UI component library + "ibhagwan/fzf-lua", -- Fuzzy finder implementation + "echasnovski/mini.icons", -- File icons support + "zbirenbaum/copilot.lua", -- AI completion integration { - -- support for image pasting + -- Image handling capabilities "HakonHarnes/img-clip.nvim", event = "VeryLazy", opts = { default = { + -- Don't embed images as base64 in documents embed_image_as_base64 = false, + -- Don't prompt for image filenames prompt_for_file_name = false, drag_and_drop = { + -- Enable drag-and-drop in insert mode insert_mode = true, }, }, diff --git a/lua/plugins/bookmarks.lua b/lua/plugins/bookmarks.lua index ec76e94..f1f4fd2 100644 --- a/lua/plugins/bookmarks.lua +++ b/lua/plugins/bookmarks.lua @@ -1,7 +1,12 @@ +-- Vim Bookmarks configuration +-- Allows for bookmarking lines in files and easily jumping between them return { "MattesGroeger/vim-bookmarks", config = function() + -- Set persistent storage location for bookmarks + -- Stores in ~/.local/share/nvim/bookmarks vim.g.bookmark_auto_save_file = vim.fn.expand("$HOME") .. "/.local/share/nvim/bookmarks" end, + -- Load when reading or creating new files event = { "BufRead", "BufNewFile" }, } diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua index d79d39f..f9b0eba 100644 --- a/lua/plugins/copilot.lua +++ b/lua/plugins/copilot.lua @@ -1,25 +1,35 @@ +-- GitHub Copilot configuration +-- AI-powered code completion return { "zbirenbaum/copilot.lua", opts = { filetypes = { + -- Enable Copilot for specific filetypes yaml = true, gitcommit = true, gitrebase = true, conf = true, + -- Disable for dot files ["."] = false, + -- Custom handling for markdown files markdown = function() + -- Disable Copilot in Obsidian vault directories if string.match(vim.fn.expand("%:p:h"), "obsidian") then return false end return true end, + -- Custom handling for fish shell scripts fish = function() + -- Disable Copilot for hidden files (starting with .) if string.match(vim.fs.basename(vim.api.nvim_buf_get_name(0)), "^%..*") then return false end return true end, + -- Custom handling for shell scripts sh = function() + -- Disable Copilot for hidden files (starting with .) if string.match(vim.fs.basename(vim.api.nvim_buf_get_name(0)), "^%..*") then return false end diff --git a/lua/plugins/diffview.lua b/lua/plugins/diffview.lua index 54b913a..530a5f8 100644 --- a/lua/plugins/diffview.lua +++ b/lua/plugins/diffview.lua @@ -1,18 +1,24 @@ +-- Diffview configuration +-- A single tabpage interface for easily cycling through diffs return { "sindrets/diffview.nvim", + -- Load only when these commands are used cmd = { - "DiffviewOpen", - "DiffviewClose", - "DiffviewToggleFiles", - "DiffviewFocusFiles", - "DiffviewFileHistory", - "DiffviewRefresh", + "DiffviewOpen", -- Open diff view + "DiffviewClose", -- Close diff view + "DiffviewToggleFiles", -- Toggle file panel + "DiffviewFocusFiles", -- Focus file panel + "DiffviewFileHistory", -- Show file history + "DiffviewRefresh", -- Refresh diff view }, opts = { + -- Enable enhanced diff highlighting enhanced_diff_hl = true, view = { merge_tool = { + -- Use 4-way diff layout for merge conflicts layout = "diff4_mixed", + -- Disable LSP diagnostics in diff view disable_diagnostics = true, }, }, diff --git a/lua/plugins/go.lua b/lua/plugins/go.lua index 5f36a4c..58a79da 100644 --- a/lua/plugins/go.lua +++ b/lua/plugins/go.lua @@ -1,13 +1,19 @@ +-- Go development plugin configuration +-- Provides enhanced Go language support return { "ray-x/go.nvim", + -- Required dependencies for Go development dependencies = { - "ray-x/guihua.lua", - "neovim/nvim-lspconfig", - "nvim-treesitter/nvim-treesitter", + "ray-x/guihua.lua", -- UI components + "neovim/nvim-lspconfig", -- LSP configuration + "nvim-treesitter/nvim-treesitter", -- Syntax highlighting }, config = function() + -- Initialize with default settings require("go").setup() end, + -- Load only for Go-related files ft = { "go", "gomod" }, + -- Install/update Go tools on plugin installation build = ':lua require("go.install").update_all_sync()', }