diff --git a/.config/nvim/.github/README.md b/.config/nvim/.github/README.md index 9dd17178..5ee9d4dd 100644 --- a/.config/nvim/.github/README.md +++ b/.config/nvim/.github/README.md @@ -186,6 +186,7 @@ - [monaqa/dial.nvim](https://dotfyle.com/plugins/monaqa/dial.nvim) - [chrisgrieser/nvim-various-textobjs](https://dotfyle.com/plugins/chrisgrieser/nvim-various-textobjs) + - [johmsalas/text-case.nvim](https://dotfyle.com/plugins/johmsalas/text-case.nvim) - [ckolkey/ts-node-action](https://dotfyle.com/plugins/ckolkey/ts-node-action) - [debugloop/telescope-undo.nvim](https://dotfyle.com/plugins/debugloop/telescope-undo.nvim) - [echasnovski/mini.pairs](https://dotfyle.com/plugins/echasnovski/mini.pairs) diff --git a/.config/nvim/lazyvim.json b/.config/nvim/lazyvim.json index b66e816f..3ac47365 100644 --- a/.config/nvim/lazyvim.json +++ b/.config/nvim/lazyvim.json @@ -43,8 +43,6 @@ "plugins.extras.editor.telescope.zoxide", "plugins.extras.editor.terminal.floaterm", "plugins.extras.formatting.prettier-extended", - "plugins.extras.formatting.ruff", - "plugins.extras.formatting.rustfmt", "plugins.extras.formatting.trim_newlines", "plugins.extras.formatting.trim_whitespace", "plugins.extras.lang.ansible", @@ -59,7 +57,6 @@ "plugins.extras.linting.biome", "plugins.extras.linting.cspell", "plugins.extras.linting.eslint-extended", - "plugins.extras.linting.shellcheck", "plugins.extras.lsp.actions-preview", "plugins.extras.lsp.file-operations", "plugins.extras.lsp.garbage-day", diff --git a/.config/nvim/lua/plugins/extras/formatting/ruff.lua b/.config/nvim/lua/plugins/extras/formatting/ruff.lua deleted file mode 100644 index e6171725..00000000 --- a/.config/nvim/lua/plugins/extras/formatting/ruff.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - { - "stevearc/conform.nvim", - opts = function(_, opts) - opts.formatters_by_ft.python = opts.formatters_by_ft.python or {} - table.insert(opts.formatters_by_ft.python, "ruff_format") - return opts - end, - }, - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "ruff-lsp" }) - end, - }, -} diff --git a/.config/nvim/lua/plugins/extras/formatting/rustfmt.lua b/.config/nvim/lua/plugins/extras/formatting/rustfmt.lua deleted file mode 100644 index 7c4c0528..00000000 --- a/.config/nvim/lua/plugins/extras/formatting/rustfmt.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "stevearc/conform.nvim", - opts = function(_, opts) - opts.formatters_by_ft.rust = opts.formatters_by_ft.rust or {} - table.insert(opts.formatters_by_ft.rust, "rustfmt") - return opts - end, -} diff --git a/.config/nvim/lua/plugins/extras/formatting/rustywind.lua b/.config/nvim/lua/plugins/extras/formatting/rustywind.lua index fe944c1b..633f296e 100644 --- a/.config/nvim/lua/plugins/extras/formatting/rustywind.lua +++ b/.config/nvim/lua/plugins/extras/formatting/rustywind.lua @@ -9,8 +9,6 @@ return { { "stevearc/conform.nvim", opts = function(_, opts) - --- Extend the conform plugin config and add given formatters - ---@param tbl table Table of filetype to formatters mappings local function add_formatters(tbl) for ft, formatters in pairs(tbl) do if opts.formatters_by_ft[ft] == nil then diff --git a/.config/nvim/lua/plugins/extras/formatting/sqlfmt.lua b/.config/nvim/lua/plugins/extras/formatting/sqlfmt.lua deleted file mode 100644 index 2a279ba3..00000000 --- a/.config/nvim/lua/plugins/extras/formatting/sqlfmt.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "sqlfmt" }) - end, - }, - { - "stevearc/conform.nvim", - opts = function(_, opts) - --- Extend the conform plugin config and add given formatters - ---@param tbl table Table of filetype to formatters mappings - local function add_formatters(tbl) - for ft, formatters in pairs(tbl) do - if opts.formatters_by_ft[ft] == nil then - opts.formatters_by_ft[ft] = formatters - else - vim.list_extend(opts.formatters_by_ft[ft], formatters) - end - end - end - - add_formatters({ - ["sql"] = { "sqlfmt" }, - ["plsql"] = { "sqlfmt" }, - ["mysql"] = { "sqlfmt" }, - }) - end, - }, -} diff --git a/.config/nvim/lua/plugins/extras/lang/bash.lua b/.config/nvim/lua/plugins/extras/lang/bash.lua index 9a92a797..d5e6d281 100644 --- a/.config/nvim/lua/plugins/extras/lang/bash.lua +++ b/.config/nvim/lua/plugins/extras/lang/bash.lua @@ -19,7 +19,15 @@ return { "williamboman/mason.nvim", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "bash-language-server" }) + vim.list_extend(opts.ensure_installed, { "bash-language-server", "shellcheck" }) + end, + }, + { + "mfussenegger/nvim-lint", + opts = function(_, opts) + opts.linters_by_ft.bash = opts.linters_by_ft.bash or {} + table.insert(opts.linters_by_ft.bash, "shellcheck") + return opts end, }, { diff --git a/.config/nvim/lua/plugins/extras/lang/go-extended.lua b/.config/nvim/lua/plugins/extras/lang/go-extended.lua index 042b2735..e3b44c8e 100644 --- a/.config/nvim/lua/plugins/extras/lang/go-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/go-extended.lua @@ -1,5 +1,12 @@ return { { import = "lazyvim.plugins.extras.lang.go" }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "golangcil-lint" }) + end, + }, { "ray-x/go.nvim", dependencies = { @@ -10,7 +17,31 @@ return { opts = {}, event = { "LazyFile" }, ft = { "go", "gomod" }, - build = ':lua require("go.install").update_all_sync()', + build = function() + require("go.install").update_all_sync() + end, + }, + { + "mfussenegger/nvim-lint", + opts = function(_, opts) + local function add_linters(tbl) + for ft, linters in pairs(tbl) do + if opts.linters_by_ft[ft] == nil then + opts.linters_by_ft[ft] = linters + else + vim.list_extend(opts.linters_by_ft[ft], linters) + end + end + end + + add_linters({ + ["go"] = { "golangcilint" }, + ["gomod"] = { "golangcilint" }, + ["gowork"] = { "golangcilint" }, + }) + + return opts + end, }, { "luckasRanarison/nvim-devdocs", diff --git a/.config/nvim/lua/plugins/extras/lang/python-extended.lua b/.config/nvim/lua/plugins/extras/lang/python-extended.lua index a36f4c5d..f275bb78 100644 --- a/.config/nvim/lua/plugins/extras/lang/python-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/python-extended.lua @@ -1,5 +1,13 @@ return { { import = "lazyvim.plugins.extras.lang.python" }, + { + "stevearc/conform.nvim", + opts = function(_, opts) + opts.formatters_by_ft.python = opts.formatters_by_ft.python or {} + table.insert(opts.formatters_by_ft.python, "ruff_format") + return opts + end, + }, { "luckasRanarison/nvim-devdocs", optional = true, diff --git a/.config/nvim/lua/plugins/extras/lang/rust-extended.lua b/.config/nvim/lua/plugins/extras/lang/rust-extended.lua index 85980a7e..260bee43 100644 --- a/.config/nvim/lua/plugins/extras/lang/rust-extended.lua +++ b/.config/nvim/lua/plugins/extras/lang/rust-extended.lua @@ -67,6 +67,9 @@ return { opts = function(_, opts) opts.formatters_by_ft.toml = opts.formatters_by_ft.toml or {} table.insert(opts.formatters_by_ft.toml, "taplo") + + opts.formatters_by_ft.rust = opts.formatters_by_ft.rust or {} + table.insert(opts.formatters_by_ft.rust, "rustfmt") return opts end, }, diff --git a/.config/nvim/lua/plugins/extras/lang/sql.lua b/.config/nvim/lua/plugins/extras/lang/sql.lua index 09b004e1..5d15470f 100644 --- a/.config/nvim/lua/plugins/extras/lang/sql.lua +++ b/.config/nvim/lua/plugins/extras/lang/sql.lua @@ -73,7 +73,7 @@ return { "williamboman/mason.nvim", opts = function(_, opts) opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "sqlls" }) + vim.list_extend(opts.ensure_installed, { "sqlls", "sqlfmt", "sqlfluff" }) end, }, { @@ -84,6 +84,48 @@ return { }, }, }, + { + "mfussenegger/nvim-lint", + opts = function(_, opts) + local function add_linters(tbl) + for ft, linters in pairs(tbl) do + if opts.linters_by_ft[ft] == nil then + opts.linters_by_ft[ft] = linters + else + vim.list_extend(opts.linters_by_ft[ft], linters) + end + end + end + + add_linters({ + ["sql"] = { "sqlfluff" }, + ["plsql"] = { "sqlfluff" }, + ["mysql"] = { "sqlfluff" }, + }) + + return opts + end, + }, + { + "stevearc/conform.nvim", + opts = function(_, opts) + local function add_formatters(tbl) + for ft, formatters in pairs(tbl) do + if opts.formatters_by_ft[ft] == nil then + opts.formatters_by_ft[ft] = formatters + else + vim.list_extend(opts.formatters_by_ft[ft], formatters) + end + end + end + + add_formatters({ + ["sql"] = { "sqlfmt" }, + ["plsql"] = { "sqlfmt" }, + ["mysql"] = { "sqlfmt" }, + }) + end, + }, { "luckasRanarison/nvim-devdocs", optional = true, diff --git a/.config/nvim/lua/plugins/extras/linting/golangci.lua b/.config/nvim/lua/plugins/extras/linting/golangci.lua deleted file mode 100644 index 86697c7c..00000000 --- a/.config/nvim/lua/plugins/extras/linting/golangci.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "golangcil-lint" }) - end, - }, - { - "mfussenegger/nvim-lint", - opts = function(_, opts) - local function add_linters(tbl) - for ft, linters in pairs(tbl) do - if opts.linters_by_ft[ft] == nil then - opts.linters_by_ft[ft] = linters - else - vim.list_extend(opts.linters_by_ft[ft], linters) - end - end - end - - add_linters({ - ["go"] = { "golangcilint" }, - ["gomod"] = { "golangcilint" }, - ["gowork"] = { "golangcilint" }, - }) - - return opts - end, - }, -} diff --git a/.config/nvim/lua/plugins/extras/linting/shellcheck.lua b/.config/nvim/lua/plugins/extras/linting/shellcheck.lua deleted file mode 100644 index 41fb447b..00000000 --- a/.config/nvim/lua/plugins/extras/linting/shellcheck.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "shellcheck" }) - end, - }, - { - "mfussenegger/nvim-lint", - opts = function(_, opts) - opts.linters_by_ft.bash = opts.linters_by_ft.bash or {} - table.insert(opts.linters_by_ft.bash, "shellcheck") - return opts - end, - }, -} diff --git a/.config/nvim/lua/plugins/extras/linting/sqlfluff.lua b/.config/nvim/lua/plugins/extras/linting/sqlfluff.lua deleted file mode 100644 index 1187c8ed..00000000 --- a/.config/nvim/lua/plugins/extras/linting/sqlfluff.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - { - "williamboman/mason.nvim", - opts = function(_, opts) - opts.ensure_installed = opts.ensure_installed or {} - vim.list_extend(opts.ensure_installed, { "sqlfluff" }) - end, - }, - { - "mfussenegger/nvim-lint", - opts = function(_, opts) - local function add_linters(tbl) - for ft, linters in pairs(tbl) do - if opts.linters_by_ft[ft] == nil then - opts.linters_by_ft[ft] = linters - else - vim.list_extend(opts.linters_by_ft[ft], linters) - end - end - end - - add_linters({ - ["sql"] = { "sqlfluff" }, - ["plsql"] = { "sqlfluff" }, - ["mysql"] = { "sqlfluff" }, - }) - - return opts - end, - }, -}