diff --git a/stow-packages/nvim/.config/nvim/lazy-lock.json b/stow-packages/nvim/.config/nvim/lazy-lock.json index 8bdc68d..2d6d85e 100644 --- a/stow-packages/nvim/.config/nvim/lazy-lock.json +++ b/stow-packages/nvim/.config/nvim/lazy-lock.json @@ -12,6 +12,7 @@ "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, "codediff.nvim": { "branch": "main", "commit": "783258e587bd1bc2bba4d617d648e7424d594107" }, "colorbuddy.nvim": { "branch": "master", "commit": "8b968581e5c19d22a861d5f3fe5dbd83394fa681" }, + "conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" }, "copilot.lua": { "branch": "master", "commit": "1eecd6c47e2b1c1a7affaa23a3ab61d344be56d1" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, diff --git a/stow-packages/nvim/.config/nvim/lua/community.lua b/stow-packages/nvim/.config/nvim/lua/community.lua index f7e6c97..7bb4607 100644 --- a/stow-packages/nvim/.config/nvim/lua/community.lua +++ b/stow-packages/nvim/.config/nvim/lua/community.lua @@ -8,4 +8,5 @@ return { { import = "astrocommunity.completion.copilot-lua" }, { import = "astrocommunity.colorscheme.neosolarized-nvim" }, { import = "astrocommunity.git.codediff-nvim" }, + { import = "astrocommunity.editing-support.conform-nvim" }, } diff --git a/stow-packages/nvim/.config/nvim/lua/plugins/astrolsp.lua b/stow-packages/nvim/.config/nvim/lua/plugins/astrolsp.lua index e837b4c..85a5585 100644 --- a/stow-packages/nvim/.config/nvim/lua/plugins/astrolsp.lua +++ b/stow-packages/nvim/.config/nvim/lua/plugins/astrolsp.lua @@ -28,9 +28,9 @@ return { }, timeout_ms = 5000, }, - -- enable servers that you already have installed without mason + -- enable servers not automatically set up by mason-lspconfig servers = { - -- "pyright" + "oxlint", -- only activates in projects with .oxlintrc.json (via lspconfig root_dir) }, -- customize language server configuration options passed to `lspconfig` ---@diagnostic disable: missing-fields diff --git a/stow-packages/nvim/.config/nvim/lua/plugins/conform.lua b/stow-packages/nvim/.config/nvim/lua/plugins/conform.lua new file mode 100644 index 0000000..332423b --- /dev/null +++ b/stow-packages/nvim/.config/nvim/lua/plugins/conform.lua @@ -0,0 +1,25 @@ +local oxfmt_with_fallback = { "oxfmt", lsp_format = "fallback" } + +---@type LazySpec +return { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + javascript = oxfmt_with_fallback, + javascriptreact = oxfmt_with_fallback, + typescript = oxfmt_with_fallback, + typescriptreact = oxfmt_with_fallback, + vue = oxfmt_with_fallback, + svelte = oxfmt_with_fallback, + astro = oxfmt_with_fallback, + json = oxfmt_with_fallback, + jsonc = oxfmt_with_fallback, + css = oxfmt_with_fallback, + scss = oxfmt_with_fallback, + html = oxfmt_with_fallback, + markdown = oxfmt_with_fallback, + graphql = oxfmt_with_fallback, + yaml = oxfmt_with_fallback, + }, + }, +} diff --git a/stow-packages/nvim/.config/nvim/lua/plugins/mason-tool-installer.lua b/stow-packages/nvim/.config/nvim/lua/plugins/mason-tool-installer.lua index 1a7e9e8..2e139f2 100644 --- a/stow-packages/nvim/.config/nvim/lua/plugins/mason-tool-installer.lua +++ b/stow-packages/nvim/.config/nvim/lua/plugins/mason-tool-installer.lua @@ -9,14 +9,14 @@ return { "angular-language-server", "astro-language-server", "bash-language-server", - -- TODO(serhalp) Configure conditional loading for Biome projects - -- "biome", -- TODO(serhalp) Conditionally enable commitlint -- "commitlint", "css-lsp", -- FIXME(serhalp) Configure conditional loading for Deno files -- "deno", "eslint-lsp", + "oxfmt", + "oxlint", "html-lsp", "json-lsp", "lua-language-server", diff --git a/stow-packages/nvim/.config/nvim/lua/plugins/user.lua b/stow-packages/nvim/.config/nvim/lua/plugins/user.lua index b3bfb2e..194d868 100644 --- a/stow-packages/nvim/.config/nvim/lua/plugins/user.lua +++ b/stow-packages/nvim/.config/nvim/lua/plugins/user.lua @@ -6,10 +6,7 @@ return { "kylechui/nvim-surround", version = "*", event = "VeryLazy", - config = function() - require("nvim-surround").setup({ - }) - end + config = function() require("nvim-surround").setup {} end, }, { "tpope/vim-fugitive",