diff --git a/lua/cargdev/core/dashboard_config.lua b/lua/cargdev/core/dashboard_config.lua index 08b51bf..288538c 100644 --- a/lua/cargdev/core/dashboard_config.lua +++ b/lua/cargdev/core/dashboard_config.lua @@ -27,6 +27,8 @@ M.menu_items = { { key = "g", icon = "", desc = "Find in Files", action = ":Telescope live_grep" }, { key = "s", icon = "", desc = "Restore Session", action = ":lua require('persistence').load()" }, { key = "e", icon = "", desc = "Explorer", action = ":NvimTreeToggle" }, + { key = "l", icon = "󰒲", desc = "Lazy", action = ":Lazy" }, + { key = "m", icon = "", desc = "Mason", action = ":Mason" }, { key = "c", icon = "", desc = "Settings", action = ":e $MYVIMRC" }, { key = "q", icon = "", desc = "Quit", action = ":qa" }, } diff --git a/lua/cargdev/core/keymaps/personal.lua b/lua/cargdev/core/keymaps/personal.lua index e24d4c3..2436daf 100644 --- a/lua/cargdev/core/keymaps/personal.lua +++ b/lua/cargdev/core/keymaps/personal.lua @@ -35,24 +35,29 @@ keymap.set("n", "", "10", { noremap = true, silent = true }) keymap.set("n", "", "10", { noremap = true, silent = true }) -- Buffer management with safe close (confirms if unsaved changes) --- Closes only the current buffer, switches to another buffer instead of quitting +-- Uses snacks.bufdelete for smart buffer deletion, shows dashboard on last buffer local function close_buffer(force) - local current_buf = vim.api.nvim_get_current_buf() - local buffers = vim.tbl_filter(function(buf) - return vim.api.nvim_buf_is_valid(buf) and vim.bo[buf].buflisted - end, vim.api.nvim_list_bufs()) - - if #buffers > 1 then - -- Switch to previous buffer before closing - vim.cmd("bprevious") - if force then - vim.cmd("bdelete! " .. current_buf) - else - vim.cmd("bdelete " .. current_buf) - end + local ok, snacks = pcall(require, "snacks") + if ok and snacks.bufdelete then + -- snacks.bufdelete handles everything smartly + snacks.bufdelete({ force = force }) else - -- Last buffer: quit Neovim - vim.cmd(force and "q!" or "q") + -- Fallback to manual handling + local current_buf = vim.api.nvim_get_current_buf() + local buffers = vim.tbl_filter(function(buf) + return vim.api.nvim_buf_is_valid(buf) and vim.bo[buf].buflisted + end, vim.api.nvim_list_bufs()) + + if #buffers > 1 then + vim.cmd("bprevious") + vim.cmd((force and "bdelete! " or "bdelete ") .. current_buf) + else + -- Last buffer: show dashboard instead of quitting + vim.cmd("enew") + if ok and snacks.dashboard then + snacks.dashboard() + end + end end end diff --git a/lua/cargdev/core/options.lua b/lua/cargdev/core/options.lua index 65a0b06..b8eb629 100644 --- a/lua/cargdev/core/options.lua +++ b/lua/cargdev/core/options.lua @@ -274,55 +274,6 @@ vim.api.nvim_create_autocmd("FileType", { end, }) --- ============================================================================= --- RETURN TO DASHBOARD ON LAST BUFFER CLOSE --- ============================================================================= - --- When closing the last buffer, return to dashboard instead of quitting -vim.api.nvim_create_autocmd("BufDelete", { - callback = function(args) - -- Count listed buffers excluding the one being deleted - local bufs = vim.tbl_filter(function(b) - return vim.api.nvim_buf_is_valid(b) - and vim.bo[b].buflisted - and vim.api.nvim_buf_get_name(b) ~= "" - and b ~= args.buf -- Exclude the buffer being deleted - end, vim.api.nvim_list_bufs()) - - -- If no listed buffers remain, open dashboard - if #bufs == 0 then - vim.schedule(function() - -- Skip if any special windows are open - local dominated_filetypes = { - "NvimTree", "neo-tree", "Trouble", "qf", "help", - "dap-repl", "dapui_watches", "dapui_stacks", - "dapui_breakpoints", "dapui_scopes", "dapui_console", - "snacks_dashboard", "lazygit", "terminal", - } - - for _, win in ipairs(vim.api.nvim_list_wins()) do - local buf = vim.api.nvim_win_get_buf(win) - local ft = vim.bo[buf].filetype - if vim.tbl_contains(dominated_filetypes, ft) then - return - end - end - - -- Don't open if dashboard is already visible - local current_ft = vim.bo.filetype - if current_ft == "snacks_dashboard" then - return - end - - local ok, snacks = pcall(require, "snacks") - if ok and snacks.dashboard then - snacks.dashboard() - end - end) - end - end, -}) - -- ============================================================================= -- MODERN UI: GLOBAL ROUNDED BORDERS -- ============================================================================= diff --git a/lua/cargdev/plugins/auto-session.lua b/lua/cargdev/plugins/auto-session.lua deleted file mode 100644 index 374f266..0000000 --- a/lua/cargdev/plugins/auto-session.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - "rmagatti/auto-session", - lazy = false, - opts = { - log_level = "error", - auto_session_suppress_dirs = { "~/", "~/Dev/", "~/Downloads", "~/Documents", "~/Desktop/" }, - auto_session_enable_last_session = false, - auto_session_root_dir = vim.fn.stdpath("data") .. "/sessions/", - auto_session_enabled = true, - auto_save_enabled = true, - auto_restore_enabled = false, - auto_session_use_git_branch = true, - auto_session_create_enabled = true, - auto_session_enable_last_session = false, - -- Don't auto-restore on startup to allow alpha to show - auto_session_restore_on_startup = false, - }, - config = function(_, opts) - require("auto-session").setup(opts) - - -- Set recommended sessionoptions - vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions" - end, -} diff --git a/lua/cargdev/plugins/autopairs.lua b/lua/cargdev/plugins/autopairs.lua index 8ee54b3..dc72b71 100644 --- a/lua/cargdev/plugins/autopairs.lua +++ b/lua/cargdev/plugins/autopairs.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- AUTOPAIRS: Automatic bracket/quote pairing +-- ============================================================================ +-- Automatically inserts closing brackets, quotes, and other pairs when you +-- type the opening character. Integrates with nvim-cmp for smart completion. +-- Example: typing '(' automatically adds ')' and places cursor between them. +-- ============================================================================ return { "windwp/nvim-autopairs", event = { "InsertEnter" }, diff --git a/lua/cargdev/plugins/bufferline.lua b/lua/cargdev/plugins/bufferline.lua index dddf817..867fb81 100644 --- a/lua/cargdev/plugins/bufferline.lua +++ b/lua/cargdev/plugins/bufferline.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- BUFFERLINE: Tab-like buffer management in the top bar +-- ============================================================================ +-- Displays open buffers as tabs at the top of the screen. Provides visual +-- buffer switching, close buttons, and LSP diagnostics indicators per buffer. +-- Uses snacks.bufdelete for smart buffer closing that shows dashboard on last. +-- ============================================================================ return { "akinsho/bufferline.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, @@ -12,8 +19,12 @@ return { style_preset = bufferline.style_preset.minimal, themable = true, numbers = "none", - close_command = "bdelete! %d", - right_mouse_command = "bdelete! %d", + close_command = function(bufnr) + require("snacks").bufdelete({ buf = bufnr, force = true }) + end, + right_mouse_command = function(bufnr) + require("snacks").bufdelete({ buf = bufnr, force = true }) + end, left_mouse_command = "buffer %d", middle_mouse_command = nil, indicator = { diff --git a/lua/cargdev/plugins/codetyper.lua b/lua/cargdev/plugins/codetyper.lua index 5013459..c7c27d7 100644 --- a/lua/cargdev/plugins/codetyper.lua +++ b/lua/cargdev/plugins/codetyper.lua @@ -1,3 +1,19 @@ +-- ============================================================================ +-- CODETYPER.NVIM: AI-powered coding assistant plugin +-- ============================================================================ +-- A local development plugin that provides AI-assisted coding capabilities +-- using various LLM providers (Ollama, Claude, OpenAI, Gemini, Copilot). +-- Features include: inline code transformation with /@ @/ tags, Ask panel +-- for interactive queries, Agent panel for autonomous coding tasks, +-- Tree-sitter integration for scope detection, and diff review. +-- +-- Key keymaps: +-- co - Open Coder view ca - Open Ask panel +-- ct - Toggle Coder view cg - Open Agent panel +-- cp - Process prompt cd - Open Diff Review +-- ctt - Transform tag at cursor (also works in visual mode) +-- ============================================================================ + -- Get local config (loaded in core/init.lua) local local_cfg = vim.g.cargdev_local or {} diff --git a/lua/cargdev/plugins/colorful-winsep.lua b/lua/cargdev/plugins/colorful-winsep.lua deleted file mode 100644 index 3910bcf..0000000 --- a/lua/cargdev/plugins/colorful-winsep.lua +++ /dev/null @@ -1,43 +0,0 @@ -return { - "nvim-zh/colorful-winsep.nvim", - event = { "WinLeave" }, - config = function() - require("colorful-winsep").setup({ - hi = { - bg = "", - fg = "#806d9c", - }, - no_exec_files = { - "NvimTree", - "neo-tree", - "packer", - "TelescopePrompt", - "mason", - "lazy", - "CompetiTest", - "fugitive", - }, - smooth = true, - exponential_smoothing = true, - anchor = { - left = { height = 1, x = -1, y = -1 }, - right = { height = 1, x = -1, y = 0 }, - up = { width = 0, x = -1, y = 0 }, - bottom = { width = 0, x = 1, y = 0 }, - }, - symbols = { "─", "│", "┌", "┐", "└", "┘" }, - only_line_seq = true, - create_event = function() - local win_n = require("colorful-winsep.utils").calculate_number_windows() - if win_n == 2 then - local win_id = vim.fn.win_getid(vim.fn.winnr("h")) - local filetype = vim.api.nvim_buf_get_option(vim.api.nvim_win_get_buf(win_id), "filetype") - if filetype == "NvimTree" or filetype == "neo-tree" then - require("colorful-winsep").NvsepRealClose() - end - end - end, - close_event = function() end, - }) - end, -} diff --git a/lua/cargdev/plugins/colorscheme.lua b/lua/cargdev/plugins/colorscheme.lua index 022b7fb..9511300 100644 --- a/lua/cargdev/plugins/colorscheme.lua +++ b/lua/cargdev/plugins/colorscheme.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- COLORSCHEME: Custom cyberpunk theme +-- ============================================================================ +-- Custom color scheme with cyberpunk aesthetics. Supports transparency, +-- italic comments, bold keywords/functions/types. Loaded first (priority 1000) +-- to ensure consistent UI colors before other plugins load. +-- ============================================================================ return { "CarGDev/cargdev-cyberpunk", name = "cargdev-cyberpunk", diff --git a/lua/cargdev/plugins/comments.lua b/lua/cargdev/plugins/comments.lua index c11755a..0159e65 100644 --- a/lua/cargdev/plugins/comments.lua +++ b/lua/cargdev/plugins/comments.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- COMMENTS: Smart code commenting with treesitter support +-- ============================================================================ +-- Toggle comments with gc (line) or gb (block). Uses treesitter to detect +-- the correct comment style for embedded languages (e.g., JS inside HTML, +-- CSS inside JSX). Works with tsx, jsx, svelte, and other mixed-language files. +-- ============================================================================ return { "numToStr/Comment.nvim", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/copilot.lua b/lua/cargdev/plugins/copilot.lua index d8f6674..40b2e90 100644 --- a/lua/cargdev/plugins/copilot.lua +++ b/lua/cargdev/plugins/copilot.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- COPILOT: GitHub AI code completion and chat +-- ============================================================================ +-- AI-powered code suggestions that appear as ghost text while typing. +-- Includes copilot-cmp for completion menu integration and codecompanion +-- for AI chat/refactoring. Disabled for LaTeX files. Accept with . +-- ============================================================================ return { { "zbirenbaum/copilot.lua", diff --git a/lua/cargdev/plugins/crates.lua b/lua/cargdev/plugins/crates.lua index c525c2f..108fd51 100644 --- a/lua/cargdev/plugins/crates.lua +++ b/lua/cargdev/plugins/crates.lua @@ -1,3 +1,18 @@ +-- ============================================================================ +-- CRATES.NVIM: Rust Cargo.toml dependency management +-- ============================================================================ +-- Provides inline version information and management for Rust crate dependencies. +-- Features: Auto-detect outdated/yanked crates, version popups, LSP integration, +-- and cmp completion for crate names and versions. +-- Keymaps: +-- ct - Toggle crates display +-- cr - Reload crates +-- cv - Show versions popup +-- cf - Show features popup +-- cd - Show dependencies popup +-- cu - Update crate +-- cU - Upgrade crate +-- ============================================================================ return { "saecki/crates.nvim", event = { "BufRead Cargo.toml" }, diff --git a/lua/cargdev/plugins/curls.lua b/lua/cargdev/plugins/curls.lua index a77ea59..571d9d8 100644 --- a/lua/cargdev/plugins/curls.lua +++ b/lua/cargdev/plugins/curls.lua @@ -1,3 +1,16 @@ +-- ============================================================================ +-- REST.NVIM: HTTP client for making API requests from Neovim +-- ============================================================================ +-- A fork of rest.nvim that allows executing HTTP requests directly from +-- .http files within Neovim. Features include request highlighting, +-- automatic response formatting, cookie management, and environment +-- variable support. Requires LuaRocks dependencies: mimetypes and xml2lua. +-- +-- Key UI keybinds: +-- H - Navigate to previous response +-- L - Navigate to next response +-- ============================================================================ + return { "CarGDev/rest.nvim", build = function() diff --git a/lua/cargdev/plugins/dadbod.lua b/lua/cargdev/plugins/dadbod.lua index cd9e968..0e1db64 100644 --- a/lua/cargdev/plugins/dadbod.lua +++ b/lua/cargdev/plugins/dadbod.lua @@ -1,3 +1,20 @@ +-- ============================================================================ +-- VIM-DADBOD-UI: Database client UI for Neovim +-- ============================================================================ +-- A modern database interface built on vim-dadbod. Supports PostgreSQL, MySQL, +-- SQLite, and more with a file-tree style UI for exploring databases. +-- Features: SQL completion, table helpers (Count, List, Schema, Indexes), +-- saved queries, and quick Docker connection commands. +-- Keymaps: +-- Du - Toggle Database UI +-- Da - Add DB Connection +-- Commands: +-- :DBPostgresDocker [port user password database] - Connect to Docker PostgreSQL +-- :MongoDB [connection string] - Open MongoDB shell +-- :Redis [options] - Open Redis CLI +-- :MongoDBDocker [container] - MongoDB shell in Docker +-- :RedisDocker [container] - Redis CLI in Docker +-- ============================================================================ return { "kristijanhusak/vim-dadbod-ui", dependencies = { diff --git a/lua/cargdev/plugins/dap.lua b/lua/cargdev/plugins/dap.lua index 31a44db..1609bdc 100644 --- a/lua/cargdev/plugins/dap.lua +++ b/lua/cargdev/plugins/dap.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- DAP: Debug Adapter Protocol - Interactive debugging +-- ============================================================================ +-- Full debugging support with breakpoints, stepping, variable inspection. +-- Includes nvim-dap-ui for visual debugging panels, nvim-dap-python for Python, +-- persistent-breakpoints to save breakpoints across sessions, and neotest +-- for running tests. Auto-opens/closes UI on debug events. +-- ============================================================================ return { "mfussenegger/nvim-dap", event = { "VeryLazy", "FileType java" }, -- Load on VeryLazy or when opening Java files diff --git a/lua/cargdev/plugins/dial.lua b/lua/cargdev/plugins/dial.lua deleted file mode 100644 index 87186a9..0000000 --- a/lua/cargdev/plugins/dial.lua +++ /dev/null @@ -1,120 +0,0 @@ -return { - "monaqa/dial.nvim", - keys = { - { "", function() return require("dial.map").inc_normal() end, expr = true, desc = "Increment" }, - { "", function() return require("dial.map").dec_normal() end, expr = true, desc = "Decrement" }, - { "g", function() return require("dial.map").inc_gnormal() end, expr = true, desc = "Increment (g)" }, - { "g", function() return require("dial.map").dec_gnormal() end, expr = true, desc = "Decrement (g)" }, - { "", function() return require("dial.map").inc_visual() end, mode = "v", expr = true, desc = "Increment" }, - { "", function() return require("dial.map").dec_visual() end, mode = "v", expr = true, desc = "Decrement" }, - { "g", function() return require("dial.map").inc_gvisual() end, mode = "v", expr = true, desc = "Increment (g)" }, - { "g", function() return require("dial.map").dec_gvisual() end, mode = "v", expr = true, desc = "Decrement (g)" }, - }, - config = function() - local augend = require("dial.augend") - require("dial.config").augends:register_group({ - default = { - augend.integer.alias.decimal, - augend.integer.alias.hex, - augend.integer.alias.octal, - augend.integer.alias.binary, - augend.date.alias["%Y/%m/%d"], - augend.date.alias["%Y-%m-%d"], - augend.date.alias["%m/%d/%Y"], - augend.date.alias["%d/%m/%Y"], - augend.date.alias["%H:%M:%S"], - augend.date.alias["%H:%M"], - augend.constant.alias.bool, - augend.constant.new({ - elements = { "true", "false" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "True", "False" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "yes", "no" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "Yes", "No" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "on", "off" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "enable", "disable" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "enabled", "disabled" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "public", "private", "protected" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "let", "const", "var" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "&&", "||" }, - word = false, - cyclic = true, - }), - augend.constant.new({ - elements = { "==", "!=" }, - word = false, - cyclic = true, - }), - augend.constant.new({ - elements = { "===", "!==" }, - word = false, - cyclic = true, - }), - augend.constant.new({ - elements = { ">", "<" }, - word = false, - cyclic = true, - }), - augend.constant.new({ - elements = { ">=", "<=" }, - word = false, - cyclic = true, - }), - augend.constant.new({ - elements = { "px", "em", "rem", "%" }, - word = false, - cyclic = true, - }), - augend.constant.new({ - elements = { "GET", "POST", "PUT", "PATCH", "DELETE" }, - word = true, - cyclic = true, - }), - augend.constant.new({ - elements = { "info", "warn", "error", "debug" }, - word = true, - cyclic = true, - }), - augend.hexcolor.new({ - case = "lower", - }), - augend.semver.alias.semver, - }, - }) - end, -} diff --git a/lua/cargdev/plugins/diffview.lua b/lua/cargdev/plugins/diffview.lua index b7a6c20..fa42c8b 100644 --- a/lua/cargdev/plugins/diffview.lua +++ b/lua/cargdev/plugins/diffview.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- DIFFVIEW: Git diff viewer and file history +-- ============================================================================ +-- Visual git diff interface showing changes side-by-side. View file history, +-- compare branches, review commits. gd opens diff, gh shows +-- file history. Integrates with neogit for a complete git workflow. +-- ============================================================================ return { "sindrets/diffview.nvim", dependencies = { "nvim-lua/plenary.nvim" }, diff --git a/lua/cargdev/plugins/dressing.lua b/lua/cargdev/plugins/dressing.lua deleted file mode 100644 index 105f7e5..0000000 --- a/lua/cargdev/plugins/dressing.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "stevearc/dressing.nvim", - event = "VeryLazy", -} diff --git a/lua/cargdev/plugins/dropbar.lua b/lua/cargdev/plugins/dropbar.lua index 2dfa7fd..5d65a37 100644 --- a/lua/cargdev/plugins/dropbar.lua +++ b/lua/cargdev/plugins/dropbar.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- DROPBAR: Winbar with breadcrumb navigation +-- ============================================================================ +-- Shows current code location as clickable breadcrumbs in the winbar. +-- Displays file path, class, function, etc. Click to navigate or use +-- telescope integration. Uses LSP and treesitter for accurate symbols. +-- Has BufUnload autocmd to clean up LSP references when buffers close. +-- ============================================================================ return { "Bekaboo/dropbar.nvim", event = { "BufReadPost", "BufNewFile" }, diff --git a/lua/cargdev/plugins/edgy.lua b/lua/cargdev/plugins/edgy.lua index 99f0a05..86412e8 100644 --- a/lua/cargdev/plugins/edgy.lua +++ b/lua/cargdev/plugins/edgy.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- EDGY: Window layout management +-- ============================================================================ +-- Manages fixed window layouts for sidebars and panels (file tree, outline, etc.). +-- Keeps special windows docked at consistent positions and sizes. +-- Configures NvimTree (left), Outline (right), and various bottom panels. +-- ============================================================================ + return { "folke/edgy.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/fidget.lua b/lua/cargdev/plugins/fidget.lua index aed16a1..edfb06c 100644 --- a/lua/cargdev/plugins/fidget.lua +++ b/lua/cargdev/plugins/fidget.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- FIDGET: LSP progress indicator in the corner +-- ============================================================================ +-- Shows LSP loading/indexing progress as subtle notifications in the bottom +-- corner. Non-intrusive way to see what the language server is doing. +-- Note: noice.nvim also shows LSP progress, so this may be redundant. +-- ============================================================================ return { "j-hui/fidget.nvim", opts = { diff --git a/lua/cargdev/plugins/fileOperations.lua b/lua/cargdev/plugins/fileOperations.lua deleted file mode 100644 index 355b6f3..0000000 --- a/lua/cargdev/plugins/fileOperations.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "antosha417/nvim-lsp-file-operations", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-tree.lua", -- or "nvim-neo-tree/neo-tree.nvim" - }, - config = function() - require("lsp-file-operations").setup() - end -} - diff --git a/lua/cargdev/plugins/flash.lua b/lua/cargdev/plugins/flash.lua index 41dd61f..24daaeb 100644 --- a/lua/cargdev/plugins/flash.lua +++ b/lua/cargdev/plugins/flash.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- FLASH: Fast navigation with search labels +-- ============================================================================ +-- Enhanced motion plugin - type a few chars, then jump directly to any match +-- using labeled hints. Works across windows. Press 's' to start flash jump, +-- or use with 'f', 't' motions. Much faster than repeated w/b movements. +-- ============================================================================ return { "folke/flash.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/flutter.lua b/lua/cargdev/plugins/flutter.lua index 290e34d..e0cd037 100644 --- a/lua/cargdev/plugins/flutter.lua +++ b/lua/cargdev/plugins/flutter.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- FLUTTER-TOOLS.NVIM: Flutter development tools +-- ============================================================================ +-- Provides Flutter and Dart development support in Neovim. +-- Features: Flutter commands, hot reload, device selection, and integration +-- with Dart LSP for code intelligence. +-- ============================================================================ return { "akinsho/flutter-tools.nvim", dependencies = { diff --git a/lua/cargdev/plugins/formatting.lua b/lua/cargdev/plugins/formatting.lua index 3b15427..d59b05c 100644 --- a/lua/cargdev/plugins/formatting.lua +++ b/lua/cargdev/plugins/formatting.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- CONFORM.NVIM: Code formatting on save and on demand +-- ============================================================================ +-- Lightweight formatter plugin that supports multiple formatters per filetype. +-- Configured with format-on-save and custom formatters for SQL, XML, and more. +-- Provides mp keymap for manual formatting of selection or buffer. +-- ============================================================================ + return { "stevearc/conform.nvim", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/git-blame.lua b/lua/cargdev/plugins/git-blame.lua index 93c26bb..97e70da 100644 --- a/lua/cargdev/plugins/git-blame.lua +++ b/lua/cargdev/plugins/git-blame.lua @@ -1,3 +1,14 @@ +-- ============================================================================ +-- GIT-BLAME.NVIM: Inline git blame annotations +-- ============================================================================ +-- Shows git blame information as virtual text at the end of each line. +-- Displays author, date, and commit summary. Starts disabled by default. +-- Keymaps: +-- gB - Toggle git blame display +-- gbc - Copy commit SHA +-- gbo - Open commit URL in browser +-- gbf - Open file URL in browser +-- ============================================================================ return { "f-person/git-blame.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/gitsigns.lua b/lua/cargdev/plugins/gitsigns.lua index 7daca01..74674fc 100644 --- a/lua/cargdev/plugins/gitsigns.lua +++ b/lua/cargdev/plugins/gitsigns.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- GITSIGNS: Git integration in the sign column +-- ============================================================================ +-- Shows git diff markers (added/changed/deleted lines) in the gutter. +-- Navigate hunks with ]h/[h, stage hunks, preview changes inline. +-- Has VimLeavePre autocmd to save state before exit. +-- ============================================================================ return { "lewis6991/gitsigns.nvim", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/grug-far.lua b/lua/cargdev/plugins/grug-far.lua index bb51f66..83acab9 100644 --- a/lua/cargdev/plugins/grug-far.lua +++ b/lua/cargdev/plugins/grug-far.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- GRUG-FAR: Search and replace +-- ============================================================================ +-- Powerful find and replace plugin with live preview and regex support. +-- Provides project-wide search/replace with ripgrep backend. +-- Keymaps: sr for search, sR for current word search. +-- ============================================================================ + return { "MagicDuck/grug-far.nvim", cmd = "GrugFar", diff --git a/lua/cargdev/plugins/hardtime.lua b/lua/cargdev/plugins/hardtime.lua index 07d6980..575b37b 100644 --- a/lua/cargdev/plugins/hardtime.lua +++ b/lua/cargdev/plugins/hardtime.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- HARDTIME: Break bad vim habits +-- ============================================================================ +-- Helps you break bad Vim habits by limiting repetitive key presses (hjkl, etc.) +-- Shows hints for better motion alternatives. Disabled by default, toggle with +-- ht. Uses "hint" mode to suggest improvements without blocking input. +-- ============================================================================ + return { "m4xshen/hardtime.nvim", dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, diff --git a/lua/cargdev/plugins/harpoon.lua b/lua/cargdev/plugins/harpoon.lua deleted file mode 100644 index 7cf0a13..0000000 --- a/lua/cargdev/plugins/harpoon.lua +++ /dev/null @@ -1,34 +0,0 @@ -return { - "ThePrimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local harpoon = require("harpoon") - - harpoon:setup({ - settings = { - save_on_toggle = true, - sync_on_ui_close = true, - key = function() - return vim.loop.cwd() - end, - }, - }) - - -- Keymaps - vim.keymap.set("n", "ha", function() - harpoon:list():add() - end, { desc = "Harpoon add file" }) - vim.keymap.set("n", "hh", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end, { desc = "Harpoon menu" }) - - -- Navigate between harpooned files - vim.keymap.set("n", "hp", function() - harpoon:list():prev() - end, { desc = "Harpoon prev" }) - vim.keymap.set("n", "hn", function() - harpoon:list():next() - end, { desc = "Harpoon next" }) - end, -} diff --git a/lua/cargdev/plugins/hlchunk.lua b/lua/cargdev/plugins/hlchunk.lua index 484cddf..d1a9aa4 100644 --- a/lua/cargdev/plugins/hlchunk.lua +++ b/lua/cargdev/plugins/hlchunk.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- hlchunk: Chunk/scope highlighting +-- ============================================================================ +-- Highlights code chunks and indentation levels with visual guides and lines. +-- Uses treesitter to accurately identify scope boundaries for the current chunk. +-- Draws connecting lines to show which code blocks belong together visually. +-- ============================================================================ + return { "shellRaining/hlchunk.nvim", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/ideaMap.lua b/lua/cargdev/plugins/ideaMap.lua index 73024db..ac4becb 100644 --- a/lua/cargdev/plugins/ideaMap.lua +++ b/lua/cargdev/plugins/ideaMap.lua @@ -1,3 +1,20 @@ +-- ============================================================================ +-- IDEADROP.NVIM: Quick note-taking and idea capture plugin +-- ============================================================================ +-- A plugin for capturing and organizing ideas/notes within Neovim. +-- Supports daily notes, named ideas, tree-based browsing, search +-- functionality, and tag-based organization. Integrates with nvim-tree +-- for visual browsing of the idea directory. +-- +-- Key keymaps: +-- id - Open today's idea in right buffer +-- in - Open named idea in right buffer +-- it - Open idea tree browser +-- is - Search ideas +-- ig - Browse tags +-- if - Open today's idea in float +-- ============================================================================ + -- Get local config (loaded in core/init.lua) local local_cfg = vim.g.cargdev_local or {} diff --git a/lua/cargdev/plugins/inc-rename.lua b/lua/cargdev/plugins/inc-rename.lua index 698d4fb..ca54d39 100644 --- a/lua/cargdev/plugins/inc-rename.lua +++ b/lua/cargdev/plugins/inc-rename.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- INC-RENAME.NVIM: Incremental LSP renaming with live preview +-- ============================================================================ +-- Provides an enhanced rename experience with real-time preview of changes +-- across the buffer as you type the new name. Uses LSP rename under the hood. +-- Keymaps: +-- rn - Incremental rename (pre-fills with word under cursor) +-- ============================================================================ return { "smjonas/inc-rename.nvim", cmd = "IncRename", diff --git a/lua/cargdev/plugins/indent-blankline.lua b/lua/cargdev/plugins/indent-blankline.lua index fee47ad..11b802d 100644 --- a/lua/cargdev/plugins/indent-blankline.lua +++ b/lua/cargdev/plugins/indent-blankline.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- INDENT-BLANKLINE: Visual indentation guides +-- ============================================================================ +-- Displays vertical lines at each indentation level. Uses rainbow colors +-- for different levels. Highlights the current scope/context you're in. +-- Makes it easier to see code structure, especially in deeply nested code. +-- ============================================================================ return { "lukas-reineke/indent-blankline.nvim", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/init.lua b/lua/cargdev/plugins/init.lua index a1cd7ef..8528cca 100644 --- a/lua/cargdev/plugins/init.lua +++ b/lua/cargdev/plugins/init.lua @@ -1,4 +1,10 @@ --- Auto-load all plugin files from the plugins directory +-- ============================================================================ +-- PLUGINS INIT: Auto-load all plugin configurations +-- ============================================================================ +-- Automatically discovers and loads all .lua files in the plugins directory. +-- Includes base plugins (plenary, vim-tmux-navigator) and imports all other +-- plugin configurations via lazy.nvim's import system. Excludes init.lua itself. +-- ============================================================================ local function load_all_plugins() local plugins = {} diff --git a/lua/cargdev/plugins/kulala.lua b/lua/cargdev/plugins/kulala.lua index 5af2c33..603c7a4 100644 --- a/lua/cargdev/plugins/kulala.lua +++ b/lua/cargdev/plugins/kulala.lua @@ -1,3 +1,19 @@ +-- ============================================================================ +-- KULALA: HTTP client for Neovim +-- ============================================================================ +-- A REST client plugin that allows you to run HTTP requests directly from +-- .http files. Supports multiple requests, environments, and cURL export. +-- Key features: request execution, environment switching, response inspection. +-- +-- Keymaps (leader: k): +-- kr - Run current HTTP request +-- ka - Run all requests in file +-- kp/kn - Jump to previous/next request +-- ki - Inspect request details +-- kt - Toggle between headers and body view +-- kc - Copy request as cURL command +-- ke - Set environment variables +-- ============================================================================ return { "mistweaverco/kulala.nvim", ft = "http", diff --git a/lua/cargdev/plugins/lazygit.lua b/lua/cargdev/plugins/lazygit.lua index 5d3f334..fab3a45 100644 --- a/lua/cargdev/plugins/lazygit.lua +++ b/lua/cargdev/plugins/lazygit.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- LAZYGIT: Terminal UI for git inside Neovim +-- ============================================================================ +-- Opens lazygit (TUI git client) in a floating terminal. Full git workflow: +-- staging, committing, branching, rebasing, etc. lg to open. +-- Note: snacks.nvim also provides lazygit integration. +-- ============================================================================ return { "kdheepak/lazygit.nvim", cmd = { diff --git a/lua/cargdev/plugins/leetcode.lua b/lua/cargdev/plugins/leetcode.lua index dfb830d..08f5def 100644 --- a/lua/cargdev/plugins/leetcode.lua +++ b/lua/cargdev/plugins/leetcode.lua @@ -1,3 +1,20 @@ +-- ============================================================================ +-- LEETCODE: Solve LeetCode problems inside Neovim +-- ============================================================================ +-- A plugin that integrates LeetCode directly into Neovim, allowing you to +-- browse, solve, and submit coding challenges without leaving your editor. +-- Uses Telescope for problem picking and supports multiple languages. +-- +-- Features: +-- - Browse and search LeetCode problems via Telescope +-- - Run and test solutions with custom test cases +-- - Submit solutions directly to LeetCode +-- - Problem description panel with stats +-- - Console output for test results +-- +-- Commands: :Leet (main entry point for all LeetCode operations) +-- Default language: python3 +-- ============================================================================ return { "kawre/leetcode.nvim", dependencies = { diff --git a/lua/cargdev/plugins/linting.lua b/lua/cargdev/plugins/linting.lua index 2a8b134..2f93e11 100644 --- a/lua/cargdev/plugins/linting.lua +++ b/lua/cargdev/plugins/linting.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- NVIM-LINT: Asynchronous linting for Neovim +-- ============================================================================ +-- Provides linting via external tools with support for custom linter configs. +-- Automatically triggers linting on BufEnter, BufWritePost, and InsertLeave. +-- Includes custom DBML linter and keymaps for manual lint triggers. +-- ============================================================================ + return { "mfussenegger/nvim-lint", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/lsp/lspconfig.lua b/lua/cargdev/plugins/lsp/lspconfig.lua index f408fe0..dd90a9d 100644 --- a/lua/cargdev/plugins/lsp/lspconfig.lua +++ b/lua/cargdev/plugins/lsp/lspconfig.lua @@ -1,3 +1,14 @@ +-- ============================================================================ +-- LSPCONFIG: Language Server Protocol configuration +-- ============================================================================ +-- Configures LSP servers for code intelligence (completions, diagnostics, +-- go-to-definition, etc.). Sets up servers for CSS, Emmet, ESLint, Go, GraphQL, +-- HTML, Lua, Prisma, Python, Svelte, Tailwind, and TypeScript (using vtsls). +-- Includes smart buffer attachment logic to skip binary files and large files. +-- Integrates with cmp-nvim-lsp for completion capabilities. Disables virtual +-- text diagnostics in favor of tiny-inline-diagnostic plugin. Has LspAttach +-- autocmd for client-specific configuration. +-- ============================================================================ return { "neovim/nvim-lspconfig", event = { "BufReadPost", "BufNewFile" }, @@ -5,10 +16,6 @@ return { "hrsh7th/cmp-nvim-lsp", { "antosha417/nvim-lsp-file-operations", config = true }, { "folke/neodev.nvim", opts = {} }, - { - "pmizio/typescript-tools.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - }, }, config = function() local lspconfig = require("lspconfig") @@ -28,7 +35,11 @@ return { "pyright", "svelte", "tailwindcss", - "ts_ls", + "vtsls", -- VSCode TypeScript Language Server - better moduleResolution support + }, + -- Prevent ts_ls from auto-starting (we use vtsls instead) + handlers = { + ["ts_ls"] = function() end, -- noop handler to skip ts_ls }, }) @@ -173,29 +184,51 @@ return { }, }, }, - ts_ls = { + -- vtsls - VSCode TypeScript Language Server (better support for moduleResolution: "bundler") + vtsls = { filetypes = { "typescript", "typescriptreact", "javascript", "javascriptreact" }, settings = { typescript = { inlayHints = { - includeInlayParameterNameHints = "all", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, + parameterNames = { enabled = "all" }, + parameterTypes = { enabled = true }, + variableTypes = { enabled = true }, + propertyDeclarationTypes = { enabled = true }, + functionLikeReturnTypes = { enabled = true }, + enumMemberValues = { enabled = true }, + }, + suggest = { + completeFunctionCalls = true, + }, + updateImportsOnFileMove = { enabled = "always" }, + -- Use project's TypeScript for proper bundler resolution support + tsserver = { + experimental = { + enableProjectDiagnostics = true, + }, }, }, javascript = { inlayHints = { - includeInlayParameterNameHints = "all", - includeInlayParameterNameHintsWhenArgumentMatchesName = false, - includeInlayFunctionParameterTypeHints = true, - includeInlayVariableTypeHints = true, - includeInlayPropertyDeclarationTypeHints = true, - includeInlayFunctionLikeReturnTypeHints = true, - includeInlayEnumMemberValueHints = true, + parameterNames = { enabled = "all" }, + parameterTypes = { enabled = true }, + variableTypes = { enabled = true }, + propertyDeclarationTypes = { enabled = true }, + functionLikeReturnTypes = { enabled = true }, + enumMemberValues = { enabled = true }, + }, + suggest = { + completeFunctionCalls = true, + }, + updateImportsOnFileMove = { enabled = "always" }, + }, + vtsls = { + enableMoveToFileCodeAction = true, + autoUseWorkspaceTsdk = true, + experimental = { + completion = { + enableServerSideFuzzyMatch = true, + }, }, }, }, @@ -244,25 +277,6 @@ return { capabilities = capabilities, }) - -- Set up TypeScript Tools with performance optimizations and error handling - require("typescript-tools").setup({ - settings = { - tsserver_plugins = {}, - tsserver_file_preferences = {}, - tsserver_format_options = {}, - -- Performance optimizations - tsserver_max_tsc_memory = 4096, -- Limit memory usage - tsserver_experimental_enableProjectDiagnostics = false, -- Disable project diagnostics for better performance - }, - -- Add error handling for TypeScript Tools - on_attach = function(client, bufnr) - if not should_attach_lsp(bufnr) then - client.stop() - return - end - end, - }) - -- Global LSP error handling vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( vim.lsp.handlers.hover, diff --git a/lua/cargdev/plugins/lsp/mason.lua b/lua/cargdev/plugins/lsp/mason.lua index 1c85a77..04d4532 100644 --- a/lua/cargdev/plugins/lsp/mason.lua +++ b/lua/cargdev/plugins/lsp/mason.lua @@ -1,3 +1,13 @@ +-- ============================================================================ +-- MASON: LSP/DAP/Linter/Formatter package manager +-- ============================================================================ +-- Manages installation of LSP servers, debuggers, linters, and formatters. +-- Uses mason-lspconfig for LSP server management and mason-tool-installer +-- for additional tools. Ensures commonly used language servers are installed: +-- CSS, Emmet, ESLint, Go, GraphQL, HTML, Java, Lua, Prisma, Python, Svelte, +-- Tailwind, and TypeScript (vtsls). Also installs formatters (prettier, stylua, +-- black, isort) and debuggers (debugpy, java-debug-adapter, js-debug-adapter). +-- ============================================================================ return { "williamboman/mason.nvim", dependencies = { @@ -39,7 +49,11 @@ return { "pyright", "svelte", "tailwindcss", - "ts_ls", + "vtsls", -- VSCode TypeScript Language Server + }, + -- Prevent ts_ls from auto-starting (we use vtsls instead) + handlers = { + ["ts_ls"] = function() end, -- noop handler to skip ts_ls }, }) diff --git a/lua/cargdev/plugins/lspsaga.lua b/lua/cargdev/plugins/lspsaga.lua index dcb1d0a..7e3d0eb 100644 --- a/lua/cargdev/plugins/lspsaga.lua +++ b/lua/cargdev/plugins/lspsaga.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- LSPSAGA: Enhanced LSP UI with floating windows +-- ============================================================================ +-- Beautiful UI for LSP features: code actions, hover docs, rename, outline, +-- diagnostics, call hierarchy. Provides better UX than default LSP handlers. +-- Has DiagnosticChanged autocmd to update virtual text on diagnostic changes. +-- ============================================================================ return { "nvimdev/lspsaga.nvim", dependencies = { diff --git a/lua/cargdev/plugins/lualine.lua b/lua/cargdev/plugins/lualine.lua index dbf619e..fb7cf35 100644 --- a/lua/cargdev/plugins/lualine.lua +++ b/lua/cargdev/plugins/lualine.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- LUALINE: Statusline with mode, git, diagnostics, and more +-- ============================================================================ +-- Customizable statusline at the bottom showing: mode, git branch, filename, +-- diagnostics, encoding, filetype, position. Uses rainbow colors inspired +-- by powerlevel10k. Shows lazy.nvim update count and word count. +-- ============================================================================ return { "nvim-lualine/lualine.nvim", dependencies = { "nvim-tree/nvim-web-devicons" }, diff --git a/lua/cargdev/plugins/marks.lua b/lua/cargdev/plugins/marks.lua index d39a7d4..e7def4f 100644 --- a/lua/cargdev/plugins/marks.lua +++ b/lua/cargdev/plugins/marks.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- MARKS: Enhanced marks with visual indicators +-- ============================================================================ +-- Shows marks in the sign column and provides better mark management. +-- Supports bookmarks with annotations. Has BufDelete autocmd to clean up +-- marks when buffers are deleted (marks._on_delete). +-- ============================================================================ return { "chentoast/marks.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/mcphub.lua b/lua/cargdev/plugins/mcphub.lua index 0278803..8a039f9 100644 --- a/lua/cargdev/plugins/mcphub.lua +++ b/lua/cargdev/plugins/mcphub.lua @@ -1,3 +1,20 @@ +-- ============================================================================ +-- MCPHUB: Model Context Protocol server manager for Neovim +-- ============================================================================ +-- A plugin for managing MCP (Model Context Protocol) servers, enabling +-- integration between Neovim and AI/LLM tools. Acts as a hub for connecting +-- to various MCP-compatible servers and services. +-- +-- Features: +-- - Manages MCP server connections via mcp-hub binary +-- - Configurable server timeout and auto-approval settings +-- - Floating window UI for server management +-- - Integration with chat plugins for AI-assisted coding +-- - Support for custom native Lua servers +-- +-- Config location: ~/.config/mcphub/servers.json +-- Default port: 37373 +-- ============================================================================ return { "ravitemer/mcphub.nvim", dependencies = { diff --git a/lua/cargdev/plugins/mini-animate.lua b/lua/cargdev/plugins/mini-animate.lua deleted file mode 100644 index edd063c..0000000 --- a/lua/cargdev/plugins/mini-animate.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - "echasnovski/mini.animate", - event = "VeryLazy", - opts = function() - local animate = require("mini.animate") - return { - cursor = { - enable = true, - timing = animate.gen_timing.linear({ duration = 50, unit = "total" }), - }, - scroll = { - enable = false, -- Disabled for performance - }, - resize = { - enable = false, -- Disabled for performance - }, - open = { - enable = false, -- Disabled for performance - }, - close = { - enable = false, -- Disabled for performance - }, - } - end, -} diff --git a/lua/cargdev/plugins/modicator.lua b/lua/cargdev/plugins/modicator.lua index 1e916f3..5659006 100644 --- a/lua/cargdev/plugins/modicator.lua +++ b/lua/cargdev/plugins/modicator.lua @@ -1,3 +1,17 @@ +-- ============================================================================ +-- MODICATOR: Cursor line number mode indicator +-- ============================================================================ +-- A plugin that changes the color of the cursor line number based on the +-- current Vim mode (normal, insert, visual, etc.). Provides visual feedback +-- for mode changes directly in the line number column. +-- +-- Features: +-- - Color-coded line numbers by mode +-- - Lualine integration for consistent theming +-- - Bold highlighting for better visibility +-- +-- Requirements: cursorline and number options are enabled automatically. +-- ============================================================================ return { "mawkler/modicator.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/navbuddy.lua b/lua/cargdev/plugins/navbuddy.lua index 59b7c12..d8f0eea 100644 --- a/lua/cargdev/plugins/navbuddy.lua +++ b/lua/cargdev/plugins/navbuddy.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- NAVBUDDY: Symbol navigation +-- ============================================================================ +-- LSP-powered breadcrumb-style symbol navigator with popup interface. +-- Browse and jump to functions, classes, variables via hierarchical view. +-- Keymap: nb to open Navbuddy popup. Requires LSP attachment. +-- ============================================================================ + return { "SmiteshP/nvim-navbuddy", dependencies = { diff --git a/lua/cargdev/plugins/neogit.lua b/lua/cargdev/plugins/neogit.lua index cbf7cd4..02a2ed6 100644 --- a/lua/cargdev/plugins/neogit.lua +++ b/lua/cargdev/plugins/neogit.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- NEOGIT: Magit-style Git client for Neovim +-- ============================================================================ +-- Full-featured Git interface inspired by Emacs Magit with interactive staging. +-- Integrates with diffview.nvim for side-by-side diffs and telescope for fuzzy finding. +-- Keymaps: gn (open), gnc (commit), gnp (push), gnl (pull), gnb (branch). +-- ============================================================================ + return { "NeogitOrg/neogit", dependencies = { diff --git a/lua/cargdev/plugins/noice.lua b/lua/cargdev/plugins/noice.lua index a891597..7801c67 100644 --- a/lua/cargdev/plugins/noice.lua +++ b/lua/cargdev/plugins/noice.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- NOICE: Replaces cmdline, messages, and popupmenu with modern UI +-- ============================================================================ +-- Complete UI overhaul: floating cmdline at center, message notifications, +-- LSP progress indicators, search count. Has BufDelete autocmd to clean up +-- message history when buffers close. Uses nui.nvim for rendering. +-- ============================================================================ return { "folke/noice.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/nvim-cmp.lua b/lua/cargdev/plugins/nvim-cmp.lua index 100f92c..eef7ed9 100644 --- a/lua/cargdev/plugins/nvim-cmp.lua +++ b/lua/cargdev/plugins/nvim-cmp.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- NVIM-CMP: Autocompletion engine +-- ============================================================================ +-- Main completion plugin with multiple sources: LSP, buffer, path, snippets, +-- copilot. Shows completion menu with icons. LuaSnip for snippet expansion. +-- Tab/Shift-Tab to navigate, Enter to confirm, C-Space to trigger manually. +-- ============================================================================ return { "hrsh7th/nvim-cmp", event = "InsertEnter", diff --git a/lua/cargdev/plugins/nvim-highlight-colors.lua b/lua/cargdev/plugins/nvim-highlight-colors.lua index 0a85609..2b17a9a 100644 --- a/lua/cargdev/plugins/nvim-highlight-colors.lua +++ b/lua/cargdev/plugins/nvim-highlight-colors.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- nvim-highlight-colors: Color highlighting +-- ============================================================================ +-- Highlights color codes in your files with their actual colors as background. +-- Supports hex (#fff, #ffffff), RGB, HSL, CSS named colors, and CSS variables. +-- Renders colors inline making it easy to visualize color values in stylesheets. +-- ============================================================================ + return { "brenoprata10/nvim-highlight-colors", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/nvim-jdtls.lua b/lua/cargdev/plugins/nvim-jdtls.lua index 4dda888..f4e3ce9 100644 --- a/lua/cargdev/plugins/nvim-jdtls.lua +++ b/lua/cargdev/plugins/nvim-jdtls.lua @@ -1,3 +1,18 @@ +-- ============================================================================ +-- NVIM-JDTLS: Enhanced Java LSP support for Neovim +-- ============================================================================ +-- A plugin that provides extended Java development capabilities using the +-- Eclipse JDT Language Server (jdtls). Offers features beyond standard LSP +-- including code generation, refactoring, and debugging support. +-- +-- Features: +-- - Full Java LSP support via Eclipse jdtls +-- - Code actions, refactoring, and organize imports +-- - Integration with nvim-dap for Java debugging +-- - Support for Maven and Gradle projects +-- +-- Loads automatically for Java files (ft = "java"). +-- ============================================================================ return { "mfussenegger/nvim-jdtls", ft = "java", diff --git a/lua/cargdev/plugins/nvim-lightbulb.lua b/lua/cargdev/plugins/nvim-lightbulb.lua index 87c4754..c6c18d5 100644 --- a/lua/cargdev/plugins/nvim-lightbulb.lua +++ b/lua/cargdev/plugins/nvim-lightbulb.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- nvim-lightbulb: Code actions indicator +-- ============================================================================ +-- Shows a lightbulb icon in the sign column when LSP code actions are available. +-- Triggers on LspAttach event to check for available actions at cursor position. +-- Provides visual feedback without needing to manually query for code actions. +-- ============================================================================ + return { "kosayoda/nvim-lightbulb", event = "LspAttach", diff --git a/lua/cargdev/plugins/nvim-tree.lua b/lua/cargdev/plugins/nvim-tree.lua index 4a83a99..dac26bb 100644 --- a/lua/cargdev/plugins/nvim-tree.lua +++ b/lua/cargdev/plugins/nvim-tree.lua @@ -1,20 +1,20 @@ +-- ============================================================================ +-- NVIM-TREE: File explorer sidebar +-- ============================================================================ +-- Tree-style file browser on the left side. Keymaps: a=create, d=delete, +-- r=rename, o=open, s=vsplit, i=hsplit, u=parent dir. Has BufWipeout autocmd +-- to track deleted file buffers. Disables netrw (vim's built-in explorer). +-- ============================================================================ return { "nvim-tree/nvim-tree.lua", dependencies = "ryanoasis/vim-devicons", - config = function() - local nvimtree = require("nvim-tree") - - -- recommended settings from nvim-tree documentation + init = function() + -- Disable netrw before it loads (must be in init, not config) vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 - - -- 🧼 Remove invalid autocommand (FileExplorer) if it exists - vim.api.nvim_create_autocmd("VimEnter", { - once = true, - callback = function() - pcall(vim.cmd, "autocmd! FileExplorer *") - end, - }) + end, + config = function() + local nvimtree = require("nvim-tree") nvimtree.setup({ view = { diff --git a/lua/cargdev/plugins/nvim-treesitter-context.lua b/lua/cargdev/plugins/nvim-treesitter-context.lua index 0a4db2e..7f83b8f 100644 --- a/lua/cargdev/plugins/nvim-treesitter-context.lua +++ b/lua/cargdev/plugins/nvim-treesitter-context.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- nvim-treesitter-context: Shows context at top of screen +-- ============================================================================ +-- Displays the current code context (function, class, etc.) at the top of the +-- buffer as you scroll. Uses treesitter to determine scope boundaries. +-- Helps maintain awareness of where you are in deeply nested code structures. +-- ============================================================================ + return { "nvim-treesitter/nvim-treesitter-context", dependencies = { "nvim-treesitter/nvim-treesitter" }, diff --git a/lua/cargdev/plugins/nvim-treesitter-text-objects.lua b/lua/cargdev/plugins/nvim-treesitter-text-objects.lua index 495639c..0b2c66a 100644 --- a/lua/cargdev/plugins/nvim-treesitter-text-objects.lua +++ b/lua/cargdev/plugins/nvim-treesitter-text-objects.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- nvim-treesitter-textobjects: Text objects based on treesitter +-- ============================================================================ +-- Provides syntax-aware text objects for selecting, moving, and swapping code. +-- Enables motions like "select around function" (vaf) or "select inner class" (vic). +-- Also supports jumping between functions, classes, and other treesitter nodes. +-- ============================================================================ + return { { "nvim-treesitter/nvim-treesitter-textobjects", diff --git a/lua/cargdev/plugins/nvim-ts-autotag.lua b/lua/cargdev/plugins/nvim-ts-autotag.lua index c6eae42..328037c 100644 --- a/lua/cargdev/plugins/nvim-ts-autotag.lua +++ b/lua/cargdev/plugins/nvim-ts-autotag.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- NVIM-TS-AUTOTAG: Auto close and rename HTML/XML tags +-- ============================================================================ +-- Automatically closes HTML/XML tags when you type '>'. Also renames matching +-- tags when you edit one. Uses treesitter for accurate tag detection. +-- Has BufDelete autocmd to clean up tag tracking when buffers close. +-- ============================================================================ return { "windwp/nvim-ts-autotag", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/octo.lua b/lua/cargdev/plugins/octo.lua index 56dc705..e80d6be 100644 --- a/lua/cargdev/plugins/octo.lua +++ b/lua/cargdev/plugins/octo.lua @@ -1,3 +1,25 @@ +-- ============================================================================ +-- OCTO: GitHub integration for Neovim +-- ============================================================================ +-- A plugin that brings GitHub functionality directly into Neovim, allowing +-- you to manage issues, pull requests, and repositories without leaving +-- your editor. Uses Telescope for browsing and searching. +-- +-- Keymaps (leader: o): +-- oi - List issues +-- oI - Create new issue +-- op - List pull requests +-- oP - Create new pull request +-- or - List repositories +-- os - Search issues/PRs +-- oa - Show available Octo actions +-- +-- Picker mappings: +-- - Open in browser +-- - Copy URL to clipboard +-- - Checkout PR +-- - Merge PR +-- ============================================================================ return { "pwntester/octo.nvim", dependencies = { diff --git a/lua/cargdev/plugins/outline.lua b/lua/cargdev/plugins/outline.lua index a64600e..d045938 100644 --- a/lua/cargdev/plugins/outline.lua +++ b/lua/cargdev/plugins/outline.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- OUTLINE.NVIM: Code outline and symbol sidebar +-- ============================================================================ +-- Displays a tree-view of symbols (functions, classes, variables) from LSP. +-- Opens on the right side with auto-follow and preview on hover features. +-- Toggle with cs to quickly navigate code structure. +-- ============================================================================ + return { "hedyhli/outline.nvim", cmd = { "Outline", "OutlineOpen" }, diff --git a/lua/cargdev/plugins/overseer.lua b/lua/cargdev/plugins/overseer.lua index 896525b..366b943 100644 --- a/lua/cargdev/plugins/overseer.lua +++ b/lua/cargdev/plugins/overseer.lua @@ -1,3 +1,15 @@ +-- ============================================================================ +-- OVERSEER: Task runner and job management plugin +-- ============================================================================ +-- A task runner and job manager for Neovim with support for various build +-- systems, shell commands, and custom task templates. Features include: +-- - Terminal-based task execution with DAP integration +-- - Task list panel with preview and quick actions +-- - Custom templates for npm, Python, Flutter, and Go projects +-- Keymaps: or (run), ot (toggle), oa (action), +-- oq (quick action), ob (build), oc (cmd) +-- ============================================================================ + return { "stevearc/overseer.nvim", cmd = { diff --git a/lua/cargdev/plugins/package-info.lua b/lua/cargdev/plugins/package-info.lua index 1518e8b..cbd520f 100644 --- a/lua/cargdev/plugins/package-info.lua +++ b/lua/cargdev/plugins/package-info.lua @@ -1,3 +1,13 @@ +-- ============================================================================ +-- PACKAGE-INFO: NPM package version viewer and manager +-- ============================================================================ +-- Displays package version information inline in package.json files. +-- Shows outdated packages with visual indicators and allows managing +-- dependencies directly from the editor. +-- Keymaps: ns (show), nh (hide), nu (update), +-- nd (delete), ni (install), nc (change ver) +-- ============================================================================ + return { "vuki656/package-info.nvim", dependencies = { "MunifTanjim/nui.nvim" }, diff --git a/lua/cargdev/plugins/persistence.lua b/lua/cargdev/plugins/persistence.lua deleted file mode 100644 index 359d472..0000000 --- a/lua/cargdev/plugins/persistence.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "folke/persistence.nvim", - event = "BufReadPre", - opts = { - dir = vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/"), - options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" }, - pre_save = nil, - save_empty = false, - }, - keys = { - { "ss", function() require("persistence").load() end, desc = "Restore session" }, - { "sl", function() require("persistence").load({ last = true }) end, desc = "Restore last session" }, - { "sd", function() require("persistence").stop() end, desc = "Don't save session" }, - }, -} diff --git a/lua/cargdev/plugins/portal.lua b/lua/cargdev/plugins/portal.lua index a5e5024..a02586a 100644 --- a/lua/cargdev/plugins/portal.lua +++ b/lua/cargdev/plugins/portal.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- PORTAL: Jump list navigation +-- ============================================================================ +-- Visual popup for navigating jump lists, change lists, and quickfix lists. +-- Displays preview windows for each jump location before selection. +-- Keymaps: pj/pk for jumplist, pc for changelist, pq for quickfix. +-- ============================================================================ + return { "cbochs/portal.nvim", dependencies = { "cbochs/grapple.nvim" }, diff --git a/lua/cargdev/plugins/precognition.lua b/lua/cargdev/plugins/precognition.lua index e8c3a6c..6bcc982 100644 --- a/lua/cargdev/plugins/precognition.lua +++ b/lua/cargdev/plugins/precognition.lua @@ -1,3 +1,13 @@ +-- ============================================================================ +-- PRECOGNITION: Vim motion hints and navigation helper +-- ============================================================================ +-- Displays virtual text hints showing where motion keys (w, b, e, W, B, E, +-- ^, $, 0, %) will take you, helping learn and improve Vim navigation. +-- Also shows gutter hints for vertical motions (gg, G, {, }). +-- Starts hidden by default, can be toggled on demand. +-- Keymaps: vp (toggle), vP (peek) +-- ============================================================================ + return { "tris203/precognition.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/reactive.lua b/lua/cargdev/plugins/reactive.lua index 4cd1df0..53478e2 100644 --- a/lua/cargdev/plugins/reactive.lua +++ b/lua/cargdev/plugins/reactive.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- reactive: Reactive cursor mode colors +-- ============================================================================ +-- Changes cursor and cursorline colors dynamically based on the current mode. +-- Integrates with catppuccin-mocha theme for consistent color schemes. +-- Provides visual feedback for Normal, Insert, Visual, and other Vim modes. +-- ============================================================================ + return { "rasulomaroff/reactive.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/regexplainer.lua b/lua/cargdev/plugins/regexplainer.lua index 14e7a09..3e17822 100644 --- a/lua/cargdev/plugins/regexplainer.lua +++ b/lua/cargdev/plugins/regexplainer.lua @@ -1,3 +1,12 @@ +-- ============================================================================ +-- REGEXPLAINER: Human-readable regex explanations +-- ============================================================================ +-- Parses regular expressions under the cursor and displays a human-readable +-- narrative explanation in a popup window. Uses Treesitter for accurate +-- parsing across multiple languages including JS/TS, Lua, Python, Go, Rust. +-- Keymap: rx (toggle explanation popup) +-- ============================================================================ + return { "bennypowers/nvim-regexplainer", dependencies = { diff --git a/lua/cargdev/plugins/render-markdown.lua b/lua/cargdev/plugins/render-markdown.lua index 58774c9..edcde5a 100644 --- a/lua/cargdev/plugins/render-markdown.lua +++ b/lua/cargdev/plugins/render-markdown.lua @@ -1,3 +1,13 @@ +-- ============================================================================ +-- RENDER-MARKDOWN: Beautiful markdown rendering in Neovim +-- ============================================================================ +-- Renders markdown files with enhanced visual elements including styled +-- headings, code blocks with syntax highlighting, bullet points, checkboxes, +-- tables, blockquotes, callouts (NOTE/TIP/WARNING), and links with icons. +-- Uses conceal and virtual text for a clean, readable document appearance. +-- Supports markdown, norg, rmd, and org filetypes. +-- ============================================================================ + return { "MeanderingProgrammer/render-markdown.nvim", dependencies = { diff --git a/lua/cargdev/plugins/satellite.lua b/lua/cargdev/plugins/satellite.lua index 1af45f1..19b0192 100644 --- a/lua/cargdev/plugins/satellite.lua +++ b/lua/cargdev/plugins/satellite.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- SATELLITE.NVIM: Decorated scrollbar with diagnostic indicators +-- ============================================================================ +-- Displays a scrollbar on the right side showing buffer position and markers. +-- Shows diagnostics, git hunks, search results, and marks in the scrollbar. +-- Excluded from special buffers like NvimTree, help, terminal, and lazy. +-- ============================================================================ + return { "lewis6991/satellite.nvim", event = { "BufReadPost", "BufNewFile" }, diff --git a/lua/cargdev/plugins/screenkey.lua b/lua/cargdev/plugins/screenkey.lua deleted file mode 100644 index 415d9a4..0000000 --- a/lua/cargdev/plugins/screenkey.lua +++ /dev/null @@ -1,66 +0,0 @@ -return { - "NStefan002/screenkey.nvim", - lazy = false, - version = "*", - opts = { - win_opts = { - row = vim.o.lines - vim.o.cmdheight - 1, - col = vim.o.columns - 1, - relative = "editor", - anchor = "SE", - width = 40, - height = 3, - border = "rounded", - }, - compress_after = 3, - clear_after = 3, - disable = { - filetypes = { "toggleterm" }, - buftypes = { "terminal" }, - events = false, - }, - show_leader = true, - group_mappings = false, - display_infront = {}, - display_behind = {}, - filter = function(keys) - return keys - end, - keys = { - [""] = "󰌒", - [""] = "󰌑", - [""] = "Esc", - [""] = "␣", - [""] = "󰌥", - [""] = "Del", - [""] = "", - [""] = "", - [""] = "", - [""] = "", - [""] = "Home", - [""] = "End", - [""] = "PgUp", - [""] = "PgDn", - [""] = "Ins", - [""] = "󱊫", - [""] = "󱊬", - [""] = "󱊭", - [""] = "󱊮", - [""] = "󱊯", - [""] = "󱊰", - [""] = "󱊱", - [""] = "󱊲", - [""] = "󱊳", - [""] = "󱊴", - [""] = "󱊵", - [""] = "󱊶", - ["CTRL"] = "Ctrl", - ["ALT"] = "Alt", - ["SUPER"] = "󰀏", - [""] = "", - }, - }, - keys = { - { "sk", "Screenkey", desc = "Toggle Screenkey" }, - }, -} diff --git a/lua/cargdev/plugins/ship.lua b/lua/cargdev/plugins/ship.lua deleted file mode 100644 index cc71304..0000000 --- a/lua/cargdev/plugins/ship.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - "seandewar/killersheep.nvim", - event = "VeryLazy", - dependencies = { - "nvim-lua/plenary.nvim", -- Required dependency for killersheep.nvim - }, - config = function() - require("killersheep").setup({ - gore = true, -- Enables/disables blood and gore. - keymaps = { - move_left = "h", -- Keymap to move cannon to the left. - move_right = "l", -- Keymap to move cannon to the right. - shoot = "", -- Keymap to shoot the cannon. - }, - }) - end, -} diff --git a/lua/cargdev/plugins/snacks.lua b/lua/cargdev/plugins/snacks.lua index 7770d84..f6715ee 100644 --- a/lua/cargdev/plugins/snacks.lua +++ b/lua/cargdev/plugins/snacks.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- SNACKS: Collection of small QoL plugins by folke +-- ============================================================================ +-- All-in-one plugin with: dashboard (start screen), bufdelete (smart buffer +-- close), bigfile (disable features for large files), notifier, input/select +-- UI, lazygit integration, terminal, and more. Has BufDelete/BufWipeout +-- autocmds to show dashboard when last buffer closes. +-- ============================================================================ return { "folke/snacks.nvim", lazy = false, @@ -6,6 +14,7 @@ return { local dashboard_config = require("cargdev.core.dashboard_config") require("snacks").setup({ bigfile = { enabled = true }, + bufdelete = { enabled = true }, dashboard = { enabled = true, width = 40, diff --git a/lua/cargdev/plugins/ssr.lua b/lua/cargdev/plugins/ssr.lua index cab049c..8aa0a1f 100644 --- a/lua/cargdev/plugins/ssr.lua +++ b/lua/cargdev/plugins/ssr.lua @@ -1,3 +1,17 @@ +-- ============================================================================ +-- SSR.NVIM: Structural Search and Replace +-- ============================================================================ +-- Provides syntax-aware search and replace using Treesitter for intelligent +-- code transformations. Unlike regex-based search/replace, it understands +-- code structure and can match patterns based on AST nodes. +-- +-- Keymaps: +-- sR - Open structural search/replace (normal and visual mode) +-- q - Close the SSR window +-- n/N - Navigate to next/previous match +-- - Confirm replacement +-- - Replace all matches +-- ============================================================================ return { "cshuaimin/ssr.nvim", keys = { diff --git a/lua/cargdev/plugins/substitute.lua b/lua/cargdev/plugins/substitute.lua index d0bd8d9..c600fe1 100644 --- a/lua/cargdev/plugins/substitute.lua +++ b/lua/cargdev/plugins/substitute.lua @@ -1,3 +1,16 @@ +-- ============================================================================ +-- SUBSTITUTE.NVIM: Enhanced Text Substitution +-- ============================================================================ +-- Provides improved substitution operators for Neovim. Allows quick text +-- replacement using motions, making it easy to substitute text with the +-- contents of a register. +-- +-- Keymaps: +-- ss - Substitute entire line +-- s - Substitute with motion +-- S - Substitute to end of line +-- s (visual) - Substitute in visual selection +-- ============================================================================ return { "gbprod/substitute.nvim", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/sudoku.lua b/lua/cargdev/plugins/sudoku.lua deleted file mode 100644 index 06e72dc..0000000 --- a/lua/cargdev/plugins/sudoku.lua +++ /dev/null @@ -1,41 +0,0 @@ -return { - "jim-fx/sudoku.nvim", - event = "VeryLazy", - config = function() - require("sudoku").setup({ - persist_settings = true, -- safe the settings under vim.fn.stdpath("data"), usually ~/.local/share/nvim, - persist_games = true, -- persist a history of all played games - default_mappings = true, -- if set to false you need to set your own, like the following: - mappings = { - { key = "x", action = "clear_cell" }, - { key = "r1", action = "insert=1" }, - { key = "r2", action = "insert=2" }, - { key = "r3", action = "insert=3" }, - { key = "r9", action = "insert=9" }, - { key = "gn", action = "new_game" }, - { key = "gr", action = "reset_game" }, - { key = "gs", action = "view=settings" }, - { key = "gt", action = "view=tip" }, - { key = "gz", action = "view=zen" }, - { key = "gh", action = "view=help" }, - { key = "u", action = "undo" }, - { key = "", action = "redo" }, - { key = "+", action = "increment" }, - { key = "-", action = "decrement" }, - }, - custom_highlights = { - board = { fg = "#7d7d7d" }, - number = { fg = "white", bg = "black" }, - active_menu = { fg = "white", bg = "black", gui = "bold" }, - hint_cell = { fg = "white", bg = "yellow" }, - square = { bg = "#292b35", fg = "white" }, - column = { bg = "#14151a", fg = "#d5d5d5" }, - row = { bg = "#14151a", fg = "#d5d5d5" }, - settings_disabled = { fg = "#8e8e8e", gui = "italic" }, - same_number = { fg = "white", gui = "bold" }, - set_number = { fg = "white", gui = "italic" }, - error = { fg = "white", bg = "#843434" }, - }, - }) - end, -} diff --git a/lua/cargdev/plugins/surround.lua b/lua/cargdev/plugins/surround.lua index 77f5073..e11baaf 100644 --- a/lua/cargdev/plugins/surround.lua +++ b/lua/cargdev/plugins/surround.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- SURROUND: Add/change/delete surroundings +-- ============================================================================ +-- Easily add, change, or delete surrounding pairs (quotes, brackets, tags, etc.) +-- Use ys{motion}{char} to add, cs{old}{new} to change, ds{char} to delete. +-- Works with text objects: ysiw" surrounds word with quotes, cs"' changes " to '. +-- ============================================================================ + return { "kylechui/nvim-surround", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/telescope.lua b/lua/cargdev/plugins/telescope.lua index 59262e8..d234159 100644 --- a/lua/cargdev/plugins/telescope.lua +++ b/lua/cargdev/plugins/telescope.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- TELESCOPE: Fuzzy finder for files, grep, buffers, and more +-- ============================================================================ +-- The main search interface. Find files, grep text, search buffers, git +-- commits, LSP symbols, etc. Uses fzf-native for fast matching. Integrates +-- with many other plugins (todo-comments, dap, etc). ff for files. +-- ============================================================================ return { "nvim-telescope/telescope.nvim", branch = "0.1.x", diff --git a/lua/cargdev/plugins/termcolor.lua b/lua/cargdev/plugins/termcolor.lua index 27ff684..ac08660 100644 --- a/lua/cargdev/plugins/termcolor.lua +++ b/lua/cargdev/plugins/termcolor.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- LOG-HIGHLIGHT.NVIM: Syntax Highlighting for Log Files +-- ============================================================================ +-- Provides syntax highlighting for various log file formats. Automatically +-- detects and highlights log levels (INFO, WARN, ERROR, DEBUG, etc.), +-- timestamps, and other common log patterns for improved readability. +-- ============================================================================ return { "fei6409/log-highlight.nvim", config = function() diff --git a/lua/cargdev/plugins/tiny-inline-diagnostic.lua b/lua/cargdev/plugins/tiny-inline-diagnostic.lua index 8d8d93c..79373e9 100644 --- a/lua/cargdev/plugins/tiny-inline-diagnostic.lua +++ b/lua/cargdev/plugins/tiny-inline-diagnostic.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- TINY-INLINE-DIAGNOSTIC: Pretty inline diagnostic messages +-- ============================================================================ +-- Replaces default virtual text diagnostics with prettier inline messages. +-- Shows errors/warnings with icons and better formatting. Disables default +-- diagnostic virtual_text. Has DiagnosticChanged autocmd to update display. +-- ============================================================================ return { "rachartier/tiny-inline-diagnostic.nvim", event = "LspAttach", diff --git a/lua/cargdev/plugins/tmux.lua b/lua/cargdev/plugins/tmux.lua index 2ee866a..603138b 100644 --- a/lua/cargdev/plugins/tmux.lua +++ b/lua/cargdev/plugins/tmux.lua @@ -1,3 +1,17 @@ +-- ============================================================================ +-- VIM-TMUX-NAVIGATOR: Seamless Navigation Between Vim and Tmux +-- ============================================================================ +-- Enables seamless navigation between Neovim splits and tmux panes using +-- consistent keybindings. Uses to move between panes regardless +-- of whether they are Neovim splits or tmux panes. +-- +-- Default Keymaps (provided by plugin): +-- - Navigate left +-- - Navigate down +-- - Navigate up +-- - Navigate right +-- - Navigate to previous pane +-- ============================================================================ return { "christoomey/vim-tmux-navigator", event = "VeryLazy", -- Loads only when needed diff --git a/lua/cargdev/plugins/todo-comments.lua b/lua/cargdev/plugins/todo-comments.lua index f74baa9..645eb0b 100644 --- a/lua/cargdev/plugins/todo-comments.lua +++ b/lua/cargdev/plugins/todo-comments.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- TODO-COMMENTS: Highlight TODOs +-- ============================================================================ +-- Highlights and searches TODO, FIXME, HACK, NOTE, and other comment keywords. +-- Jump between todos with ]t and [t. Integrates with Telescope for project-wide +-- todo searching. Each keyword type gets distinct highlighting and icons. +-- ============================================================================ + return { "folke/todo-comments.nvim", event = { "BufReadPre", "BufNewFile" }, diff --git a/lua/cargdev/plugins/transparence.lua b/lua/cargdev/plugins/transparence.lua index 66e8782..6c54f0a 100644 --- a/lua/cargdev/plugins/transparence.lua +++ b/lua/cargdev/plugins/transparence.lua @@ -1,3 +1,17 @@ +-- ============================================================================ +-- TRANSPARENT.NVIM: Background Transparency for Neovim +-- ============================================================================ +-- Removes background colors from highlight groups to achieve a transparent +-- background effect, allowing terminal background to show through. Supports +-- many built-in and plugin highlight groups including NvimTree, Telescope, +-- WhichKey, BufferLine, NeoTree, and Lualine. +-- +-- Commands: +-- :TransparentToggle - Toggle transparency on/off +-- +-- Automatically clears background for BufferLine, NeoTree, and Lualine +-- prefixed highlight groups on startup. +-- ============================================================================ return { "xiyaowong/transparent.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/treesitter.lua b/lua/cargdev/plugins/treesitter.lua index 371d29e..2e84efb 100644 --- a/lua/cargdev/plugins/treesitter.lua +++ b/lua/cargdev/plugins/treesitter.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- TREESITTER: Syntax parsing for better highlighting and code understanding +-- ============================================================================ +-- Core plugin for modern syntax highlighting, code folding, and text objects. +-- Parses code into AST for accurate highlighting. Many plugins depend on it +-- (autopairs, comments, autotag, etc). Auto-installs parsers for languages. +-- ============================================================================ return { "nvim-treesitter/nvim-treesitter", event = { "BufReadPost", "BufNewFile" }, -- Changed from BufReadPre to BufReadPost for better performance diff --git a/lua/cargdev/plugins/treesj.lua b/lua/cargdev/plugins/treesj.lua index c69df3f..a2dde1a 100644 --- a/lua/cargdev/plugins/treesj.lua +++ b/lua/cargdev/plugins/treesj.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- TREESJ: Split/join code blocks +-- ============================================================================ +-- Treesitter-powered splitting and joining of code blocks (arrays, objects, args). +-- Toggle between single-line and multi-line formats with smart formatting. +-- Keymaps: tj toggle, ts split, tJ join. +-- ============================================================================ + return { "Wansmer/treesj", dependencies = { "nvim-treesitter/nvim-treesitter" }, diff --git a/lua/cargdev/plugins/trouble.lua b/lua/cargdev/plugins/trouble.lua index 6de76ac..5f0cc37 100644 --- a/lua/cargdev/plugins/trouble.lua +++ b/lua/cargdev/plugins/trouble.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- TROUBLE: Pretty diagnostics, quickfix, and todo list +-- ============================================================================ +-- Shows all diagnostics/errors in a clean list view. Navigate and fix issues +-- quickly. Also shows todo comments, quickfix, and location lists in the +-- same unified interface. xw for workspace diagnostics. +-- ============================================================================ return { "folke/trouble.nvim", dependencies = { "nvim-tree/nvim-web-devicons", "folke/todo-comments.nvim" }, diff --git a/lua/cargdev/plugins/ts-comments.lua b/lua/cargdev/plugins/ts-comments.lua index 32732ba..731ed03 100644 --- a/lua/cargdev/plugins/ts-comments.lua +++ b/lua/cargdev/plugins/ts-comments.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- TS-COMMENTS: Treesitter-based comment string detection +-- ============================================================================ +-- Enhances Neovim's native commenting by using treesitter to detect the correct +-- comment style based on the current context (e.g., JSX vs JavaScript). +-- Works seamlessly with Neovim's built-in gc/gcc comment operators. +-- ============================================================================ + return { "folke/ts-comments.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/twilight.lua b/lua/cargdev/plugins/twilight.lua index 72b27d0..552e0c5 100644 --- a/lua/cargdev/plugins/twilight.lua +++ b/lua/cargdev/plugins/twilight.lua @@ -1,3 +1,13 @@ +-- ============================================================================ +-- TWILIGHT: Focus mode with dimming for distraction-free coding +-- ============================================================================ +-- Dims inactive portions of code to help focus on the current context. +-- Uses treesitter to intelligently expand functions, methods, tables, and +-- if statements. Configurable dimming with alpha and color settings. +-- Keymaps: +-- zt - Toggle Twilight focus mode +-- ============================================================================ + return { "folke/twilight.nvim", cmd = { "Twilight", "TwilightEnable", "TwilightDisable" }, diff --git a/lua/cargdev/plugins/ufo.lua b/lua/cargdev/plugins/ufo.lua index 945101f..66ea551 100644 --- a/lua/cargdev/plugins/ufo.lua +++ b/lua/cargdev/plugins/ufo.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- UFO: Modern folding with LSP/treesitter support +-- ============================================================================ +-- Better code folding using LSP or treesitter. Shows fold preview on hover. +-- zR to open all folds, zM to close all. Includes statuscol for fold icons +-- in the gutter. Has OptionSet autocmd to track folding option changes. +-- ============================================================================ return { "kevinhwang91/nvim-ufo", dependencies = { diff --git a/lua/cargdev/plugins/undotree.lua b/lua/cargdev/plugins/undotree.lua index 5fe2bb0..4155f92 100644 --- a/lua/cargdev/plugins/undotree.lua +++ b/lua/cargdev/plugins/undotree.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- UNDOTREE: Visual undo history +-- ============================================================================ +-- Visualizes Vim's undo tree as a navigable sidebar. Unlike linear undo, this +-- lets you access all previous states including branches. Toggle with tu. +-- Shows diff panel and timestamps for each change state. +-- ============================================================================ + return { "mbbill/undotree", cmd = "UndotreeToggle", diff --git a/lua/cargdev/plugins/venv-selector.lua b/lua/cargdev/plugins/venv-selector.lua index 45879a7..0b62f43 100644 --- a/lua/cargdev/plugins/venv-selector.lua +++ b/lua/cargdev/plugins/venv-selector.lua @@ -1,3 +1,16 @@ +-- ============================================================================ +-- VENV-SELECTOR: Python virtual environment manager +-- ============================================================================ +-- Provides a Telescope-based picker to select and activate Python virtual +-- environments. Supports multiple venv types: anaconda, pipenv, poetry, hatch, +-- pyenv, and standard virtualenvs. Automatically activates cached venvs. +-- Keymaps: +-- vs - Open venv selector picker +-- vc - Select cached venv +-- Autocmd: +-- Auto-retrieves cached venv when opening Python files with pyproject.toml +-- ============================================================================ + return { "linux-cultist/venv-selector.nvim", branch = "regexp", diff --git a/lua/cargdev/plugins/vim-maximizer.lua b/lua/cargdev/plugins/vim-maximizer.lua index 869b8d7..514165d 100644 --- a/lua/cargdev/plugins/vim-maximizer.lua +++ b/lua/cargdev/plugins/vim-maximizer.lua @@ -1,3 +1,12 @@ +-- ============================================================================ +-- VIM-MAXIMIZER: Toggle window maximization +-- ============================================================================ +-- Allows toggling a split window to full screen and back. Useful when working +-- with multiple splits but needing to temporarily focus on a single window. +-- Keymaps: +-- sm - Maximize/minimize the current split window +-- ============================================================================ + return { "szw/vim-maximizer", keys = { diff --git a/lua/cargdev/plugins/vim-visual-multi.lua b/lua/cargdev/plugins/vim-visual-multi.lua index ff55e4d..e71d6dd 100644 --- a/lua/cargdev/plugins/vim-visual-multi.lua +++ b/lua/cargdev/plugins/vim-visual-multi.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- VIM-VISUAL-MULTI: Multiple cursors like VS Code +-- ============================================================================ +-- Select multiple occurrences and edit them simultaneously. to select +-- word under cursor (like VS Code), to add cursors vertically. +-- q to skip, Q to remove cursor. Vimscript plugin with some verbose log noise. +-- ============================================================================ return { "mg979/vim-visual-multi", branch = "master", @@ -8,22 +15,18 @@ return { vim.g.VM_mouse_mappings = 1 vim.g.VM_theme = "iceblue" + -- Only set PERMANENT mappings here to avoid E716 errors + -- Buffer mappings (Skip Region, Remove Region, Undo, Redo) use plugin defaults vim.g.VM_maps = { ["Find Under"] = "", -- Like VS Code Ctrl+D ["Find Subword Under"] = "", -- Like VS Code Ctrl+D ["Select All"] = "", -- Like VS Code Ctrl+Shift+L ["Add Cursor Down"] = "", -- Like VS Code ["Add Cursor Up"] = "", -- Like VS Code - ["Skip Region"] = "", -- Skip current and go to next - ["Remove Region"] = "", -- Remove current cursor (changed from C-p) - ["Undo"] = "u", - ["Redo"] = "", + ["Select Cursor Down"] = "", -- Disable (reserved for buffer navigation) + ["Select Cursor Up"] = "", -- Disable (reserved for buffer navigation) } - -- Disable C-n and C-p in vim-visual-multi (reserved for buffer navigation) - vim.g.VM_maps["Select Cursor Down"] = "" - vim.g.VM_maps["Select Cursor Up"] = "" - -- Highlight settings vim.g.VM_Mono_hl = "DiffText" vim.g.VM_Extend_hl = "DiffAdd" diff --git a/lua/cargdev/plugins/vimtex.lua b/lua/cargdev/plugins/vimtex.lua index b271a03..caaca21 100644 --- a/lua/cargdev/plugins/vimtex.lua +++ b/lua/cargdev/plugins/vimtex.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- VIMTEX: LaTeX editing and compilation support +-- ============================================================================ +-- Comprehensive LaTeX plugin providing syntax highlighting, compilation with +-- latexmk, forward/inverse search, and PDF viewing. Configured to use Skim +-- as the PDF viewer on macOS. Loads automatically for tex, latex, and bib files. +-- ============================================================================ + return { "lervag/vimtex", ft = { "tex", "latex", "bib" }, diff --git a/lua/cargdev/plugins/wakatime.lua b/lua/cargdev/plugins/wakatime.lua index 0b5a320..10aadd2 100644 --- a/lua/cargdev/plugins/wakatime.lua +++ b/lua/cargdev/plugins/wakatime.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- WAKATIME: Coding time tracking +-- ============================================================================ +-- Automatically tracks your coding activity and time spent in Neovim. +-- Sends heartbeats to WakaTime dashboard for detailed metrics and insights. +-- Configured with 2-minute heartbeat frequency and buffering for performance. +-- ============================================================================ + return { "wakatime/vim-wakatime", lazy = false, diff --git a/lua/cargdev/plugins/which-key.lua b/lua/cargdev/plugins/which-key.lua index ddad636..fe17c55 100644 --- a/lua/cargdev/plugins/which-key.lua +++ b/lua/cargdev/plugins/which-key.lua @@ -1,3 +1,10 @@ +-- ============================================================================ +-- WHICH-KEY: Keybinding popup helper +-- ============================================================================ +-- Shows available keybindings in a popup when you start a key sequence. +-- Press and wait to see all leader mappings. Helps discover and +-- remember keybindings. Also shows marks, registers, and spelling suggestions. +-- ============================================================================ return { "folke/which-key.nvim", event = "VeryLazy", diff --git a/lua/cargdev/plugins/yaml.lua b/lua/cargdev/plugins/yaml.lua index 68c982c..9d2d42e 100644 --- a/lua/cargdev/plugins/yaml.lua +++ b/lua/cargdev/plugins/yaml.lua @@ -1,3 +1,12 @@ +-- ============================================================================ +-- YAML.NVIM: YAML path navigation and utilities +-- ============================================================================ +-- Provides utilities for working with YAML files including showing the current +-- path in the document, searching by path, and jumping to keys. Integrates +-- with Telescope, fzf-lua, and snacks.nvim for fuzzy searching capabilities. +-- Requires treesitter for parsing YAML structure. +-- ============================================================================ + return { "cuducos/yaml.nvim", ft = { "yaml" }, -- optional diff --git a/lua/cargdev/plugins/yanky.lua b/lua/cargdev/plugins/yanky.lua index 0cabe93..dfdc183 100644 --- a/lua/cargdev/plugins/yanky.lua +++ b/lua/cargdev/plugins/yanky.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- YANKY: Better yank/paste +-- ============================================================================ +-- Enhanced yank and paste with a persistent yank ring stored in SQLite. +-- Cycle through yank history with / after pasting. Preserves yanks +-- across sessions and syncs with numbered registers for seamless workflow. +-- ============================================================================ + return { "gbprod/yanky.nvim", dependencies = { "kkharji/sqlite.lua" }, diff --git a/lua/cargdev/plugins/zen-mode.lua b/lua/cargdev/plugins/zen-mode.lua index 5391e9a..cdd0319 100644 --- a/lua/cargdev/plugins/zen-mode.lua +++ b/lua/cargdev/plugins/zen-mode.lua @@ -1,3 +1,11 @@ +-- ============================================================================ +-- ZEN-MODE: Distraction-free writing and coding +-- ============================================================================ +-- Centers the buffer in a clean, focused window with customizable dimensions. +-- Integrates with twilight.nvim to dim inactive code outside the cursor scope. +-- Toggle with zz; hides line numbers, signcolumn, and other distractions. +-- ============================================================================ + return { "folke/zen-mode.nvim", dependencies = { "folke/twilight.nvim" },