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/.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/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/plugin/lazy.lua b/lua/core/lazy.lua similarity index 81% rename from lua/plugin/lazy.lua rename to lua/core/lazy.lua index d052095..465bb55 100644 --- a/lua/plugin/lazy.lua +++ b/lua/core/lazy.lua @@ -27,9 +27,15 @@ 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.theme" }, + { import = "plugin.syntax" }, + { import = "plugin.testing" }, + { import = "plugin.ui" }, { import = "plugin.util" }, }, checker = { enabled = true }, 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/theme/colorizer.lua b/lua/plugin/colors/colorizer.lua similarity index 100% rename from lua/plugin/theme/colorizer.lua rename to lua/plugin/colors/colorizer.lua diff --git a/lua/plugin/theme/colorscheme.lua b/lua/plugin/colors/colorscheme.lua similarity index 100% rename from lua/plugin/theme/colorscheme.lua rename to lua/plugin/colors/colorscheme.lua diff --git a/lua/plugin/editor/tiny-devicons-auto-colors.lua b/lua/plugin/colors/tiny-devicons-auto-colors.lua similarity index 100% rename from lua/plugin/editor/tiny-devicons-auto-colors.lua rename to lua/plugin/colors/tiny-devicons-auto-colors.lua diff --git a/lua/plugin/editor/cmp-dotenv.lua b/lua/plugin/completion/cmp-dotenv.lua similarity index 100% rename from lua/plugin/editor/cmp-dotenv.lua rename to lua/plugin/completion/cmp-dotenv.lua diff --git a/lua/plugin/editor/cmp.lua b/lua/plugin/completion/cmp.lua similarity index 100% rename from lua/plugin/editor/cmp.lua rename to lua/plugin/completion/cmp.lua diff --git a/lua/plugin/lsp/dap-ui.lua b/lua/plugin/dap/dap-ui.lua similarity index 98% rename from lua/plugin/lsp/dap-ui.lua rename to lua/plugin/dap/dap-ui.lua index c64c560..4707e1d 100644 --- a/lua/plugin/lsp/dap-ui.lua +++ b/lua/plugin/dap/dap-ui.lua @@ -8,7 +8,7 @@ return { }, keys = { { - "du", + "td", function() require("dapui").toggle() end, diff --git a/lua/plugin/lsp/dap.lua b/lua/plugin/dap/dap.lua similarity index 100% rename from lua/plugin/lsp/dap.lua rename to lua/plugin/dap/dap.lua diff --git a/lua/plugin/util/surround.lua b/lua/plugin/editor/surround.lua similarity index 100% rename from lua/plugin/util/surround.lua rename to lua/plugin/editor/surround.lua diff --git a/lua/plugin/util/neogit.lua b/lua/plugin/git/neogit.lua similarity index 100% rename from lua/plugin/util/neogit.lua rename to lua/plugin/git/neogit.lua 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/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/util/sqls.lua b/lua/plugin/lsp/sqls.lua similarity index 100% rename from lua/plugin/util/sqls.lua rename to lua/plugin/lsp/sqls.lua diff --git a/lua/plugin/editor/rainbow-delimiters.lua b/lua/plugin/syntax/rainbow-delimiters.lua similarity index 100% rename from lua/plugin/editor/rainbow-delimiters.lua rename to lua/plugin/syntax/rainbow-delimiters.lua diff --git a/lua/plugin/editor/treesitter.lua b/lua/plugin/syntax/treesitter.lua similarity index 97% rename from lua/plugin/editor/treesitter.lua rename to lua/plugin/syntax/treesitter.lua index f7276a0..b9863ee 100644 --- a/lua/plugin/editor/treesitter.lua +++ b/lua/plugin/syntax/treesitter.lua @@ -24,6 +24,7 @@ return { }, auto_install = true, highlight = { + enable = true, additional_vim_regex_highlighting = false, }, incremental_selection = { diff --git a/lua/plugin/lsp/neotest.lua b/lua/plugin/testing/neotest.lua similarity index 100% rename from lua/plugin/lsp/neotest.lua rename to lua/plugin/testing/neotest.lua diff --git a/lua/plugin/theme/bufferline.lua b/lua/plugin/ui/bufferline.lua similarity index 100% rename from lua/plugin/theme/bufferline.lua rename to lua/plugin/ui/bufferline.lua diff --git a/lua/plugin/util/dashboard.lua b/lua/plugin/ui/dashboard.lua similarity index 100% rename from lua/plugin/util/dashboard.lua rename to lua/plugin/ui/dashboard.lua diff --git a/lua/plugin/theme/dressing.lua b/lua/plugin/ui/dressing.lua similarity index 100% rename from lua/plugin/theme/dressing.lua rename to lua/plugin/ui/dressing.lua diff --git a/lua/plugin/util/fine-cmd-line.lua b/lua/plugin/ui/fine-cmd-line.lua similarity index 100% rename from lua/plugin/util/fine-cmd-line.lua rename to lua/plugin/ui/fine-cmd-line.lua diff --git a/lua/plugin/theme/lualine.lua b/lua/plugin/ui/lualine.lua similarity index 91% rename from lua/plugin/theme/lualine.lua rename to lua/plugin/ui/lualine.lua index 5076dd2..079a93b 100644 --- a/lua/plugin/theme/lualine.lua +++ b/lua/plugin/ui/lualine.lua @@ -11,7 +11,9 @@ return { opts = { client_format = function(client_name, spinner, series_messages) local sign = " " - return #series_messages > 0 and (sign .. client_name .. " " .. table.concat(series_messages, " ")) or "" + return #series_messages > 0 + and (string.format("%s%s %s %s", sign, spinner, client_name, table.concat(series_messages, " "))) + or "" end, }, }, diff --git a/lua/plugin/util/notify.lua b/lua/plugin/ui/notify.lua similarity index 67% rename from lua/plugin/util/notify.lua rename to lua/plugin/ui/notify.lua index 4eec78a..90a41aa 100644 --- a/lua/plugin/util/notify.lua +++ b/lua/plugin/ui/notify.lua @@ -2,21 +2,10 @@ -- 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, @@ -27,7 +16,7 @@ return { return math.floor(vim.o.columns * 0.75) end, top_down = true, - background_colour = "#1e222a", + background_colour = "#252423", }, config = function(_, opts) diff --git a/lua/plugin/util/nvim-tree.lua b/lua/plugin/ui/nvim-tree.lua similarity index 100% rename from lua/plugin/util/nvim-tree.lua rename to lua/plugin/ui/nvim-tree.lua diff --git a/lua/plugin/theme/statuscol.lua b/lua/plugin/ui/statuscol.lua similarity index 100% rename from lua/plugin/theme/statuscol.lua rename to lua/plugin/ui/statuscol.lua diff --git a/lua/plugin/editor/ufo.lua b/lua/plugin/ui/ufo.lua similarity index 100% rename from lua/plugin/editor/ufo.lua rename to lua/plugin/ui/ufo.lua diff --git a/lua/plugin/lsp/garbage-day.lua b/lua/plugin/util/garbage-day.lua similarity index 100% rename from lua/plugin/lsp/garbage-day.lua rename to lua/plugin/util/garbage-day.lua diff --git a/lua/plugin/editor/reactive.lua b/lua/plugin/util/reactive.lua similarity index 100% rename from lua/plugin/editor/reactive.lua rename to lua/plugin/util/reactive.lua 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/editor/todo-comments.lua b/lua/plugin/util/todo-comments.lua similarity index 100% rename from lua/plugin/editor/todo-comments.lua rename to lua/plugin/util/todo-comments.lua