From 9d2f3d72dbc8280a859874d0a1c9f40acb2df47c Mon Sep 17 00:00:00 2001 From: Aleksey Imuzov Date: Sat, 10 Oct 2026 14:29:36 +0400 Subject: [PATCH 1/3] fix(formatting): pick oxfmt only by its own config An .oxlintrc.json next to a Prettier setup marked the project as oxfmt-formatted, so Prettier stopped running on save and oxfmt took over ts files with its defaults and left astro unformatted. Only oxfmt's own config switches formatters now. --- lua/lazyvimx/overrides/lazyvim/lang-oxc.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lua/lazyvimx/overrides/lazyvim/lang-oxc.lua b/lua/lazyvimx/overrides/lazyvim/lang-oxc.lua index 32dfa5c..6185153 100644 --- a/lua/lazyvimx/overrides/lazyvim/lang-oxc.lua +++ b/lua/lazyvimx/overrides/lazyvim/lang-oxc.lua @@ -1,18 +1,16 @@ -- Разводит prettier и oxfmt по проектам, чтобы не дрались за один буфер: --- oxfmt — только где лежит oxc-конфиг, prettier — только где его нет. +-- oxfmt — только где лежит его конфиг, prettier — только где его нет. -- Иначе extra `lang.typescript.oxc` гоняет oxfmt во всех JS/TS-проектах. +-- Конфиг oxlint не в счёт: линтер часто живёт рядом с prettier. -local oxc_markers = { +local oxfmt_markers = { ".oxfmtrc.json", ".oxfmtrc.jsonc", "oxfmt.config.ts", - ".oxlintrc.json", - ".oxlintrc.jsonc", - "oxlint.config.ts", } -local function has_oxc(ctx) - return vim.fs.root(ctx.filename, oxc_markers) ~= nil +local function has_oxfmt(ctx) + return vim.fs.root(ctx.filename, oxfmt_markers) ~= nil end local function with_condition(formatter, extra_condition) @@ -35,13 +33,13 @@ return { end opts.formatters = opts.formatters or {} - opts.formatters.oxfmt = with_condition(opts.formatters.oxfmt, has_oxc) + opts.formatters.oxfmt = with_condition(opts.formatters.oxfmt, has_oxfmt) if LazyVim.has_extra("formatting.prettier") then -- condition у prettier уже проверяет парсер, а модуль с проверкой -- апстрим наружу не отдаёт — поэтому оборачиваем, а не заменяем. opts.formatters.prettier = with_condition(opts.formatters.prettier, function(ctx) - return not has_oxc(ctx) + return not has_oxfmt(ctx) end) end end, From a03f330a9b1ebb36aaa06a1c474170286e0b1f7a Mon Sep 17 00:00:00 2001 From: Aleksey Imuzov Date: Thu, 15 Oct 2026 22:06:19 +0400 Subject: [PATCH 2/3] feat(lang): format and lint Astro like Svelte Astro files get prettier plus stylelint on format and stylelint_lsp diagnostics, the same way Svelte does. The stylelint formatter with postcss-html moves to util/stylelint.lua and serves both. The vscode-js debugger and the stylelint_lsp validate list know about astro too, and the docs now count 40 overrides. --- .gitignore | 2 +- README.md | 10 +++---- README.ru.md | 10 +++---- docs/ARCHITECTURE.md | 4 +-- docs/ARCHITECTURE.ru.md | 4 +-- docs/EXTRAS.md | 10 +++---- docs/EXTRAS.ru.md | 10 +++---- docs/FAQ.md | 2 +- docs/FAQ.ru.md | 2 +- lua/lazyvimx/extras/dap/vscode-js.lua | 2 +- lua/lazyvimx/extras/linting/stylelint.lua | 4 +-- lua/lazyvimx/overrides/lazyvim/lang-astro.lua | 30 +++++++++++++++++++ .../overrides/lazyvim/lang-svelte.lua | 12 +------- lua/lazyvimx/util/stylelint.lua | 17 +++++++++++ 14 files changed, 78 insertions(+), 41 deletions(-) create mode 100644 lua/lazyvimx/overrides/lazyvim/lang-astro.lua create mode 100644 lua/lazyvimx/util/stylelint.lua diff --git a/.gitignore b/.gitignore index c767375..ec9cc59 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .DS_Store -dot_config/nvim/.luarc.json +.luarc.json node_modules diff --git a/README.md b/README.md index 0aceeb6..54ae8b4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@

Optional extras and plugin overrides, documented at lazyvimx.aimuzov.online

**An enhancement layer on top of [LazyVim](https://github.com/LazyVim/LazyVim): 51 optional -extras and 39 plugin overrides.** +extras and 40 plugin overrides.** The idea is simple: LazyVim stays untouched, and everything else — UI polish, navigation, git workflow, Russian keyboard support — is enabled piece by piece. Don't like an extra? @@ -197,8 +197,8 @@ lazyvimx/ │ │ ├── colorschemes/ # Colorschemes (1) │ │ ├── dap/ # Debugging (1) │ │ └── test/ # Testing (1) -│ ├── overrides/ # Plugin customizations (39) -│ │ ├── lazyvim/ # LazyVim (9) +│ ├── overrides/ # Plugin customizations (40) +│ │ ├── lazyvim/ # LazyVim (10) │ │ ├── snacks/ # Snacks.nvim (9) │ │ ├── bufferline/ # Bufferline (6) │ │ └── other/ # Other plugins (15) @@ -220,7 +220,7 @@ Enable everything at once — `core.all` via `:LazyExtras` or an import: Inside: -- **overrides** — all 39 plugin customizations +- **overrides** — all 40 plugin customizations - **extras** — all feature extras - **colorschemes** — additional colorschemes - **keys** — custom keymaps @@ -363,7 +363,7 @@ A mode for the VSCode Neovim extension: ## 📊 Stats - **51 optional extras** across 11 categories -- **39 overrides** for deep customization +- **40 overrides** for deep customization - **Hundreds of custom highlights** for Catppuccin, Tokyo Night, and Nord - **60+ custom keymaps** diff --git a/README.ru.md b/README.ru.md index b16fbaf..3b0fc07 100644 --- a/README.ru.md +++ b/README.ru.md @@ -20,7 +20,7 @@

Опциональные экстры и оверрайды плагинов, документация на lazyvimx.aimuzov.online

**Слой улучшений поверх [LazyVim](https://github.com/LazyVim/LazyVim): 51 опциональная экстра и -39 оверрайдов плагинов.** +40 оверрайдов плагинов.** Идея простая: LazyVim остаётся как есть, а всё остальное — доводка интерфейса, навигация, git-воркфлоу, поддержка русской раскладки — включается по кусочкам. Не нравится экстра — не @@ -197,8 +197,8 @@ lazyvimx/ │ │ ├── colorschemes/ # Цветовые схемы (1) │ │ ├── dap/ # Отладка (1) │ │ └── test/ # Тестирование (1) -│ ├── overrides/ # Кастомизация плагинов (39) -│ │ ├── lazyvim/ # LazyVim (9) +│ ├── overrides/ # Кастомизация плагинов (40) +│ │ ├── lazyvim/ # LazyVim (10) │ │ ├── snacks/ # Snacks.nvim (9) │ │ ├── bufferline/ # Bufferline (6) │ │ └── other/ # Прочие плагины (15) @@ -220,7 +220,7 @@ lazyvimx/ Внутри: -- **overrides** — все 39 кастомизаций плагинов +- **overrides** — все 40 кастомизаций плагинов - **extras** — все функциональные экстры - **colorschemes** — дополнительные цветовые схемы - **keys** — кастомные кеймапы @@ -363,7 +363,7 @@ require("lazyvimx").setup({ ## 📊 Статистика - **51 опциональная экстра** в 11 категориях -- **39 оверрайдов** для глубокой кастомизации +- **40 оверрайдов** для глубокой кастомизации - **Сотни кастомных хайлайтов** для Catppuccin, Tokyo Night и Nord - **60+ кастомных кеймапов** diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 229cf22..02e79f3 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -187,7 +187,7 @@ Overrides change the settings of existing plugins without replacing them. Every ``` overrides/ -├── lazyvim/ # LazyVim (9): language specifics (clangd, oxc, svelte), chezmoi, +├── lazyvim/ # LazyVim (10): language specifics (astro, clangd, oxc, svelte), chezmoi, │ # theme auto-switching, VSCode, pretty path, the context menu ├── snacks/ # Snacks.nvim (9): the dashboard, lazygit (theme, follow worktree), │ # disabled animations and backdrop, repeatable buffer deletion @@ -196,7 +196,7 @@ overrides/ # lazy, lspconfig, lualine, neo-tree, noice, sidekick, tokyonight, trouble ``` -39 modules total. A category is imported as a whole — lazy.nvim picks up every `.lua` file +40 modules total. A category is imported as a whole — lazy.nvim picks up every `.lua` file in the directory: ```lua diff --git a/docs/ARCHITECTURE.ru.md b/docs/ARCHITECTURE.ru.md index dda3cbc..a2e427f 100644 --- a/docs/ARCHITECTURE.ru.md +++ b/docs/ARCHITECTURE.ru.md @@ -186,7 +186,7 @@ end ``` overrides/ -├── lazyvim/ # LazyVim (9): язык-специфика (clangd, oxc, svelte), chezmoi, +├── lazyvim/ # LazyVim (10): язык-специфика (astro, clangd, oxc, svelte), chezmoi, │ # автопереключение темы, VSCode, pretty path, контекстное меню ├── snacks/ # Snacks.nvim (9): дашборд, lazygit (тема, follow worktree), │ # отключение анимаций и backdrop, повторяемое удаление буферов @@ -195,7 +195,7 @@ overrides/ # lazy, lspconfig, lualine, neo-tree, noice, sidekick, tokyonight, trouble ``` -Итого 39 модулей. Категория импортируется целиком — lazy.nvim подхватывает все `.lua`-файлы +Итого 40 модулей. Категория импортируется целиком — lazy.nvim подхватывает все `.lua`-файлы директории: ```lua diff --git a/docs/EXTRAS.md b/docs/EXTRAS.md index 2d51391..68de689 100644 --- a/docs/EXTRAS.md +++ b/docs/EXTRAS.md @@ -62,7 +62,7 @@ All of lazyvimx: overrides, every extra, colorschemes, and custom keymaps. **Includes:** - `core.colorschemes` — additional colorschemes -- `core.overrides` — all 39 overrides +- `core.overrides` — all 40 overrides - `core.extras` — all 49 extras from the registry - `core.keys` — custom keymaps @@ -76,9 +76,9 @@ notification if something is missing: `coding.mini-surround`, `coding.yanky`, `u **Recommended:** yes -All plugin overrides — 39 modules across 4 categories: +All plugin overrides — 40 modules across 4 categories: -- LazyVim (9 modules) +- LazyVim (10 modules) - Snacks.nvim (9 modules) - Bufferline (6 modules) - other plugins (15 modules) @@ -643,7 +643,7 @@ the project (e.g. via npm) — a global binary is not picked up. Installs stylelint-language-server via Mason. With the LazyVim `linting.eslint` extra enabled it configures `stylelint_lsp`: the project root comes from LazyVim's detector, and -the list of validated types is extended (css, scss, less, html, vue, svelte, and more). +the list of validated types is extended (css, scss, less, html, vue, svelte, astro, and more). --- @@ -669,7 +669,7 @@ lualine and bufferline themes, a dark (`nord`) and a light (`nord-light`) varian **Import:** `lazyvimx.extras.dap.vscode-js` -Debugging JavaScript/TypeScript (and Svelte) via `js-debug-adapter` from Mason. Three +Debugging JavaScript/TypeScript (and Svelte, Astro) via `js-debug-adapter` from Mason. Three configurations: 1. Launch Chrome to debug the client (localhost:8080) diff --git a/docs/EXTRAS.ru.md b/docs/EXTRAS.ru.md index 8ad28c6..3cf8265 100644 --- a/docs/EXTRAS.ru.md +++ b/docs/EXTRAS.ru.md @@ -61,7 +61,7 @@ Core — не фичи, а «сборные» модули: они включа **Включает:** - `core.colorschemes` — дополнительные цветовые схемы -- `core.overrides` — все 39 оверрайдов +- `core.overrides` — все 40 оверрайдов - `core.extras` — все 49 экстр из реестра - `core.keys` — кастомные кеймапы @@ -75,9 +75,9 @@ Core — не фичи, а «сборные» модули: они включа **Рекомендуется:** да -Все оверрайды плагинов — 39 модулей в 4 категориях: +Все оверрайды плагинов — 40 модулей в 4 категориях: -- LazyVim (9 модулей) +- LazyVim (10 модулей) - Snacks.nvim (9 модулей) - Bufferline (6 модулей) - прочие плагины (15 модулей) @@ -637,7 +637,7 @@ tree-sitter-грамматикой. Устанавливает stylelint-language-server через Mason. При включённой экстре LazyVim `linting.eslint` настраивает `stylelint_lsp`: корень проекта определяется детектором LazyVim, -а список проверяемых типов расширен (css, scss, less, html, vue, svelte и другие). +а список проверяемых типов расширен (css, scss, less, html, vue, svelte, astro и другие). --- @@ -663,7 +663,7 @@ bufferline, тёмный (`nord`) и светлый (`nord-light`) вариан **Импорт:** `lazyvimx.extras.dap.vscode-js` -Отладка JavaScript/TypeScript (и Svelte) через `js-debug-adapter` из Mason. Три конфигурации: +Отладка JavaScript/TypeScript (и Svelte, Astro) через `js-debug-adapter` из Mason. Три конфигурации: 1. Запуск Chrome для отладки клиента (localhost:8080) 2. Подключение к процессу `node --inspect` diff --git a/docs/FAQ.md b/docs/FAQ.md index 08c633b..3c445a7 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -17,7 +17,7 @@ ### What is lazyvimx? An enhancement layer for [LazyVim](https://github.com/LazyVim/LazyVim): 50 optional extras -and 39 plugin overrides. LazyVim stays the foundation, lazyvimx adds interface and workflow +and 40 plugin overrides. LazyVim stays the foundation, lazyvimx adds interface and workflow polish — and only what you've enabled. ### How is lazyvimx different from LazyVim? diff --git a/docs/FAQ.ru.md b/docs/FAQ.ru.md index a489f3b..f76a864 100644 --- a/docs/FAQ.ru.md +++ b/docs/FAQ.ru.md @@ -16,7 +16,7 @@ ### Что такое lazyvimx? -Слой улучшений для [LazyVim](https://github.com/LazyVim/LazyVim): 50 опциональных экстр и 39 +Слой улучшений для [LazyVim](https://github.com/LazyVim/LazyVim): 50 опциональных экстр и 40 оверрайдов плагинов. LazyVim остаётся основой, lazyvimx добавляет полировку интерфейса и воркфлоу — и только то, что вы включили. diff --git a/lua/lazyvimx/extras/dap/vscode-js.lua b/lua/lazyvimx/extras/dap/vscode-js.lua index 0d7faeb..c877d20 100644 --- a/lua/lazyvimx/extras/dap/vscode-js.lua +++ b/lua/lazyvimx/extras/dap/vscode-js.lua @@ -40,7 +40,7 @@ return { end end - for _, language in ipairs({ "typescript", "javascript", "svelte" }) do + for _, language in ipairs({ "typescript", "javascript", "svelte", "astro" }) do dap.configurations[language] = { { type = "pwa-chrome", diff --git a/lua/lazyvimx/extras/linting/stylelint.lua b/lua/lazyvimx/extras/linting/stylelint.lua index 296546e..fb59aab 100644 --- a/lua/lazyvimx/extras/linting/stylelint.lua +++ b/lua/lazyvimx/extras/linting/stylelint.lua @@ -27,11 +27,11 @@ return { -- `validate` is extended with `svelte` and others: without it the server won't send the -- matching documents to stylelint. Extra filetypes are harmless — only actually attached -- ones get validated (those added to `filetypes` in `lang/css.lua` and - -- `overrides/lazyvim/lang-svelte.lua`). + -- `overrides/lazyvim/lang-{svelte,astro}.lua`). opts.servers.stylelint_lsp.settings = vim.tbl_deep_extend("force", opts.servers.stylelint_lsp.settings or {}, { stylelint = { - validate = { "css", "postcss", "scss", "less", "html", "vue", "svelte" }, + validate = { "css", "postcss", "scss", "less", "html", "vue", "svelte", "astro" }, }, }) end, diff --git a/lua/lazyvimx/overrides/lazyvim/lang-astro.lua b/lua/lazyvimx/overrides/lazyvim/lang-astro.lua new file mode 100644 index 0000000..0f45ee4 --- /dev/null +++ b/lua/lazyvimx/overrides/lazyvim/lang-astro.lua @@ -0,0 +1,30 @@ +return { + { + "stevearc/conform.nvim", + optional = true, + opts = function(_, opts) + if not LazyVim.has_extra("lang.astro") then + return + end + + require("conform").formatters.stylelint = require("lazyvimx.util.stylelint").conform_formatter + + -- Апстрим ставит только prettier, без stylelint. + if LazyVim.has_extra("formatting.prettier") then + opts.formatters_by_ft = opts.formatters_by_ft or {} + opts.formatters_by_ft.astro = { "prettier", "stylelint" } + end + end, + }, + + { + "neovim/nvim-lspconfig", + optional = true, + opts = function(_, opts) + if LazyVim.has_extra("lang.astro") and LazyVim.has_extra("linting.eslint") then + opts.servers.stylelint_lsp = opts.servers.stylelint_lsp or { filetypes = {}, mason = false } + table.insert(opts.servers.stylelint_lsp.filetypes, "astro") + end + end, + }, +} diff --git a/lua/lazyvimx/overrides/lazyvim/lang-svelte.lua b/lua/lazyvimx/overrides/lazyvim/lang-svelte.lua index 339e568..fc31359 100644 --- a/lua/lazyvimx/overrides/lazyvim/lang-svelte.lua +++ b/lua/lazyvimx/overrides/lazyvim/lang-svelte.lua @@ -13,17 +13,7 @@ return { if LazyVim.has_extra("lang.svelte") then opts.formatters["prettier_svelte"] = prettier_svelte_formatter() - require("conform").formatters.stylelint = function(bufnr) - local filetype = vim.api.nvim_get_option_value("filetype", { buf = bufnr }) - local prepend_args = filetype == "svelte" and { "--custom-syntax", "postcss-html" } or {} - local command = - require("conform.util").find_executable({ "node_modules/.bin/stylelint" }, "stylelint") - - return { - command = command, - prepend_args = prepend_args, - } - end + require("conform").formatters.stylelint = require("lazyvimx.util.stylelint").conform_formatter if LazyVim.has_extra("formatting.prettier") then opts.formatters_by_ft = opts.formatters_by_ft or {} diff --git a/lua/lazyvimx/util/stylelint.lua b/lua/lazyvimx/util/stylelint.lua new file mode 100644 index 0000000..f11b6af --- /dev/null +++ b/lua/lazyvimx/util/stylelint.lua @@ -0,0 +1,17 @@ +local M = {} + +-- В svelte/astro стили живут внутри разметки, без postcss-html stylelint их не распарсит. +local html_like = { svelte = true, astro = true } + +function M.conform_formatter(bufnr) + local filetype = vim.api.nvim_get_option_value("filetype", { buf = bufnr }) + local prepend_args = html_like[filetype] and { "--custom-syntax", "postcss-html" } or {} + local command = require("conform.util").find_executable({ "node_modules/.bin/stylelint" }, "stylelint") + + return { + command = command, + prepend_args = prepend_args, + } +end + +return M From 2004c78d020e63981416d7a07f3a46b6b8e9c8b7 Mon Sep 17 00:00:00 2001 From: Aleksey Imuzov Date: Thu, 15 Oct 2026 22:07:08 +0400 Subject: [PATCH 3/3] docs: count 51 extras in the FAQ The FAQ still said 50 extras while the code and the README have 51. --- docs/FAQ.md | 4 ++-- docs/FAQ.ru.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 3c445a7..d9bf093 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -16,7 +16,7 @@ ### What is lazyvimx? -An enhancement layer for [LazyVim](https://github.com/LazyVim/LazyVim): 50 optional extras +An enhancement layer for [LazyVim](https://github.com/LazyVim/LazyVim): 51 optional extras and 40 plugin overrides. LazyVim stays the foundation, lazyvimx adds interface and workflow polish — and only what you've enabled. @@ -138,7 +138,7 @@ An optional module with a ready-made setup for one feature. For example: - `motions.langmapper` — the Russian layout - `git.gitlab` — GitLab MR review -All 50 are in [Extras](EXTRAS.md). +All 51 are in [Extras](EXTRAS.md). ### How do I enable an extra? diff --git a/docs/FAQ.ru.md b/docs/FAQ.ru.md index f76a864..17b9ae0 100644 --- a/docs/FAQ.ru.md +++ b/docs/FAQ.ru.md @@ -16,7 +16,7 @@ ### Что такое lazyvimx? -Слой улучшений для [LazyVim](https://github.com/LazyVim/LazyVim): 50 опциональных экстр и 40 +Слой улучшений для [LazyVim](https://github.com/LazyVim/LazyVim): 51 опциональная экстра и 40 оверрайдов плагинов. LazyVim остаётся основой, lazyvimx добавляет полировку интерфейса и воркфлоу — и только то, что вы включили. @@ -137,7 +137,7 @@ lazyvimx определяет светлый/тёмный режим систе - `motions.langmapper` — русская раскладка - `git.gitlab` — ревью GitLab MR -Все 50 — на странице [Экстры](EXTRAS.ru.md). +Все 51 — на странице [Экстры](EXTRAS.ru.md). ### Как включить экстру?