From aebd998cbad0ac201e0f39979439dd2cf4167c80 Mon Sep 17 00:00:00 2001 From: CelticBoozer Date: Wed, 16 Apr 2025 00:54:29 +0300 Subject: [PATCH 1/2] Rebuilded folder hierarchy --- .luacheckrc | 5 +- README.md | 24 +-- init.lua | 2 +- lazy-lock.json | 14 +- lua/core/options.lua | 2 - lua/plugin/editor/cmp-dotenv.lua | 8 - lua/plugin/editor/cmp.lua | 63 -------- lua/plugin/editor/rainbow-delimiters.lua | 29 ---- lua/plugin/editor/reactive.lua | 93 ----------- .../editor/tiny-devicons-auto-colors.lua | 20 --- lua/plugin/editor/todo-comments.lua | 41 ----- lua/plugin/editor/treesitter.lua | 45 ------ lua/plugin/editor/ufo.lua | 74 --------- lua/plugin/lazy.lua | 39 ----- lua/plugin/lsp/conform.lua | 9 +- lua/plugin/lsp/dap-ui.lua | 77 --------- lua/plugin/lsp/dap.lua | 150 ------------------ lua/plugin/lsp/garbage-day.lua | 9 -- lua/plugin/lsp/inc-rename.lua | 5 - lua/plugin/lsp/lint.lua | 22 ++- lua/plugin/lsp/lsp_signature.lua | 2 +- lua/plugin/lsp/neotest.lua | 37 ----- lua/plugin/theme/bufferline.lua | 65 -------- lua/plugin/theme/colorizer.lua | 27 ---- lua/plugin/theme/colorscheme.lua | 34 ---- lua/plugin/theme/dressing.lua | 14 -- lua/plugin/theme/lualine.lua | 81 ---------- lua/plugin/theme/statuscol.lua | 31 ---- lua/plugin/util/dashboard.lua | 70 -------- lua/plugin/util/fine-cmd-line.lua | 32 ---- lua/plugin/util/neogit.lua | 83 ---------- lua/plugin/util/notify.lua | 38 ----- lua/plugin/util/nvim-tree.lua | 81 ---------- lua/plugin/util/search.lua | 3 +- lua/plugin/util/sqls.lua | 18 --- lua/plugin/util/surround.lua | 9 -- 36 files changed, 38 insertions(+), 1318 deletions(-) delete mode 100644 lua/plugin/editor/cmp-dotenv.lua delete mode 100644 lua/plugin/editor/cmp.lua delete mode 100644 lua/plugin/editor/rainbow-delimiters.lua delete mode 100644 lua/plugin/editor/reactive.lua delete mode 100644 lua/plugin/editor/tiny-devicons-auto-colors.lua delete mode 100644 lua/plugin/editor/todo-comments.lua delete mode 100644 lua/plugin/editor/treesitter.lua delete mode 100644 lua/plugin/editor/ufo.lua delete mode 100644 lua/plugin/lazy.lua delete mode 100644 lua/plugin/lsp/dap-ui.lua delete mode 100644 lua/plugin/lsp/dap.lua delete mode 100644 lua/plugin/lsp/garbage-day.lua delete mode 100644 lua/plugin/lsp/neotest.lua delete mode 100644 lua/plugin/theme/bufferline.lua delete mode 100644 lua/plugin/theme/colorizer.lua delete mode 100644 lua/plugin/theme/colorscheme.lua delete mode 100644 lua/plugin/theme/dressing.lua delete mode 100644 lua/plugin/theme/lualine.lua delete mode 100644 lua/plugin/theme/statuscol.lua delete mode 100644 lua/plugin/util/dashboard.lua delete mode 100644 lua/plugin/util/fine-cmd-line.lua delete mode 100644 lua/plugin/util/neogit.lua delete mode 100644 lua/plugin/util/notify.lua delete mode 100644 lua/plugin/util/nvim-tree.lua delete mode 100644 lua/plugin/util/sqls.lua delete mode 100644 lua/plugin/util/surround.lua diff --git a/.luacheckrc b/.luacheckrc index c6dedb1..065234c 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -1,6 +1,9 @@ -- https://github.com/mpeterv/luacheck config file. -- Simply copy this file to the root of the project. -- luacheck:ignore 111 -globals = { "vim", "require", "strategy", "query", "globals" } + +std = { + globals = { "vim", "require", "strategy", "query", "globals", "math" }, -- these globals can be set and accessed. +} codes = true ranges = true diff --git a/README.md b/README.md index cba36e1..a29d415 100644 --- a/README.md +++ b/README.md @@ -7,15 +7,17 @@ ![check_commit](https://github.com/CelticBoozer/nvim-config/actions/workflows/check_commit.yaml/badge.svg?branch=master) ![markdownlint](https://github.com/CelticBoozer/nvim-config/actions/workflows/markdownlint.yaml/badge.svg?branch=master) -## Deps +## External dependencies -npm - -Java last version -luarocks - lazy -git - lazy, -Nerd fonts - lazy, whichkey -python3 -deno -rg - lspsaga, - -ueberzug (for media previews), docker-cli +|External Dependency | Plugins | +|--------------------|---------| +| [git](https://git-scm.com/downloads) | [lazy.nvim](https://github.com/folke/lazy.nvim) [neogit](https://github.com/NeogitOrg/neogit) [mason.nvim](https://github.com/williamboman/mason.nvim) | +| [Nerd Font](https://www.nerdfonts.com/) | [lazy.nvim](https://github.com/folke/lazy.nvim) [render-markdown](https://github.com/MeanderingProgrammer/render-markdown.nvim) [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) [which-key.nvim](https://github.com/folke/which-key.nvim) | +| [luarocks](https://luarocks.org/) | [lazy.nvim](https://github.com/folke/lazy.nvim) | +| [curl](https://curl.se/download.html) | [mason.nvim](https://github.com/williamboman/mason.nvim) | +| [wget](https://www.gnu.org/software/wget/) | [mason.nvim](https://github.com/williamboman/mason.nvim) | +| unzip | [mason.nvim](https://github.com/williamboman/mason.nvim) | +| tar | [mason.nvim](https://github.com/williamboman/mason.nvim) | +| gzip | [mason.nvim](https://github.com/williamboman/mason.nvim) | +| [rg](https://github.com/BurntSushi/ripgrep) | [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) [todo-comments.nvim](https://github.com/folke/todo-comments.nvim) | +| [fd](https://github.com/sharkdp/fd) | [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) | diff --git a/init.lua b/init.lua index 56f257b..8d2e8d9 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,7 @@ require("core.options") -- Bootstrap and setup lazy.nvim through its own plugin spec -require("plugin.lazy") +require("core.lazy") -- Safe telescope extension loading vim.api.nvim_create_autocmd("User", { diff --git a/lazy-lock.json b/lazy-lock.json index 6c8e0f7..7c7e578 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -27,10 +27,8 @@ "lspsaga.nvim": { "branch": "main", "commit": "778d56ff9b387dacd14ae648ed5604394b486f51" }, "lualine.nvim": { "branch": "master", "commit": "86fe39534b7da729a1ac56c0466e76f2c663dc42" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" }, "neogit": { "branch": "master", "commit": "97f83f1dc51dee41e08e3c7a8adf00e1083e3178" }, "neotest": { "branch": "master", "commit": "747775fc22dfeb6102bdde6559ccb5126dac0ff8" }, "neotest-bash": { "branch": "main", "commit": "57eab5b80a5296dc3fc5b22112b3ed78da3a5732" }, @@ -42,24 +40,24 @@ "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, - "nvim-dap-ui": { "branch": "master", "commit": "7c9207dcc2dfb52d3c3435f02a59948f5076eb9e" }, + "nvim-dap-ui": { "branch": "master", "commit": "881a69e25bd6658864fab47450025490b74be878" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, "nvim-lint": { "branch": "master", "commit": "5b1bdf306bd3e565908145279e8bbfc594dac3b3" }, - "nvim-lspconfig": { "branch": "master", "commit": "f9b6a702b7430aff0770c04771f2dba78163d2c6" }, + "nvim-lspconfig": { "branch": "master", "commit": "3a7387a9c980304059b2bd7075684d6ef98ff331" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" }, "nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" }, "nvim-tree.lua": { "branch": "master", "commit": "5bea2b37523a31288e0fcab42f3be5c1bd4516bb" }, - "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, + "nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, "nvim-ufo": { "branch": "main", "commit": "a026364df62e88037b26d37c9f14c17c006fd577" }, "nvim-web-devicons": { "branch": "master", "commit": "c90dee4e930ab9f49fa6d77f289bff335b49e972" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "351e449683070a2bb946bbd603555faf5a195e9a" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "c921526c23fe94e3da5132fea5ca9ee3c3068a90" }, "reactive.nvim": { "branch": "master", "commit": "e0a22a42811ca1e7aa7531f931c55619aad68b5d" }, - "render-markdown.nvim": { "branch": "main", "commit": "8bb0d4725cc4909a603158d44ff28b6158ad9278" }, + "render-markdown.nvim": { "branch": "main", "commit": "8355c85e4a34c2071fb9c78295aedf877116648b" }, "search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" }, "sqls.nvim": { "branch": "main", "commit": "d1bc5421ef3e8edc5101e37edbb7de6639207a09" }, "statuscol.nvim": { "branch": "main", "commit": "c399884e8f64019ec9bb581251f9710915b7f996" }, @@ -68,7 +66,7 @@ "telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" }, "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, "tiny-devicons-auto-colors.nvim": { "branch": "main", "commit": "51f548421f8a74680eff27d283c9d5ea6e8d0074" }, - "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "842983e91e0b8825f1084b8323c7806c8bf64c74" }, + "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "220cba7596cc2ff95c251d3173b26eaf9924ec10" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/lua/core/options.lua b/lua/core/options.lua index e488490..458cb66 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -45,6 +45,4 @@ o.background = "dark" vim.diagnostic.config({ severity_sort = true, -- Sort all diagnostics by severity - -- Optional: Reverse sort order (highest first is default) - severity_sort = { reverse = false }, }) diff --git a/lua/plugin/editor/cmp-dotenv.lua b/lua/plugin/editor/cmp-dotenv.lua deleted file mode 100644 index 22ce6b9..0000000 --- a/lua/plugin/editor/cmp-dotenv.lua +++ /dev/null @@ -1,8 +0,0 @@ --- INFO: .env file completions --- NOTE: Provides environment variable suggestions for .env files - -return { - "SergioRibera/cmp-dotenv", - dependencies = { "hrsh7th/nvim-cmp" }, - config = function() end, -} diff --git a/lua/plugin/editor/cmp.lua b/lua/plugin/editor/cmp.lua deleted file mode 100644 index bb89a9a..0000000 --- a/lua/plugin/editor/cmp.lua +++ /dev/null @@ -1,63 +0,0 @@ --- INFO: .env file completions --- NOTE: Provides environment variable suggestions for .env files - -return { - "hrsh7th/nvim-cmp", - event = "InsertEnter", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "L3MON4D3/LuaSnip", - "saadparwaiz1/cmp_luasnip", - "onsails/lspkind.nvim", - "windwp/nvim-autopairs", - "SergioRibera/cmp-dotenv", -- add dotenv plugin as dependency - }, - config = function() - local cmp = require("cmp") - require("nvim-autopairs").setup() - cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done()) - - cmp.setup({ - mapping = { - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.confirm({ select = true }), - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "buffer" }, - -- You can comment out the global dotenv source if you want it only in .env files: - { name = "dotenv" }, - }, - formatting = { - format = require("lspkind").cmp_format({ - maxwidth = 50, - ellipsis_char = "...", - }), - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - experimental = { - ghost_text = { - hl_group = "Comment", - }, - }, - }) - - -- Optional: if you want dotenv completions only for .env files, you can remove it from the - -- global sources list above and add it here: - -- - -- cmp.setup.filetype("env", { - -- sources = { - -- { name = "dotenv" }, - -- }, - -- }) - end, -} diff --git a/lua/plugin/editor/rainbow-delimiters.lua b/lua/plugin/editor/rainbow-delimiters.lua deleted file mode 100644 index 710daa6..0000000 --- a/lua/plugin/editor/rainbow-delimiters.lua +++ /dev/null @@ -1,29 +0,0 @@ --- INFO: Syntax-aware delimiter highlighting --- NOTE: Context-aware bracket/quote colorization -return { - "hiphish/rainbow-delimiters.nvim", - event = "VeryLazy", - dependencies = { - "nvim-treesitter/nvim-treesitter", - }, - config = function() - require("rainbow-delimiters.setup").setup({ - highlight = { - "RainbowRed", - "RainbowYellow", - "RainbowOrange", - "RainbowCyan", - "RainbowViolet", - "RainbowGreen", - "RainbowBlue", - }, - }) - vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#ea6962" }) - vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#d8a657" }) - vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#e78a4e" }) - vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#89b482" }) - vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#d3869b" }) - vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#7daea3" }) - vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#a9b665" }) - end, -} diff --git a/lua/plugin/editor/reactive.lua b/lua/plugin/editor/reactive.lua deleted file mode 100644 index 05c155e..0000000 --- a/lua/plugin/editor/reactive.lua +++ /dev/null @@ -1,93 +0,0 @@ --- INFO: Reactive UI highlighting --- NOTE: Dynamic highlights based on context and mode - -return { - "rasulomaroff/reactive.nvim", - opts = function() - local mypreset = { - name = "mypreset", - init = function() - vim.opt.cursorline = true - vim.opt.termguicolors = true - end, - static = { - winhl = { - inactive = { - CursorLine = { bg = "#46413e" }, - CursorLineNr = { fg = "#d4be98", bg = "#46413e" }, - }, - }, - }, - modes = { - -- this does not work when whichkey is enabled - no = { - operators = { - [{ "gu", "gU", "g~", "~" }] = { - winhl = { - CursorLine = { bg = "#334155" }, - CursorLineNr = { fg = "#cbd5e1", bg = "#334155" }, - }, - }, - c = { - winhl = { - CursorLine = { bg = "#424a3e" }, - CursorLineNr = { fg = "#d4be98", bg = "#424a3e" }, - }, - }, - d = { - winhl = { - CursorLine = { bg = "#472322" }, - CursorLineNr = { fg = "#d4be98", bg = "#472322" }, - }, - }, - y = { - winhl = { - CursorLine = { bg = "#574833" }, - CursorLineNr = { fg = "#d4be98", bg = "#574833" }, - }, - }, - }, - }, - - i = { - winhl = { - CursorLine = { bg = "#5b534d" }, - CursorLineNr = { fg = "#d4be98", bg = "#5b534d" }, - }, - }, - n = { - winhl = { - CursorLine = { bg = "#404946" }, - CursorLineNr = { fg = "#d4be98", bg = "#404946" }, - }, - }, - [{ "v", "V", "\x16" }] = { - winhl = { - CursorLineNr = { fg = "#d4be98" }, - Visual = { bg = "#0f3a42" }, - }, - }, - [{ "s", "S", "\x13" }] = { - winhl = { - CursorLineNr = { fg = "#d4be98" }, - Visual = { bg = "#0f3a42" }, - }, - }, - R = { - winhl = { - CursorLine = { bg = "#543937" }, - CursorLineNr = { fg = "#d4be98", bg = "#543937" }, - }, - }, - }, - } - require("reactive").add_preset(mypreset) - return { - builtin = { - cursorline = false, - cursor = false, - modemsg = false, - }, - } - end, -} diff --git a/lua/plugin/editor/tiny-devicons-auto-colors.lua b/lua/plugin/editor/tiny-devicons-auto-colors.lua deleted file mode 100644 index aa3569d..0000000 --- a/lua/plugin/editor/tiny-devicons-auto-colors.lua +++ /dev/null @@ -1,20 +0,0 @@ --- INFO: Automatic devicon color adaptation --- NOTE: Syncs icon colors with current colorscheme - -return { - "rachartier/tiny-devicons-auto-colors.nvim", - opts = { - colors = { - "#ea6962", - "#e78a4e", - "#d8a657", - "#a9b665", - "#89b482", - "#7daea3", - "#d3869b", - "#a9b665", - "#d8a657", - }, - color_match_level = 0.85, -- Aggressiveness of color matching (0-1) - }, -} diff --git a/lua/plugin/editor/todo-comments.lua b/lua/plugin/editor/todo-comments.lua deleted file mode 100644 index a8118b5..0000000 --- a/lua/plugin/editor/todo-comments.lua +++ /dev/null @@ -1,41 +0,0 @@ --- INFO: Highlight and manage todo comments --- NOTE: Visualize todos with colored icons and diagnostics - -return { - "folke/todo-comments.nvim", - event = "BufReadPost", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - keywords = { - FIX = { icon = " ", color = "fix" }, - TODO = { icon = " ", color = "todo" }, - HACK = { icon = " ", color = "hack" }, - WARN = { icon = " ", color = "warn" }, - PERF = { icon = "󰅒 ", color = "perf" }, - NOTE = { icon = "󰎞 ", color = "note" }, - TEST = { icon = "󰙨 ", color = "test" }, - }, - colors = { - error = { "DiagnosticError" }, - warning = { "DiagnosticWarn" }, - info = { "DiagnosticInfo" }, - hint = { "DiagnosticHint" }, - default = { "Comment" }, - fix = "#ea6962", - todo = "#e78a4e", - hack = "#d8a657", - warn = "#d8a657", - perf = "#7daea3", - note = "#89b482", - test = "#d3869b", - }, - highlight = { - pattern = [[.*<(KEYWORDS)\s*]], - keyword = "bg", - after = "fg", - }, - search = { - pattern = [[\b(KEYWORDS)\b]], - }, - }, -} diff --git a/lua/plugin/editor/treesitter.lua b/lua/plugin/editor/treesitter.lua deleted file mode 100644 index f7276a0..0000000 --- a/lua/plugin/editor/treesitter.lua +++ /dev/null @@ -1,45 +0,0 @@ --- INFO: Advanced syntax parsing and highlighting --- NOTE: Provides better code understanding and manipulation - -return { - "nvim-treesitter/nvim-treesitter", - event = "VeryLazy", - build = ":TSUpdate", - opts = { - ensure_installed = { - "bash", - "css", - "dockerfile", - "html", - "java", - "javascript", - "json", - "lua", - "markdown", - "python", - "sql", - "toml", - "typescript", - "yaml", - }, - auto_install = true, - highlight = { - additional_vim_regex_highlighting = false, - }, - incremental_selection = { - enable = true, - }, - textobjects = { - select = { - enable = true, - lookahead = true, - keymaps = { - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - }, - }, -} diff --git a/lua/plugin/editor/ufo.lua b/lua/plugin/editor/ufo.lua deleted file mode 100644 index 4fb1425..0000000 --- a/lua/plugin/editor/ufo.lua +++ /dev/null @@ -1,74 +0,0 @@ --- INFO: Advanced code folding with LSP integration --- NOTE: Provides intuitive folding visualization and navigation - -return { - "kevinhwang91/nvim-ufo", - event = "LspAttach", - dependencies = { - "kevinhwang91/promise-async", - { - "luukvbaal/statuscol.nvim", - config = function() - require("statuscol").setup({ - foldfunc = "builtin", - setopt = true, - }) - end, - }, - }, - opts = { - fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate) - local newVirtText = {} - local suffix = (" 󰁂 %d "):format(endLnum - lnum) - local sufWidth = vim.fn.strdisplaywidth(suffix) - local targetWidth = width - sufWidth - local curWidth = 0 - - for _, chunk in ipairs(virtText) do - local chunkText = chunk[1] - local chunkWidth = vim.fn.strdisplaywidth(chunkText) - if targetWidth > curWidth + chunkWidth then - table.insert(newVirtText, chunk) - else - chunkText = truncate(chunkText, targetWidth - curWidth) - local hlGroup = chunk[2] - table.insert(newVirtText, { chunkText, hlGroup }) - chunkWidth = vim.fn.strdisplaywidth(chunkText) - if curWidth + chunkWidth < targetWidth then - suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) - end - break - end - curWidth = curWidth + chunkWidth - end - table.insert(newVirtText, { suffix, "UfoFoldedEllipsis" }) - return newVirtText - end, - provider_selector = function() - return { "treesitter", "indent" } - end, - }, - config = function(_, opts) - -- Configure LSP folding capabilities - -- UFO folding - vim.o.foldcolumn = "1" -- '0' is not bad - vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value - vim.o.foldlevelstart = 99 - vim.o.foldenable = true - vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]] - - -- Link custom highlight group - vim.api.nvim_set_hl(0, "UfoFoldedEllipsis", { link = "Comment" }) - - -- Initialize UFO with merged options - require("ufo").setup(opts) - - -- Key mappings for folding - vim.keymap.set("n", "zE", require("ufo").openAllFolds) - vim.keymap.set("n", "zC", require("ufo").closeAllFolds) - vim.keymap.set("n", "ze", require("ufo").openFoldsExceptKinds) - vim.keymap.set("n", "zc", function() - require("ufo").closeFoldsWith(1) -- Close only immediate fold - end, { desc = "Close current fold" }) - end, -} diff --git a/lua/plugin/lazy.lua b/lua/plugin/lazy.lua deleted file mode 100644 index d052095..0000000 --- a/lua/plugin/lazy.lua +++ /dev/null @@ -1,39 +0,0 @@ --- INFO: Plugin manager for Neovim --- NOTE: Essential foundation for plugin management. Handles installation, updates, and lazy loading. - -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = "https://github.com/folke/lazy.nvim.git" - local out = vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "--branch=stable", - lazyrepo, - lazypath, - }) - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to exit..." }, - }, true, {}) - vim.fn.getchar() - os.exit(1) - end -end -vim.opt.rtp:prepend(lazypath) - --- Setup lazy.nvim -require("lazy").setup({ - spec = { - { import = "plugin.editor" }, - { import = "plugin.lsp" }, - { import = "plugin.theme" }, - { import = "plugin.util" }, - }, - checker = { enabled = true }, - dev = { path = "~/Development/Projects" }, - install = { colorscheme = { "gruvbox-material" } }, - ui = { border = "rounded" }, -}) diff --git a/lua/plugin/lsp/conform.lua b/lua/plugin/lsp/conform.lua index b52d706..63850da 100644 --- a/lua/plugin/lsp/conform.lua +++ b/lua/plugin/lsp/conform.lua @@ -29,8 +29,8 @@ return { lua = { "stylua" }, markdown = { "markdownlint" }, sh = { "shfmt" }, - json = { "jsonlint" }, - yaml = { "yamllint" }, + json = { "prettier" }, + yaml = { "yamlfmt" }, html = { "prettier" }, css = { "prettier" }, javascript = { "prettier" }, @@ -42,14 +42,9 @@ return { graphql = { "prettier" }, sql = { "sqlfluff" }, xml = { "xmlformatter" }, - ["*"] = { "codespell" }, ["_"] = { "trim_whitespace" }, }, formatters = { - codespell = { - command = "codespell", - args = { "--write-changes", "$FILENAME" }, - }, trim_whitespace = { command = "sed", args = { "-i", "s/[[:space:]]*$//" }, diff --git a/lua/plugin/lsp/dap-ui.lua b/lua/plugin/lsp/dap-ui.lua deleted file mode 100644 index c64c560..0000000 --- a/lua/plugin/lsp/dap-ui.lua +++ /dev/null @@ -1,77 +0,0 @@ --- INFO: Debug Adapter Protocol UI with interactive elements --- NOTE: Provides visual debugging interface with variable inspection and REPL - -return { - "rcarriga/nvim-dap-ui", - dependencies = { - "mfussenegger/nvim-dap", - }, - keys = { - { - "du", - function() - require("dapui").toggle() - end, - desc = "Toggle Debug UI", - }, - { - "de", - function() - require("dapui").eval() - end, - desc = "Evaluate expression", - mode = { "n", "v" }, - }, - { - "db", - function() - require("dap").toggle_breakpoint() - end, - desc = "Toggle breakpoint", - }, - }, - opts = { - icons = { - expanded = "⯆", - collapsed = "⯈", - circular = "↺", - }, - layouts = { - { - elements = { - { id = "scopes", size = 0.35 }, - { id = "breakpoints", size = 0.15 }, - { id = "stacks", size = 0.25 }, - { id = "watches", size = 0.25 }, - }, - size = 0.3, - position = "left", - }, - { - elements = { - "repl", - "console", - }, - size = 0.25, - position = "bottom", - }, - }, - }, - config = function(_, opts) - local dapui = require("dapui") - local dap = require("dap") - - dapui.setup(opts) - - -- Auto open/close UI with debug sessions - dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open() - end - dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close() - end - dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close() - end - end, -} diff --git a/lua/plugin/lsp/dap.lua b/lua/plugin/lsp/dap.lua deleted file mode 100644 index fac5048..0000000 --- a/lua/plugin/lsp/dap.lua +++ /dev/null @@ -1,150 +0,0 @@ --- INFO: Configures nvim-dap --- NOTE: 'mfussenegger/nvim-dap' provides the core Debug Adapter Protocol client for Neovim - -return { - "mfussenegger/nvim-dap", - lazy = true, - event = "VeryLazy", - dependencies = { - "rcarriga/nvim-dap-ui", - "theHamsta/nvim-dap-virtual-text", - }, - keys = { - { - "", - function() - require("dap").continue() - end, - desc = "Start/Continue Debugging", - }, - { - "", - function() - require("dap").step_over() - end, - desc = "Step Over", - }, - { - "", - function() - require("dap").step_into() - end, - desc = "Step Into", - }, - { - "", - function() - require("dap").step_out() - end, - desc = "Step Out", - }, - { - "b", - function() - require("dap").toggle_breakpoint() - end, - desc = "Toggle Breakpoint", - }, - { - "B", - function() - require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) - end, - desc = "Set Conditional Breakpoint", - }, - { - "lp", - function() - require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: ")) - end, - desc = "Set Log Point", - }, - { - "dr", - function() - require("dap").repl.open() - end, - desc = "Open REPL", - }, - { - "dl", - function() - require("dap").run_last() - end, - desc = "Run Last Debugging Session", - }, - }, - config = function() - local dap = require("dap") - local mason_path = vim.fn.stdpath("data") .. "/mason/packages" - - -- Python (debugpy) - local python_path = mason_path .. "/debugpy/venv/bin/python" - dap.adapters.python = { - type = "executable", - command = python_path, - args = { "-m", "debugpy.adapter" }, - } - dap.configurations.python = { - { - type = "python", - request = "launch", - name = "Launch file", - program = "${file}", - pythonPath = function() - return python_path - end, - }, - } - - -- Bash (bash-debug-adapter) - local bash_adapter_path = mason_path .. "/bash-debug-adapter/bash-debug-adapter" - local bashdb_dir = mason_path .. "/bash-debug-adapter/extension/bashdb_dir" - dap.adapters.bashdb = { - type = "executable", - command = bash_adapter_path, - name = "bashdb", - } - dap.configurations.sh = { - { - type = "bashdb", - request = "launch", - name = "Launch Bash script", - showDebugOutput = true, - pathBashdb = bashdb_dir .. "/bashdb", - pathBashdbLib = bashdb_dir, - trace = true, - file = "${file}", - program = "${file}", - cwd = "${workspaceFolder}", - pathCat = "cat", - pathBash = "/bin/bash", - pathMkfifo = "mkfifo", - pathPkill = "pkill", - args = {}, - env = {}, - terminalKind = "integrated", - }, - } - - -- Firefox Debugging - local firefox_adapter_path = mason_path .. "/firefox-debug-adapter/dist/adapter.bundle.js" - dap.adapters.firefox = { - type = "executable", - command = "node", - args = { firefox_adapter_path }, - } - dap.configurations.javascript = { - { - name = "Launch Firefox", - type = "firefox", - request = "launch", - reAttach = true, - url = "http://localhost:3000", - webRoot = "${workspaceFolder}", - firefoxExecutable = "/usr/bin/firefox", - }, - } - dap.configurations.typescript = dap.configurations.javascript - end, -} diff --git a/lua/plugin/lsp/garbage-day.lua b/lua/plugin/lsp/garbage-day.lua deleted file mode 100644 index 970b26d..0000000 --- a/lua/plugin/lsp/garbage-day.lua +++ /dev/null @@ -1,9 +0,0 @@ --- INFO: Optimize LSP memory usage by managing client lifecycle --- NOTE: Automatically stops unused LSP clients to save RAM - -return { - "zeioth/garbage-day.nvim", - event = "VeryLazy", - dependencies = { "neovim/nvim-lspconfig" }, - opts = {}, -} diff --git a/lua/plugin/lsp/inc-rename.lua b/lua/plugin/lsp/inc-rename.lua index eb55ced..aa86363 100644 --- a/lua/plugin/lsp/inc-rename.lua +++ b/lua/plugin/lsp/inc-rename.lua @@ -1,10 +1,5 @@ -- INFO: Interactive LSP rename with live preview -- NOTE: Provides real-time renaming previews --- Dependencies: --- - 'stevearc/dressing.nvim': Improved UI components - --- luacheck: globals vim --- luacheck: ignore 113 return { "smjonas/inc-rename.nvim", diff --git a/lua/plugin/lsp/lint.lua b/lua/plugin/lsp/lint.lua index 668039a..a9dc7ff 100644 --- a/lua/plugin/lsp/lint.lua +++ b/lua/plugin/lsp/lint.lua @@ -5,7 +5,13 @@ return { "mfussenegger/nvim-lint", event = "VeryLazy", keys = { - { "ll", function() require("lint").try_lint() end, desc = "Lint file" }, + { + "ll", + function() + require("lint").try_lint() + end, + desc = "Lint file", + }, }, opts = { linters_by_ft = { @@ -23,16 +29,8 @@ return { java = { "checkstyle" }, sql = { "sqlfluff" }, markdown = { "markdownlint", "cspell" }, - text = { "cspell" } + ["*"] = { "cspell" }, }, - -- Custom linter configuration (only non-defaults) - linters = { - cspell = { - cmd = "cspell", - args = { "--no-color", "--no-progress", "--no-summary", "stdin" }, - stream = "stdin", - } - } }, config = function(_, opts) local lint = require("lint") @@ -48,7 +46,7 @@ return { callback = function() lint.try_lint() end, - group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }) + group = vim.api.nvim_create_augroup("nvim-lint", { clear = true }), }) - end + end, } diff --git a/lua/plugin/lsp/lsp_signature.lua b/lua/plugin/lsp/lsp_signature.lua index 78f8958..6a27eae 100644 --- a/lua/plugin/lsp/lsp_signature.lua +++ b/lua/plugin/lsp/lsp_signature.lua @@ -1,4 +1,4 @@ --- INFO: In-- INFO: Interactive function signature help during typing +-- INFO: Interactive function signature help during typing -- NOTE: Displays parameter information and documentation return { diff --git a/lua/plugin/lsp/neotest.lua b/lua/plugin/lsp/neotest.lua deleted file mode 100644 index 1293453..0000000 --- a/lua/plugin/lsp/neotest.lua +++ /dev/null @@ -1,37 +0,0 @@ --- INFO: Extensible framework for interacting with tests within Neovim --- NOTE: Requires appropriate test adapters for your specific language/framework - -return { - "nvim-neotest/neotest", - event = { "BufReadPost", "BufNewFile" }, - dependencies = { - "nvim-neotest/nvim-nio", - "nvim-lua/plenary.nvim", - "antoinemadec/FixCursorHold.nvim", - "nvim-treesitter/nvim-treesitter", - -- Adapters for supported languages - "nvim-neotest/neotest-python", - "nvim-neotest/neotest-jest", - "rouge8/neotest-rust", - "rcasia/neotest-bash", - }, - config = function() - require("neotest").setup({ - adapters = { - require("neotest-python")({ - dap = { justMyCode = false }, - }), - require("neotest-jest")({ - jestCommand = "npm test --", - jestConfigFile = "jest.config.js", - env = { CI = true }, - cwd = function() - return vim.fn.getcwd() - end, - }), - require("neotest-rust"), - require("neotest-bash"), - }, - }) - end, -} diff --git a/lua/plugin/theme/bufferline.lua b/lua/plugin/theme/bufferline.lua deleted file mode 100644 index 5d58996..0000000 --- a/lua/plugin/theme/bufferline.lua +++ /dev/null @@ -1,65 +0,0 @@ --- INFO: Enhanced tab/buffer management interface --- NOTE: Provides visual navigation through open buffers with icons and diagnostics - -return { - "akinsho/bufferline.nvim", - lazy = false, - dependencies = { "nvim-tree/nvim-web-devicons" }, -- Just pretty icons - opts = { - options = { - mode = "tabs", - themable = true, - numbers = "ordinal", - right_mouse_command = false, - indicator = { - style = "underline", - }, - buffer_close_icon = "", - modified_icon = "", - close_icon = "", - left_trunc_marker = "", - right_trunc_marker = "", - diagnostics = "nvim_lsp", - diagnostics_indicator = function(count, level) - local icon = level:match("error") and " " or " " - return icon .. count - end, - offsets = { - { - filetype = "neo-tree", - text = "File Explorer", - text_align = "left", - separator = true, - }, - }, - color_icons = true, - show_buffer_icons = true, - show_buffer_close_icons = true, - show_close_icon = false, - show_tab_indicators = false, - show_duplicate_prefix = true, - separator_style = "slope", - enforce_regular_tabs = false, - always_show_bufferline = false, - hover = { - enabled = true, - delay = 100, - reveal = { "close" }, - }, - }, - highlights = { - separator = { - fg = "#252423", - bg = "#32302f", - }, - separator_selected = { - fg = "#252423", - bg = "#32302f", - }, - fill = { - fg = "#252423", - bg = "#252423", - }, - }, - }, -} diff --git a/lua/plugin/theme/colorizer.lua b/lua/plugin/theme/colorizer.lua deleted file mode 100644 index f7bbe9e..0000000 --- a/lua/plugin/theme/colorizer.lua +++ /dev/null @@ -1,27 +0,0 @@ --- INFO: Real-time color code highlighting --- NOTE: Displays color previews for hex codes, RGB values, and named colors - -return { - "norcalli/nvim-colorizer.lua", - event = { "BufReadPre", "BufNewFile" }, - opts = { - ["*"] = { -- Default settings for all filetypes - RGB = true, - names = true, - RRGGBBAA = true, - virtualtext = "■", - }, - css = { - mode = "background", - sass = { enable = true }, - }, - html = { - mode = "foreground", - names = false, - }, - javascript = { - mode = "background", - tailwind = true, - }, - }, -} diff --git a/lua/plugin/theme/colorscheme.lua b/lua/plugin/theme/colorscheme.lua deleted file mode 100644 index d16384d..0000000 --- a/lua/plugin/theme/colorscheme.lua +++ /dev/null @@ -1,34 +0,0 @@ --- INFO: Gruvbox Material colorscheme configuration --- NOTE: Customized soft background variant with UI enhancements - -return { - "sainnhe/gruvbox-material", - lazy = false, - priority = 1000, - opts = { - background = "soft", - foreground = "material", - transparent_background = 2, - sign_column_background = "grey", - statusline_style = "default", - ui_contrast = "low", - diagnostic_line_highlight = 1, - disable_terminal_colors = 1, - enable_bold = 1, - enable_italic = 1, - better_performance = 1, - }, - config = function(_, opts) - -- Apply theme options - for option, value in pairs(opts) do - vim.g["gruvbox_material_" .. option] = value - end - - -- Set colorscheme - vim.cmd.colorscheme("gruvbox-material") - - -- Custom float window styling - vim.api.nvim_set_hl(0, "NormalFloat", { fg = "#d4be98" }) - vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#d4be98" }) - end, -} diff --git a/lua/plugin/theme/dressing.lua b/lua/plugin/theme/dressing.lua deleted file mode 100644 index 9ce9dc3..0000000 --- a/lua/plugin/theme/dressing.lua +++ /dev/null @@ -1,14 +0,0 @@ --- INFO: Enhanced UI components for inputs and selects --- NOTE: Improves default Neovim UI elements with modern styling - -return { - "stevearc/dressing.nvim", - opts = { - input = { - relative = "cursor", - prefer_width = 40, - min_width = 20, - border = "rounded", - }, - }, -} diff --git a/lua/plugin/theme/lualine.lua b/lua/plugin/theme/lualine.lua deleted file mode 100644 index 5076dd2..0000000 --- a/lua/plugin/theme/lualine.lua +++ /dev/null @@ -1,81 +0,0 @@ --- INFO: Customizable status line with real-time diagnostics --- NOTE: Provides contextual information and mode awareness - -return { - "nvim-lualine/lualine.nvim", - event = "VeryLazy", - dependencies = { - "nvim-tree/nvim-web-devicons", - { - "linrongbin16/lsp-progress.nvim", - opts = { - client_format = function(client_name, spinner, series_messages) - local sign = " " - return #series_messages > 0 and (sign .. client_name .. " " .. table.concat(series_messages, " ")) or "" - end, - }, - }, - }, - opts = { - options = { - theme = "gruvbox-material", - globalstatus = true, - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, - disabled_filetypes = { "alpha", "dashboard" }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { - "branch", - "diff", - { - "diagnostics", - symbols = { - error = " ", - warn = " ", - info = " ", - hint = " ", - }, - }, - }, - lualine_c = { - { - "filename", - path = 1, - symbols = { - modified = "● ", - readonly = " ", - unnamed = " ", - }, - }, - { - function() - return require("lsp-progress").progress() - end, - }, - }, - lualine_x = { - { - "searchcount", - maxcount = 999, - }, - "encoding", - "fileformat", - }, - lualine_y = { "progress" }, - lualine_z = { "location" }, - }, - extensions = { "neo-tree", "lazy" }, - }, - config = function(_, opts) - require("lualine").setup(opts) - - vim.api.nvim_create_augroup("lualine_augroup", { clear = true }) - vim.api.nvim_create_autocmd("User", { - group = "lualine_augroup", - pattern = "LspProgressStatusUpdated", - callback = require("lualine").refresh, - }) - end, -} diff --git a/lua/plugin/theme/statuscol.lua b/lua/plugin/theme/statuscol.lua deleted file mode 100644 index 14a1c33..0000000 --- a/lua/plugin/theme/statuscol.lua +++ /dev/null @@ -1,31 +0,0 @@ --- INFO: Interactive status column with fold indicators --- NOTE: Provides clickable line numbers and fold markers - -return { - "luukvbaal/statuscol.nvim", - event = "VeryLazy", - dependencies = { "kevinhwang91/nvim-ufo" }, - opts = { - setopt = true, - relculright = true, - segments = { - { - text = { "%C" }, - click = "v:lua.ScFa", - condition = { true }, - hl = "FoldColumn", - }, - { - text = { "%s" }, - click = "v:lua.ScSa", - hl = "SignColumn", - }, - { - text = { " ", "", " " }, - click = "v:lua.ScLa", - hl = { "LineNr", "Comment" }, - condition = { true }, - }, - }, - }, -} diff --git a/lua/plugin/util/dashboard.lua b/lua/plugin/util/dashboard.lua deleted file mode 100644 index bb11e08..0000000 --- a/lua/plugin/util/dashboard.lua +++ /dev/null @@ -1,70 +0,0 @@ --- INFO: Start screen plugin providing a customizable dashboard interface. --- NOTE: Displays a dashboard with shortcuts and recent files/projects upon launching Neovim. - -return { - "nvimdev/dashboard-nvim", - lazy = false, - event = "VimEnter", - dependencies = { - { "nvim-tree/nvim-web-devicons" }, - }, - keys = {}, - opts = { - theme = "hyper", - config = { - header = { - "", - " ██████╗███████╗██╗ ████████╗██╗ ██████╗██╗ ██╗██╗███╗ ███╗", - "██╔════╝██╔════╝██║ ╚══██╔══╝██║██╔════╝██║ ██║██║████╗ ████║", - "██║ █████╗ ██║ ██║ ██║██║ ██║ ██║██║██╔████╔██║", - "██║ ██╔══╝ ██║ ██║ ██║██║ ╚██╗ ██╔╝██║██║╚██╔╝██║", - "╚██████╗███████╗███████╗██║ ██║╚██████╗ ╚████╔╝ ██║██║ ╚═╝ ██║", - " ╚═════╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝", - "", - }, - shortcut = { - { - desc = "󰈮 Files", - group = "Orange", - action = "Telescope find_files", - key = "f", - }, - { - desc = " Plugins", - group = "Aqua", - action = "Lazy update", - key = "u", - }, - { - desc = " LSP", - group = "Aqua", - action = "Mason", - key = "s", - }, - }, - project = { - enable = true, - icon = " ", - label = " Recent project", - limit = 8, - action = "Telescope find_files cwd=", - }, - mru = { - enable = true, - icon = " ", - label = " Recent files", - limit = 10, - cwd_only = false, - }, - }, - }, - config = function(_, opts) - require("dashboard").setup(opts) - local set_hl = vim.api.nvim_set_hl - set_hl(0, "DashboardProjectIcon", { fg = "#a9b665" }) - set_hl(0, "DashboardProjectTitle", { fg = "#d8a657" }) - set_hl(0, "DashboardProjectTitleIcon", { fg = "#d8a657" }) - set_hl(0, "DashboardMruIcon", { fg = "#d8a657" }) - set_hl(0, "DashboardMruTitle", { fg = "#d8a657" }) - end, -} diff --git a/lua/plugin/util/fine-cmd-line.lua b/lua/plugin/util/fine-cmd-line.lua deleted file mode 100644 index 1b64df8..0000000 --- a/lua/plugin/util/fine-cmd-line.lua +++ /dev/null @@ -1,32 +0,0 @@ --- INFO: Enhanced command-line interface --- NOTE: Provides a floating command palette with history - -return { - "VonHeikemen/fine-cmdline.nvim", - keys = { - { ":", "FineCmdline", desc = "Open command palette", mode = "n" }, - }, - dependencies = { "MunifTanjim/nui.nvim" }, - opts = { - cmdline = { - enable_keymaps = true, - smart_history = true, - prompt = " 󰘳 ", - }, - popup = { - position = { - row = "20%", - col = "50%", - }, - size = { - width = "40%", - min_width = 40, - max_width = 80, - height = "auto", - }, - border = { - style = "rounded", - }, - }, - }, -} diff --git a/lua/plugin/util/neogit.lua b/lua/plugin/util/neogit.lua deleted file mode 100644 index b888e9d..0000000 --- a/lua/plugin/util/neogit.lua +++ /dev/null @@ -1,83 +0,0 @@ --- INFO: Provides an interactive Git interface within Neovim, inspired by Magit. --- NOTE: Enhances Git operations directly from Neovim without leaving the editor. - -return { - "NeogitOrg/neogit", - lazy = false, - cmd = { "Neogit" }, - dependencies = { - "nvim-lua/plenary.nvim", - "sindrets/diffview.nvim", - "nvim-telescope/telescope.nvim", - }, - keys = { - { "gg", "Neogit", desc = "Open Neogit" }, - }, - - opts = { - disable_hint = false, - disable_context_highlighting = false, - disable_signs = false, - prompt_force_push = true, - disable_insert_on_commit = "auto", - filewatcher = { - interval = 1000, - enabled = true, - }, - graph_style = "kitty", - use_default_keymaps = true, - auto_refresh = true, - kind = "floating", - disable_line_numbers = true, - disable_relative_line_numbers = true, - console_timeout = 2000, - auto_show_console = true, - auto_close_console = true, - notification_icon = "", - status = { - show_head_commit_hash = true, - recent_commit_count = 10, - HEAD_padding = 10, - HEAD_folded = false, - mode_padding = 3, - mode_text = { - M = "modified", - N = "new file", - A = "added", - D = "deleted", - C = "copied", - U = "updated", - R = "renamed", - DD = "unmerged", - AU = "unmerged", - UD = "unmerged", - }, - }, - integrations = { - diffview = true, - }, - highlight = { - italic = true, - bold = true, - underline = true, - }, - remember_settings = true, - use_per_project_settings = true, - ignored_settings = { - "NeogitPushPopup--force-with-lease", - "NeogitPushPopup--force", - "NeogitPullPopup--rebase", - "NeogitCommitPopup--allow-empty", - "NeogitRevertPopup--no-edit", - }, - git_services = { - ["github.com"] = "https://github.com/${owner}/${repository}/compare/${branch_name}?expand=1", - ["bitbucket.org"] = "https://bitbucket.org/${owner}/${repository}/pull-requests/new?source=${branch_name}&t=1", - ["gitlab.com"] = "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}", - ["azure.com"] = "https://dev.azure.com/${owner}/_git/${repository}/pullrequestcreate?sourceRef=${branch_name}&targetRef=${target}", - }, - telescope_sorter = function() - return require("telescope").extensions.fzf.native_fzf_sorter() - end, - }, -} diff --git a/lua/plugin/util/notify.lua b/lua/plugin/util/notify.lua deleted file mode 100644 index 4eec78a..0000000 --- a/lua/plugin/util/notify.lua +++ /dev/null @@ -1,38 +0,0 @@ --- INFO: Notification plugin to replace vim.notify with a fancy floating notification system. --- NOTE: Replaces default notifications with a configurable, animated notification popup. - -return { - -- 1. Plugin address. - "rcarriga/nvim-notify", - - -- 2. lazy: load immediately (or adjust as needed). - lazy = false, - - -- 3. (No event required for this plugin) - - -- 4. Dependencies: none. - dependencies = {}, - - -- 5. Keys: (this plugin does not define key mappings by default). - keys = {}, - - -- 6. opts: Configuration options for nvim-notify. - opts = { - stages = "fade_in_slide_out", - timeout = 3000, - max_height = function() - return math.floor(vim.o.lines * 0.75) - end, - max_width = function() - return math.floor(vim.o.columns * 0.75) - end, - top_down = true, - background_colour = "#1e222a", - }, - - config = function(_, opts) - local notify = require("notify") - notify.setup(opts) - vim.notify = notify - end, -} diff --git a/lua/plugin/util/nvim-tree.lua b/lua/plugin/util/nvim-tree.lua deleted file mode 100644 index c12a50c..0000000 --- a/lua/plugin/util/nvim-tree.lua +++ /dev/null @@ -1,81 +0,0 @@ --- INFO: File tree explorer with enhanced features --- NOTE: Provides traditional sidebar-style file navigation - -return { - "nvim-tree/nvim-tree.lua", - lazy = false, - dependencies = { - "nvim-tree/nvim-web-devicons", -- pretty icons - }, - keys = { - { "te", ":NvimTreeToggle", desc = "Toggle file explorer (left sidebar)" }, - }, - opts = { - hijack_cursor = true, - reload_on_bufenter = true, - renderer = { - hidden_display = "all", - highlight_git = "name", - highlight_opened_files = "icon", - highlight_hidden = "name", - icons = { - git_placement = "after", - diagnostics_placement = "right_align", - glyphs = { - git = { - deleted = " ", - renamed = " ", - untracked = " ", - ignored = " ", - unstaged = " ", - staged = " ", - }, - }, - }, - }, - diagnostics = { - enable = true, - show_on_dirs = true, - icons = { - hint = " ", - info = " ", - warning = " ", - error = " ", - }, - }, - filters = { - dotfiles = true, - }, - tab = { - sync = { - open = true, - close = true, - }, - }, - }, - config = function(_, opts) - -- Set our own on_attach callback to override the default keymaps. - opts.on_attach = function(bufnr) - local api = require("nvim-tree.api") - - local function nnoremap(keys, func, desc) - vim.keymap.set( - "n", - keys, - func, - { buffer = bufnr, noremap = true, silent = true, nowait = true, desc = "nvim-tree: " .. desc } - ) - end - - api.config.mappings.default_on_attach(bufnr) - - -- Define new custom key mappings: - nnoremap(".", api.tree.change_root_to_node, "CD") - nnoremap("t", api.node.open.tab, "Open: New Tab") - nnoremap("s", api.node.open.vertical, "Open: Vertical Split") - nnoremap("S", api.node.open.horizontal, "Open: Horizontal Split") - end - - require("nvim-tree").setup(opts) - end, -} diff --git a/lua/plugin/util/search.lua b/lua/plugin/util/search.lua index 3ad7544..58d198a 100644 --- a/lua/plugin/util/search.lua +++ b/lua/plugin/util/search.lua @@ -1,4 +1,3 @@ --- lucheck: globals require -- INFO: Search Plugin to enable a tabbed search interface using Telescope. -- NOTE: This plugin allows switching between different search modes. @@ -11,7 +10,7 @@ return { }, keys = { { - "fs", + "ff", "lua require('search').open()", desc = "Open Search Tabs", }, diff --git a/lua/plugin/util/sqls.lua b/lua/plugin/util/sqls.lua deleted file mode 100644 index acdad6d..0000000 --- a/lua/plugin/util/sqls.lua +++ /dev/null @@ -1,18 +0,0 @@ --- INFO: SQL language support via LSP --- NOTE: Requires Neovim 0.10+ and the sqls language server - -return { - "nanotee/sqls.nvim", - ft = { "sql" }, - dependencies = { "neovim/nvim-lspconfig" }, - config = function() - local lspconfig = require("lspconfig") - local sqls = require("sqls") - - lspconfig.sqls.setup({ - on_attach = function(client, bufnr) - sqls.on_attach(client, bufnr) - end, - }) - end, -} diff --git a/lua/plugin/util/surround.lua b/lua/plugin/util/surround.lua deleted file mode 100644 index 7adc006..0000000 --- a/lua/plugin/util/surround.lua +++ /dev/null @@ -1,9 +0,0 @@ --- INFO: Easily add, delete, or change surroundings in Neovim --- NOTE: Inspired by tpope/vim-surround, written in Lua - -return { - "kylechui/nvim-surround", - version = "*", - event = "VeryLazy", - opts = {}, -} From 09dd1cc1e5d737b3093ce792205abc60aa6ce052 Mon Sep 17 00:00:00 2001 From: CelticBoozer Date: Wed, 16 Apr 2025 00:56:29 +0300 Subject: [PATCH 2/2] another change --- .luarc.json | 9 ++ lua/core/lazy.lua | 45 ++++++ lua/plugin/colors/colorizer.lua | 27 ++++ lua/plugin/colors/colorscheme.lua | 34 ++++ .../colors/tiny-devicons-auto-colors.lua | 20 +++ lua/plugin/completion/cmp-dotenv.lua | 8 + lua/plugin/completion/cmp.lua | 63 ++++++++ lua/plugin/dap/dap-ui.lua | 77 +++++++++ lua/plugin/dap/dap.lua | 150 ++++++++++++++++++ lua/plugin/editor/surround.lua | 9 ++ lua/plugin/git/neogit.lua | 83 ++++++++++ lua/plugin/lsp/sqls.lua | 18 +++ lua/plugin/syntax/rainbow-delimiters.lua | 29 ++++ lua/plugin/syntax/treesitter.lua | 46 ++++++ lua/plugin/testing/neotest.lua | 37 +++++ lua/plugin/ui/bufferline.lua | 65 ++++++++ lua/plugin/ui/dashboard.lua | 70 ++++++++ lua/plugin/ui/dressing.lua | 14 ++ lua/plugin/ui/fine-cmd-line.lua | 32 ++++ lua/plugin/ui/lualine.lua | 83 ++++++++++ lua/plugin/ui/notify.lua | 27 ++++ lua/plugin/ui/nvim-tree.lua | 81 ++++++++++ lua/plugin/ui/statuscol.lua | 31 ++++ lua/plugin/ui/ufo.lua | 74 +++++++++ lua/plugin/util/garbage-day.lua | 9 ++ lua/plugin/util/reactive.lua | 93 +++++++++++ lua/plugin/util/todo-comments.lua | 41 +++++ 27 files changed, 1275 insertions(+) create mode 100644 .luarc.json create mode 100644 lua/core/lazy.lua create mode 100644 lua/plugin/colors/colorizer.lua create mode 100644 lua/plugin/colors/colorscheme.lua create mode 100644 lua/plugin/colors/tiny-devicons-auto-colors.lua create mode 100644 lua/plugin/completion/cmp-dotenv.lua create mode 100644 lua/plugin/completion/cmp.lua create mode 100644 lua/plugin/dap/dap-ui.lua create mode 100644 lua/plugin/dap/dap.lua create mode 100644 lua/plugin/editor/surround.lua create mode 100644 lua/plugin/git/neogit.lua create mode 100644 lua/plugin/lsp/sqls.lua create mode 100644 lua/plugin/syntax/rainbow-delimiters.lua create mode 100644 lua/plugin/syntax/treesitter.lua create mode 100644 lua/plugin/testing/neotest.lua create mode 100644 lua/plugin/ui/bufferline.lua create mode 100644 lua/plugin/ui/dashboard.lua create mode 100644 lua/plugin/ui/dressing.lua create mode 100644 lua/plugin/ui/fine-cmd-line.lua create mode 100644 lua/plugin/ui/lualine.lua create mode 100644 lua/plugin/ui/notify.lua create mode 100644 lua/plugin/ui/nvim-tree.lua create mode 100644 lua/plugin/ui/statuscol.lua create mode 100644 lua/plugin/ui/ufo.lua create mode 100644 lua/plugin/util/garbage-day.lua create mode 100644 lua/plugin/util/reactive.lua create mode 100644 lua/plugin/util/todo-comments.lua diff --git a/.luarc.json b/.luarc.json new file mode 100644 index 0000000..fe127fd --- /dev/null +++ b/.luarc.json @@ -0,0 +1,9 @@ +{ + "diagnostics.globals": [ + "vim", + "globals", + "std", + "codes", + "ranges" + ] +} \ No newline at end of file diff --git a/lua/core/lazy.lua b/lua/core/lazy.lua new file mode 100644 index 0000000..465bb55 --- /dev/null +++ b/lua/core/lazy.lua @@ -0,0 +1,45 @@ +-- INFO: Plugin manager for Neovim +-- NOTE: Essential foundation for plugin management. Handles installation, updates, and lazy loading. + +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "--branch=stable", + lazyrepo, + lazypath, + }) + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + { import = "plugin.colors" }, + { import = "plugin.completion" }, + { import = "plugin.dap" }, + { import = "plugin.editor" }, + { import = "plugin.git" }, + { import = "plugin.lsp" }, + { import = "plugin.syntax" }, + { import = "plugin.testing" }, + { import = "plugin.ui" }, + { import = "plugin.util" }, + }, + checker = { enabled = true }, + dev = { path = "~/Development/Projects" }, + install = { colorscheme = { "gruvbox-material" } }, + ui = { border = "rounded" }, +}) diff --git a/lua/plugin/colors/colorizer.lua b/lua/plugin/colors/colorizer.lua new file mode 100644 index 0000000..f7bbe9e --- /dev/null +++ b/lua/plugin/colors/colorizer.lua @@ -0,0 +1,27 @@ +-- INFO: Real-time color code highlighting +-- NOTE: Displays color previews for hex codes, RGB values, and named colors + +return { + "norcalli/nvim-colorizer.lua", + event = { "BufReadPre", "BufNewFile" }, + opts = { + ["*"] = { -- Default settings for all filetypes + RGB = true, + names = true, + RRGGBBAA = true, + virtualtext = "■", + }, + css = { + mode = "background", + sass = { enable = true }, + }, + html = { + mode = "foreground", + names = false, + }, + javascript = { + mode = "background", + tailwind = true, + }, + }, +} diff --git a/lua/plugin/colors/colorscheme.lua b/lua/plugin/colors/colorscheme.lua new file mode 100644 index 0000000..d16384d --- /dev/null +++ b/lua/plugin/colors/colorscheme.lua @@ -0,0 +1,34 @@ +-- INFO: Gruvbox Material colorscheme configuration +-- NOTE: Customized soft background variant with UI enhancements + +return { + "sainnhe/gruvbox-material", + lazy = false, + priority = 1000, + opts = { + background = "soft", + foreground = "material", + transparent_background = 2, + sign_column_background = "grey", + statusline_style = "default", + ui_contrast = "low", + diagnostic_line_highlight = 1, + disable_terminal_colors = 1, + enable_bold = 1, + enable_italic = 1, + better_performance = 1, + }, + config = function(_, opts) + -- Apply theme options + for option, value in pairs(opts) do + vim.g["gruvbox_material_" .. option] = value + end + + -- Set colorscheme + vim.cmd.colorscheme("gruvbox-material") + + -- Custom float window styling + vim.api.nvim_set_hl(0, "NormalFloat", { fg = "#d4be98" }) + vim.api.nvim_set_hl(0, "FloatBorder", { fg = "#d4be98" }) + end, +} diff --git a/lua/plugin/colors/tiny-devicons-auto-colors.lua b/lua/plugin/colors/tiny-devicons-auto-colors.lua new file mode 100644 index 0000000..aa3569d --- /dev/null +++ b/lua/plugin/colors/tiny-devicons-auto-colors.lua @@ -0,0 +1,20 @@ +-- INFO: Automatic devicon color adaptation +-- NOTE: Syncs icon colors with current colorscheme + +return { + "rachartier/tiny-devicons-auto-colors.nvim", + opts = { + colors = { + "#ea6962", + "#e78a4e", + "#d8a657", + "#a9b665", + "#89b482", + "#7daea3", + "#d3869b", + "#a9b665", + "#d8a657", + }, + color_match_level = 0.85, -- Aggressiveness of color matching (0-1) + }, +} diff --git a/lua/plugin/completion/cmp-dotenv.lua b/lua/plugin/completion/cmp-dotenv.lua new file mode 100644 index 0000000..22ce6b9 --- /dev/null +++ b/lua/plugin/completion/cmp-dotenv.lua @@ -0,0 +1,8 @@ +-- INFO: .env file completions +-- NOTE: Provides environment variable suggestions for .env files + +return { + "SergioRibera/cmp-dotenv", + dependencies = { "hrsh7th/nvim-cmp" }, + config = function() end, +} diff --git a/lua/plugin/completion/cmp.lua b/lua/plugin/completion/cmp.lua new file mode 100644 index 0000000..bb89a9a --- /dev/null +++ b/lua/plugin/completion/cmp.lua @@ -0,0 +1,63 @@ +-- INFO: .env file completions +-- NOTE: Provides environment variable suggestions for .env files + +return { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + "onsails/lspkind.nvim", + "windwp/nvim-autopairs", + "SergioRibera/cmp-dotenv", -- add dotenv plugin as dependency + }, + config = function() + local cmp = require("cmp") + require("nvim-autopairs").setup() + cmp.event:on("confirm_done", require("nvim-autopairs.completion.cmp").on_confirm_done()) + + cmp.setup({ + mapping = { + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.confirm({ select = true }), + }, + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + -- You can comment out the global dotenv source if you want it only in .env files: + { name = "dotenv" }, + }, + formatting = { + format = require("lspkind").cmp_format({ + maxwidth = 50, + ellipsis_char = "...", + }), + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + experimental = { + ghost_text = { + hl_group = "Comment", + }, + }, + }) + + -- Optional: if you want dotenv completions only for .env files, you can remove it from the + -- global sources list above and add it here: + -- + -- cmp.setup.filetype("env", { + -- sources = { + -- { name = "dotenv" }, + -- }, + -- }) + end, +} diff --git a/lua/plugin/dap/dap-ui.lua b/lua/plugin/dap/dap-ui.lua new file mode 100644 index 0000000..4707e1d --- /dev/null +++ b/lua/plugin/dap/dap-ui.lua @@ -0,0 +1,77 @@ +-- INFO: Debug Adapter Protocol UI with interactive elements +-- NOTE: Provides visual debugging interface with variable inspection and REPL + +return { + "rcarriga/nvim-dap-ui", + dependencies = { + "mfussenegger/nvim-dap", + }, + keys = { + { + "td", + function() + require("dapui").toggle() + end, + desc = "Toggle Debug UI", + }, + { + "de", + function() + require("dapui").eval() + end, + desc = "Evaluate expression", + mode = { "n", "v" }, + }, + { + "db", + function() + require("dap").toggle_breakpoint() + end, + desc = "Toggle breakpoint", + }, + }, + opts = { + icons = { + expanded = "⯆", + collapsed = "⯈", + circular = "↺", + }, + layouts = { + { + elements = { + { id = "scopes", size = 0.35 }, + { id = "breakpoints", size = 0.15 }, + { id = "stacks", size = 0.25 }, + { id = "watches", size = 0.25 }, + }, + size = 0.3, + position = "left", + }, + { + elements = { + "repl", + "console", + }, + size = 0.25, + position = "bottom", + }, + }, + }, + config = function(_, opts) + local dapui = require("dapui") + local dap = require("dap") + + dapui.setup(opts) + + -- Auto open/close UI with debug sessions + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open() + end + dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close() + end + dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close() + end + end, +} diff --git a/lua/plugin/dap/dap.lua b/lua/plugin/dap/dap.lua new file mode 100644 index 0000000..fac5048 --- /dev/null +++ b/lua/plugin/dap/dap.lua @@ -0,0 +1,150 @@ +-- INFO: Configures nvim-dap +-- NOTE: 'mfussenegger/nvim-dap' provides the core Debug Adapter Protocol client for Neovim + +return { + "mfussenegger/nvim-dap", + lazy = true, + event = "VeryLazy", + dependencies = { + "rcarriga/nvim-dap-ui", + "theHamsta/nvim-dap-virtual-text", + }, + keys = { + { + "", + function() + require("dap").continue() + end, + desc = "Start/Continue Debugging", + }, + { + "", + function() + require("dap").step_over() + end, + desc = "Step Over", + }, + { + "", + function() + require("dap").step_into() + end, + desc = "Step Into", + }, + { + "", + function() + require("dap").step_out() + end, + desc = "Step Out", + }, + { + "b", + function() + require("dap").toggle_breakpoint() + end, + desc = "Toggle Breakpoint", + }, + { + "B", + function() + require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: ")) + end, + desc = "Set Conditional Breakpoint", + }, + { + "lp", + function() + require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: ")) + end, + desc = "Set Log Point", + }, + { + "dr", + function() + require("dap").repl.open() + end, + desc = "Open REPL", + }, + { + "dl", + function() + require("dap").run_last() + end, + desc = "Run Last Debugging Session", + }, + }, + config = function() + local dap = require("dap") + local mason_path = vim.fn.stdpath("data") .. "/mason/packages" + + -- Python (debugpy) + local python_path = mason_path .. "/debugpy/venv/bin/python" + dap.adapters.python = { + type = "executable", + command = python_path, + args = { "-m", "debugpy.adapter" }, + } + dap.configurations.python = { + { + type = "python", + request = "launch", + name = "Launch file", + program = "${file}", + pythonPath = function() + return python_path + end, + }, + } + + -- Bash (bash-debug-adapter) + local bash_adapter_path = mason_path .. "/bash-debug-adapter/bash-debug-adapter" + local bashdb_dir = mason_path .. "/bash-debug-adapter/extension/bashdb_dir" + dap.adapters.bashdb = { + type = "executable", + command = bash_adapter_path, + name = "bashdb", + } + dap.configurations.sh = { + { + type = "bashdb", + request = "launch", + name = "Launch Bash script", + showDebugOutput = true, + pathBashdb = bashdb_dir .. "/bashdb", + pathBashdbLib = bashdb_dir, + trace = true, + file = "${file}", + program = "${file}", + cwd = "${workspaceFolder}", + pathCat = "cat", + pathBash = "/bin/bash", + pathMkfifo = "mkfifo", + pathPkill = "pkill", + args = {}, + env = {}, + terminalKind = "integrated", + }, + } + + -- Firefox Debugging + local firefox_adapter_path = mason_path .. "/firefox-debug-adapter/dist/adapter.bundle.js" + dap.adapters.firefox = { + type = "executable", + command = "node", + args = { firefox_adapter_path }, + } + dap.configurations.javascript = { + { + name = "Launch Firefox", + type = "firefox", + request = "launch", + reAttach = true, + url = "http://localhost:3000", + webRoot = "${workspaceFolder}", + firefoxExecutable = "/usr/bin/firefox", + }, + } + dap.configurations.typescript = dap.configurations.javascript + end, +} diff --git a/lua/plugin/editor/surround.lua b/lua/plugin/editor/surround.lua new file mode 100644 index 0000000..7adc006 --- /dev/null +++ b/lua/plugin/editor/surround.lua @@ -0,0 +1,9 @@ +-- INFO: Easily add, delete, or change surroundings in Neovim +-- NOTE: Inspired by tpope/vim-surround, written in Lua + +return { + "kylechui/nvim-surround", + version = "*", + event = "VeryLazy", + opts = {}, +} diff --git a/lua/plugin/git/neogit.lua b/lua/plugin/git/neogit.lua new file mode 100644 index 0000000..b888e9d --- /dev/null +++ b/lua/plugin/git/neogit.lua @@ -0,0 +1,83 @@ +-- INFO: Provides an interactive Git interface within Neovim, inspired by Magit. +-- NOTE: Enhances Git operations directly from Neovim without leaving the editor. + +return { + "NeogitOrg/neogit", + lazy = false, + cmd = { "Neogit" }, + dependencies = { + "nvim-lua/plenary.nvim", + "sindrets/diffview.nvim", + "nvim-telescope/telescope.nvim", + }, + keys = { + { "gg", "Neogit", desc = "Open Neogit" }, + }, + + opts = { + disable_hint = false, + disable_context_highlighting = false, + disable_signs = false, + prompt_force_push = true, + disable_insert_on_commit = "auto", + filewatcher = { + interval = 1000, + enabled = true, + }, + graph_style = "kitty", + use_default_keymaps = true, + auto_refresh = true, + kind = "floating", + disable_line_numbers = true, + disable_relative_line_numbers = true, + console_timeout = 2000, + auto_show_console = true, + auto_close_console = true, + notification_icon = "", + status = { + show_head_commit_hash = true, + recent_commit_count = 10, + HEAD_padding = 10, + HEAD_folded = false, + mode_padding = 3, + mode_text = { + M = "modified", + N = "new file", + A = "added", + D = "deleted", + C = "copied", + U = "updated", + R = "renamed", + DD = "unmerged", + AU = "unmerged", + UD = "unmerged", + }, + }, + integrations = { + diffview = true, + }, + highlight = { + italic = true, + bold = true, + underline = true, + }, + remember_settings = true, + use_per_project_settings = true, + ignored_settings = { + "NeogitPushPopup--force-with-lease", + "NeogitPushPopup--force", + "NeogitPullPopup--rebase", + "NeogitCommitPopup--allow-empty", + "NeogitRevertPopup--no-edit", + }, + git_services = { + ["github.com"] = "https://github.com/${owner}/${repository}/compare/${branch_name}?expand=1", + ["bitbucket.org"] = "https://bitbucket.org/${owner}/${repository}/pull-requests/new?source=${branch_name}&t=1", + ["gitlab.com"] = "https://gitlab.com/${owner}/${repository}/merge_requests/new?merge_request[source_branch]=${branch_name}", + ["azure.com"] = "https://dev.azure.com/${owner}/_git/${repository}/pullrequestcreate?sourceRef=${branch_name}&targetRef=${target}", + }, + telescope_sorter = function() + return require("telescope").extensions.fzf.native_fzf_sorter() + end, + }, +} diff --git a/lua/plugin/lsp/sqls.lua b/lua/plugin/lsp/sqls.lua new file mode 100644 index 0000000..acdad6d --- /dev/null +++ b/lua/plugin/lsp/sqls.lua @@ -0,0 +1,18 @@ +-- INFO: SQL language support via LSP +-- NOTE: Requires Neovim 0.10+ and the sqls language server + +return { + "nanotee/sqls.nvim", + ft = { "sql" }, + dependencies = { "neovim/nvim-lspconfig" }, + config = function() + local lspconfig = require("lspconfig") + local sqls = require("sqls") + + lspconfig.sqls.setup({ + on_attach = function(client, bufnr) + sqls.on_attach(client, bufnr) + end, + }) + end, +} diff --git a/lua/plugin/syntax/rainbow-delimiters.lua b/lua/plugin/syntax/rainbow-delimiters.lua new file mode 100644 index 0000000..710daa6 --- /dev/null +++ b/lua/plugin/syntax/rainbow-delimiters.lua @@ -0,0 +1,29 @@ +-- INFO: Syntax-aware delimiter highlighting +-- NOTE: Context-aware bracket/quote colorization +return { + "hiphish/rainbow-delimiters.nvim", + event = "VeryLazy", + dependencies = { + "nvim-treesitter/nvim-treesitter", + }, + config = function() + require("rainbow-delimiters.setup").setup({ + highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowOrange", + "RainbowCyan", + "RainbowViolet", + "RainbowGreen", + "RainbowBlue", + }, + }) + vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#ea6962" }) + vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#d8a657" }) + vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#e78a4e" }) + vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#89b482" }) + vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#d3869b" }) + vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#7daea3" }) + vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#a9b665" }) + end, +} diff --git a/lua/plugin/syntax/treesitter.lua b/lua/plugin/syntax/treesitter.lua new file mode 100644 index 0000000..b9863ee --- /dev/null +++ b/lua/plugin/syntax/treesitter.lua @@ -0,0 +1,46 @@ +-- INFO: Advanced syntax parsing and highlighting +-- NOTE: Provides better code understanding and manipulation + +return { + "nvim-treesitter/nvim-treesitter", + event = "VeryLazy", + build = ":TSUpdate", + opts = { + ensure_installed = { + "bash", + "css", + "dockerfile", + "html", + "java", + "javascript", + "json", + "lua", + "markdown", + "python", + "sql", + "toml", + "typescript", + "yaml", + }, + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + incremental_selection = { + enable = true, + }, + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + }, + }, +} diff --git a/lua/plugin/testing/neotest.lua b/lua/plugin/testing/neotest.lua new file mode 100644 index 0000000..1293453 --- /dev/null +++ b/lua/plugin/testing/neotest.lua @@ -0,0 +1,37 @@ +-- INFO: Extensible framework for interacting with tests within Neovim +-- NOTE: Requires appropriate test adapters for your specific language/framework + +return { + "nvim-neotest/neotest", + event = { "BufReadPost", "BufNewFile" }, + dependencies = { + "nvim-neotest/nvim-nio", + "nvim-lua/plenary.nvim", + "antoinemadec/FixCursorHold.nvim", + "nvim-treesitter/nvim-treesitter", + -- Adapters for supported languages + "nvim-neotest/neotest-python", + "nvim-neotest/neotest-jest", + "rouge8/neotest-rust", + "rcasia/neotest-bash", + }, + config = function() + require("neotest").setup({ + adapters = { + require("neotest-python")({ + dap = { justMyCode = false }, + }), + require("neotest-jest")({ + jestCommand = "npm test --", + jestConfigFile = "jest.config.js", + env = { CI = true }, + cwd = function() + return vim.fn.getcwd() + end, + }), + require("neotest-rust"), + require("neotest-bash"), + }, + }) + end, +} diff --git a/lua/plugin/ui/bufferline.lua b/lua/plugin/ui/bufferline.lua new file mode 100644 index 0000000..5d58996 --- /dev/null +++ b/lua/plugin/ui/bufferline.lua @@ -0,0 +1,65 @@ +-- INFO: Enhanced tab/buffer management interface +-- NOTE: Provides visual navigation through open buffers with icons and diagnostics + +return { + "akinsho/bufferline.nvim", + lazy = false, + dependencies = { "nvim-tree/nvim-web-devicons" }, -- Just pretty icons + opts = { + options = { + mode = "tabs", + themable = true, + numbers = "ordinal", + right_mouse_command = false, + indicator = { + style = "underline", + }, + buffer_close_icon = "", + modified_icon = "", + close_icon = "", + left_trunc_marker = "", + right_trunc_marker = "", + diagnostics = "nvim_lsp", + diagnostics_indicator = function(count, level) + local icon = level:match("error") and " " or " " + return icon .. count + end, + offsets = { + { + filetype = "neo-tree", + text = "File Explorer", + text_align = "left", + separator = true, + }, + }, + color_icons = true, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = false, + show_tab_indicators = false, + show_duplicate_prefix = true, + separator_style = "slope", + enforce_regular_tabs = false, + always_show_bufferline = false, + hover = { + enabled = true, + delay = 100, + reveal = { "close" }, + }, + }, + highlights = { + separator = { + fg = "#252423", + bg = "#32302f", + }, + separator_selected = { + fg = "#252423", + bg = "#32302f", + }, + fill = { + fg = "#252423", + bg = "#252423", + }, + }, + }, +} diff --git a/lua/plugin/ui/dashboard.lua b/lua/plugin/ui/dashboard.lua new file mode 100644 index 0000000..bb11e08 --- /dev/null +++ b/lua/plugin/ui/dashboard.lua @@ -0,0 +1,70 @@ +-- INFO: Start screen plugin providing a customizable dashboard interface. +-- NOTE: Displays a dashboard with shortcuts and recent files/projects upon launching Neovim. + +return { + "nvimdev/dashboard-nvim", + lazy = false, + event = "VimEnter", + dependencies = { + { "nvim-tree/nvim-web-devicons" }, + }, + keys = {}, + opts = { + theme = "hyper", + config = { + header = { + "", + " ██████╗███████╗██╗ ████████╗██╗ ██████╗██╗ ██╗██╗███╗ ███╗", + "██╔════╝██╔════╝██║ ╚══██╔══╝██║██╔════╝██║ ██║██║████╗ ████║", + "██║ █████╗ ██║ ██║ ██║██║ ██║ ██║██║██╔████╔██║", + "██║ ██╔══╝ ██║ ██║ ██║██║ ╚██╗ ██╔╝██║██║╚██╔╝██║", + "╚██████╗███████╗███████╗██║ ██║╚██████╗ ╚████╔╝ ██║██║ ╚═╝ ██║", + " ╚═════╝╚══════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝", + "", + }, + shortcut = { + { + desc = "󰈮 Files", + group = "Orange", + action = "Telescope find_files", + key = "f", + }, + { + desc = " Plugins", + group = "Aqua", + action = "Lazy update", + key = "u", + }, + { + desc = " LSP", + group = "Aqua", + action = "Mason", + key = "s", + }, + }, + project = { + enable = true, + icon = " ", + label = " Recent project", + limit = 8, + action = "Telescope find_files cwd=", + }, + mru = { + enable = true, + icon = " ", + label = " Recent files", + limit = 10, + cwd_only = false, + }, + }, + }, + config = function(_, opts) + require("dashboard").setup(opts) + local set_hl = vim.api.nvim_set_hl + set_hl(0, "DashboardProjectIcon", { fg = "#a9b665" }) + set_hl(0, "DashboardProjectTitle", { fg = "#d8a657" }) + set_hl(0, "DashboardProjectTitleIcon", { fg = "#d8a657" }) + set_hl(0, "DashboardMruIcon", { fg = "#d8a657" }) + set_hl(0, "DashboardMruTitle", { fg = "#d8a657" }) + end, +} diff --git a/lua/plugin/ui/dressing.lua b/lua/plugin/ui/dressing.lua new file mode 100644 index 0000000..9ce9dc3 --- /dev/null +++ b/lua/plugin/ui/dressing.lua @@ -0,0 +1,14 @@ +-- INFO: Enhanced UI components for inputs and selects +-- NOTE: Improves default Neovim UI elements with modern styling + +return { + "stevearc/dressing.nvim", + opts = { + input = { + relative = "cursor", + prefer_width = 40, + min_width = 20, + border = "rounded", + }, + }, +} diff --git a/lua/plugin/ui/fine-cmd-line.lua b/lua/plugin/ui/fine-cmd-line.lua new file mode 100644 index 0000000..1b64df8 --- /dev/null +++ b/lua/plugin/ui/fine-cmd-line.lua @@ -0,0 +1,32 @@ +-- INFO: Enhanced command-line interface +-- NOTE: Provides a floating command palette with history + +return { + "VonHeikemen/fine-cmdline.nvim", + keys = { + { ":", "FineCmdline", desc = "Open command palette", mode = "n" }, + }, + dependencies = { "MunifTanjim/nui.nvim" }, + opts = { + cmdline = { + enable_keymaps = true, + smart_history = true, + prompt = " 󰘳 ", + }, + popup = { + position = { + row = "20%", + col = "50%", + }, + size = { + width = "40%", + min_width = 40, + max_width = 80, + height = "auto", + }, + border = { + style = "rounded", + }, + }, + }, +} diff --git a/lua/plugin/ui/lualine.lua b/lua/plugin/ui/lualine.lua new file mode 100644 index 0000000..079a93b --- /dev/null +++ b/lua/plugin/ui/lualine.lua @@ -0,0 +1,83 @@ +-- INFO: Customizable status line with real-time diagnostics +-- NOTE: Provides contextual information and mode awareness + +return { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + dependencies = { + "nvim-tree/nvim-web-devicons", + { + "linrongbin16/lsp-progress.nvim", + opts = { + client_format = function(client_name, spinner, series_messages) + local sign = " " + return #series_messages > 0 + and (string.format("%s%s %s %s", sign, spinner, client_name, table.concat(series_messages, " "))) + or "" + end, + }, + }, + }, + opts = { + options = { + theme = "gruvbox-material", + globalstatus = true, + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + disabled_filetypes = { "alpha", "dashboard" }, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { + "branch", + "diff", + { + "diagnostics", + symbols = { + error = " ", + warn = " ", + info = " ", + hint = " ", + }, + }, + }, + lualine_c = { + { + "filename", + path = 1, + symbols = { + modified = "● ", + readonly = " ", + unnamed = " ", + }, + }, + { + function() + return require("lsp-progress").progress() + end, + }, + }, + lualine_x = { + { + "searchcount", + maxcount = 999, + }, + "encoding", + "fileformat", + }, + lualine_y = { "progress" }, + lualine_z = { "location" }, + }, + extensions = { "neo-tree", "lazy" }, + }, + config = function(_, opts) + require("lualine").setup(opts) + + vim.api.nvim_create_augroup("lualine_augroup", { clear = true }) + vim.api.nvim_create_autocmd("User", { + group = "lualine_augroup", + pattern = "LspProgressStatusUpdated", + callback = require("lualine").refresh, + }) + end, +} diff --git a/lua/plugin/ui/notify.lua b/lua/plugin/ui/notify.lua new file mode 100644 index 0000000..90a41aa --- /dev/null +++ b/lua/plugin/ui/notify.lua @@ -0,0 +1,27 @@ +-- INFO: Notification plugin to replace vim.notify with a fancy floating notification system. +-- NOTE: Replaces default notifications with a configurable, animated notification popup. + +return { + "rcarriga/nvim-notify", + lazy = false, + dependencies = {}, + keys = {}, + opts = { + stages = "fade_in_slide_out", + timeout = 3000, + max_height = function() + return math.floor(vim.o.lines * 0.75) + end, + max_width = function() + return math.floor(vim.o.columns * 0.75) + end, + top_down = true, + background_colour = "#252423", + }, + + config = function(_, opts) + local notify = require("notify") + notify.setup(opts) + vim.notify = notify + end, +} diff --git a/lua/plugin/ui/nvim-tree.lua b/lua/plugin/ui/nvim-tree.lua new file mode 100644 index 0000000..c12a50c --- /dev/null +++ b/lua/plugin/ui/nvim-tree.lua @@ -0,0 +1,81 @@ +-- INFO: File tree explorer with enhanced features +-- NOTE: Provides traditional sidebar-style file navigation + +return { + "nvim-tree/nvim-tree.lua", + lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", -- pretty icons + }, + keys = { + { "te", ":NvimTreeToggle", desc = "Toggle file explorer (left sidebar)" }, + }, + opts = { + hijack_cursor = true, + reload_on_bufenter = true, + renderer = { + hidden_display = "all", + highlight_git = "name", + highlight_opened_files = "icon", + highlight_hidden = "name", + icons = { + git_placement = "after", + diagnostics_placement = "right_align", + glyphs = { + git = { + deleted = " ", + renamed = " ", + untracked = " ", + ignored = " ", + unstaged = " ", + staged = " ", + }, + }, + }, + }, + diagnostics = { + enable = true, + show_on_dirs = true, + icons = { + hint = " ", + info = " ", + warning = " ", + error = " ", + }, + }, + filters = { + dotfiles = true, + }, + tab = { + sync = { + open = true, + close = true, + }, + }, + }, + config = function(_, opts) + -- Set our own on_attach callback to override the default keymaps. + opts.on_attach = function(bufnr) + local api = require("nvim-tree.api") + + local function nnoremap(keys, func, desc) + vim.keymap.set( + "n", + keys, + func, + { buffer = bufnr, noremap = true, silent = true, nowait = true, desc = "nvim-tree: " .. desc } + ) + end + + api.config.mappings.default_on_attach(bufnr) + + -- Define new custom key mappings: + nnoremap(".", api.tree.change_root_to_node, "CD") + nnoremap("t", api.node.open.tab, "Open: New Tab") + nnoremap("s", api.node.open.vertical, "Open: Vertical Split") + nnoremap("S", api.node.open.horizontal, "Open: Horizontal Split") + end + + require("nvim-tree").setup(opts) + end, +} diff --git a/lua/plugin/ui/statuscol.lua b/lua/plugin/ui/statuscol.lua new file mode 100644 index 0000000..14a1c33 --- /dev/null +++ b/lua/plugin/ui/statuscol.lua @@ -0,0 +1,31 @@ +-- INFO: Interactive status column with fold indicators +-- NOTE: Provides clickable line numbers and fold markers + +return { + "luukvbaal/statuscol.nvim", + event = "VeryLazy", + dependencies = { "kevinhwang91/nvim-ufo" }, + opts = { + setopt = true, + relculright = true, + segments = { + { + text = { "%C" }, + click = "v:lua.ScFa", + condition = { true }, + hl = "FoldColumn", + }, + { + text = { "%s" }, + click = "v:lua.ScSa", + hl = "SignColumn", + }, + { + text = { " ", "", " " }, + click = "v:lua.ScLa", + hl = { "LineNr", "Comment" }, + condition = { true }, + }, + }, + }, +} diff --git a/lua/plugin/ui/ufo.lua b/lua/plugin/ui/ufo.lua new file mode 100644 index 0000000..4fb1425 --- /dev/null +++ b/lua/plugin/ui/ufo.lua @@ -0,0 +1,74 @@ +-- INFO: Advanced code folding with LSP integration +-- NOTE: Provides intuitive folding visualization and navigation + +return { + "kevinhwang91/nvim-ufo", + event = "LspAttach", + dependencies = { + "kevinhwang91/promise-async", + { + "luukvbaal/statuscol.nvim", + config = function() + require("statuscol").setup({ + foldfunc = "builtin", + setopt = true, + }) + end, + }, + }, + opts = { + fold_virt_text_handler = function(virtText, lnum, endLnum, width, truncate) + local newVirtText = {} + local suffix = (" 󰁂 %d "):format(endLnum - lnum) + local sufWidth = vim.fn.strdisplaywidth(suffix) + local targetWidth = width - sufWidth + local curWidth = 0 + + for _, chunk in ipairs(virtText) do + local chunkText = chunk[1] + local chunkWidth = vim.fn.strdisplaywidth(chunkText) + if targetWidth > curWidth + chunkWidth then + table.insert(newVirtText, chunk) + else + chunkText = truncate(chunkText, targetWidth - curWidth) + local hlGroup = chunk[2] + table.insert(newVirtText, { chunkText, hlGroup }) + chunkWidth = vim.fn.strdisplaywidth(chunkText) + if curWidth + chunkWidth < targetWidth then + suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) + end + break + end + curWidth = curWidth + chunkWidth + end + table.insert(newVirtText, { suffix, "UfoFoldedEllipsis" }) + return newVirtText + end, + provider_selector = function() + return { "treesitter", "indent" } + end, + }, + config = function(_, opts) + -- Configure LSP folding capabilities + -- UFO folding + vim.o.foldcolumn = "1" -- '0' is not bad + vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value + vim.o.foldlevelstart = 99 + vim.o.foldenable = true + vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]] + + -- Link custom highlight group + vim.api.nvim_set_hl(0, "UfoFoldedEllipsis", { link = "Comment" }) + + -- Initialize UFO with merged options + require("ufo").setup(opts) + + -- Key mappings for folding + vim.keymap.set("n", "zE", require("ufo").openAllFolds) + vim.keymap.set("n", "zC", require("ufo").closeAllFolds) + vim.keymap.set("n", "ze", require("ufo").openFoldsExceptKinds) + vim.keymap.set("n", "zc", function() + require("ufo").closeFoldsWith(1) -- Close only immediate fold + end, { desc = "Close current fold" }) + end, +} diff --git a/lua/plugin/util/garbage-day.lua b/lua/plugin/util/garbage-day.lua new file mode 100644 index 0000000..970b26d --- /dev/null +++ b/lua/plugin/util/garbage-day.lua @@ -0,0 +1,9 @@ +-- INFO: Optimize LSP memory usage by managing client lifecycle +-- NOTE: Automatically stops unused LSP clients to save RAM + +return { + "zeioth/garbage-day.nvim", + event = "VeryLazy", + dependencies = { "neovim/nvim-lspconfig" }, + opts = {}, +} diff --git a/lua/plugin/util/reactive.lua b/lua/plugin/util/reactive.lua new file mode 100644 index 0000000..05c155e --- /dev/null +++ b/lua/plugin/util/reactive.lua @@ -0,0 +1,93 @@ +-- INFO: Reactive UI highlighting +-- NOTE: Dynamic highlights based on context and mode + +return { + "rasulomaroff/reactive.nvim", + opts = function() + local mypreset = { + name = "mypreset", + init = function() + vim.opt.cursorline = true + vim.opt.termguicolors = true + end, + static = { + winhl = { + inactive = { + CursorLine = { bg = "#46413e" }, + CursorLineNr = { fg = "#d4be98", bg = "#46413e" }, + }, + }, + }, + modes = { + -- this does not work when whichkey is enabled + no = { + operators = { + [{ "gu", "gU", "g~", "~" }] = { + winhl = { + CursorLine = { bg = "#334155" }, + CursorLineNr = { fg = "#cbd5e1", bg = "#334155" }, + }, + }, + c = { + winhl = { + CursorLine = { bg = "#424a3e" }, + CursorLineNr = { fg = "#d4be98", bg = "#424a3e" }, + }, + }, + d = { + winhl = { + CursorLine = { bg = "#472322" }, + CursorLineNr = { fg = "#d4be98", bg = "#472322" }, + }, + }, + y = { + winhl = { + CursorLine = { bg = "#574833" }, + CursorLineNr = { fg = "#d4be98", bg = "#574833" }, + }, + }, + }, + }, + + i = { + winhl = { + CursorLine = { bg = "#5b534d" }, + CursorLineNr = { fg = "#d4be98", bg = "#5b534d" }, + }, + }, + n = { + winhl = { + CursorLine = { bg = "#404946" }, + CursorLineNr = { fg = "#d4be98", bg = "#404946" }, + }, + }, + [{ "v", "V", "\x16" }] = { + winhl = { + CursorLineNr = { fg = "#d4be98" }, + Visual = { bg = "#0f3a42" }, + }, + }, + [{ "s", "S", "\x13" }] = { + winhl = { + CursorLineNr = { fg = "#d4be98" }, + Visual = { bg = "#0f3a42" }, + }, + }, + R = { + winhl = { + CursorLine = { bg = "#543937" }, + CursorLineNr = { fg = "#d4be98", bg = "#543937" }, + }, + }, + }, + } + require("reactive").add_preset(mypreset) + return { + builtin = { + cursorline = false, + cursor = false, + modemsg = false, + }, + } + end, +} diff --git a/lua/plugin/util/todo-comments.lua b/lua/plugin/util/todo-comments.lua new file mode 100644 index 0000000..a8118b5 --- /dev/null +++ b/lua/plugin/util/todo-comments.lua @@ -0,0 +1,41 @@ +-- INFO: Highlight and manage todo comments +-- NOTE: Visualize todos with colored icons and diagnostics + +return { + "folke/todo-comments.nvim", + event = "BufReadPost", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { + keywords = { + FIX = { icon = " ", color = "fix" }, + TODO = { icon = " ", color = "todo" }, + HACK = { icon = " ", color = "hack" }, + WARN = { icon = " ", color = "warn" }, + PERF = { icon = "󰅒 ", color = "perf" }, + NOTE = { icon = "󰎞 ", color = "note" }, + TEST = { icon = "󰙨 ", color = "test" }, + }, + colors = { + error = { "DiagnosticError" }, + warning = { "DiagnosticWarn" }, + info = { "DiagnosticInfo" }, + hint = { "DiagnosticHint" }, + default = { "Comment" }, + fix = "#ea6962", + todo = "#e78a4e", + hack = "#d8a657", + warn = "#d8a657", + perf = "#7daea3", + note = "#89b482", + test = "#d3869b", + }, + highlight = { + pattern = [[.*<(KEYWORDS)\s*]], + keyword = "bg", + after = "fg", + }, + search = { + pattern = [[\b(KEYWORDS)\b]], + }, + }, +}