Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.DS_Store
dot_config/nvim/.luarc.json
.luarc.json
node_modules
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<p align="center">Optional extras and plugin overrides, documented at <a href="https://lazyvimx.aimuzov.online">lazyvimx.aimuzov.online</a></p>

**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?
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down Expand Up @@ -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**

Expand Down
10 changes: 5 additions & 5 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<p align="center">Опциональные экстры и оверрайды плагинов, документация на <a href="https://lazyvimx.aimuzov.online/ru/">lazyvimx.aimuzov.online</a></p>

**Слой улучшений поверх [LazyVim](https://github.com/LazyVim/LazyVim): 51 опциональная экстра и
39 оверрайдов плагинов.**
40 оверрайдов плагинов.**

Идея простая: LazyVim остаётся как есть, а всё остальное — доводка интерфейса, навигация,
git-воркфлоу, поддержка русской раскладки — включается по кусочкам. Не нравится экстра — не
Expand Down Expand Up @@ -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)
Expand All @@ -220,7 +220,7 @@ lazyvimx/

Внутри:

- **overrides** — все 39 кастомизаций плагинов
- **overrides** — все 40 кастомизаций плагинов
- **extras** — все функциональные экстры
- **colorschemes** — дополнительные цветовые схемы
- **keys** — кастомные кеймапы
Expand Down Expand Up @@ -363,7 +363,7 @@ require("lazyvimx").setup({
## 📊 Статистика

- **51 опциональная экстра** в 11 категориях
- **39 оверрайдов** для глубокой кастомизации
- **40 оверрайдов** для глубокой кастомизации
- **Сотни кастомных хайлайтов** для Catppuccin, Tokyo Night и Nord
- **60+ кастомных кеймапов**

Expand Down
4 changes: 2 additions & 2 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/ARCHITECTURE.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -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, повторяемое удаление буферов
Expand All @@ -195,7 +195,7 @@ overrides/
# lazy, lspconfig, lualine, neo-tree, noice, sidekick, tokyonight, trouble
```

Итого 39 модулей. Категория импортируется целиком — lazy.nvim подхватывает все `.lua`-файлы
Итого 40 модулей. Категория импортируется целиком — lazy.nvim подхватывает все `.lua`-файлы
директории:

```lua
Expand Down
10 changes: 5 additions & 5 deletions docs/EXTRAS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down Expand Up @@ -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).

---

Expand All @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions docs/EXTRAS.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Core — не фичи, а «сборные» модули: они включа
**Включает:**

- `core.colorschemes` — дополнительные цветовые схемы
- `core.overrides` — все 39 оверрайдов
- `core.overrides` — все 40 оверрайдов
- `core.extras` — все 49 экстр из реестра
- `core.keys` — кастомные кеймапы

Expand All @@ -75,9 +75,9 @@ Core — не фичи, а «сборные» модули: они включа

**Рекомендуется:** да

Все оверрайды плагинов — 39 модулей в 4 категориях:
Все оверрайды плагинов — 40 модулей в 4 категориях:

- LazyVim (9 модулей)
- LazyVim (10 модулей)
- Snacks.nvim (9 модулей)
- Bufferline (6 модулей)
- прочие плагины (15 модулей)
Expand Down Expand Up @@ -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 и другие).

---

Expand All @@ -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`
Expand Down
6 changes: 3 additions & 3 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

### 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
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.

### How is lazyvimx different from LazyVim?
Expand Down Expand Up @@ -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?

Expand Down
4 changes: 2 additions & 2 deletions docs/FAQ.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

### Что такое lazyvimx?

Слой улучшений для [LazyVim](https://github.com/LazyVim/LazyVim): 50 опциональных экстр и 39
Слой улучшений для [LazyVim](https://github.com/LazyVim/LazyVim): 51 опциональная экстра и 40
оверрайдов плагинов. LazyVim остаётся основой, lazyvimx добавляет полировку интерфейса и
воркфлоу — и только то, что вы включили.

Expand Down Expand Up @@ -137,7 +137,7 @@ lazyvimx определяет светлый/тёмный режим систе
- `motions.langmapper` — русская раскладка
- `git.gitlab` — ревью GitLab MR

Все 50 — на странице [Экстры](EXTRAS.ru.md).
Все 51 — на странице [Экстры](EXTRAS.ru.md).

### Как включить экстру?

Expand Down
2 changes: 1 addition & 1 deletion lua/lazyvimx/extras/dap/vscode-js.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions lua/lazyvimx/extras/linting/stylelint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
30 changes: 30 additions & 0 deletions lua/lazyvimx/overrides/lazyvim/lang-astro.lua
Original file line number Diff line number Diff line change
@@ -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,
},
}
16 changes: 7 additions & 9 deletions lua/lazyvimx/overrides/lazyvim/lang-oxc.lua
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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,
Expand Down
12 changes: 1 addition & 11 deletions lua/lazyvimx/overrides/lazyvim/lang-svelte.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
17 changes: 17 additions & 0 deletions lua/lazyvimx/util/stylelint.lua
Original file line number Diff line number Diff line change
@@ -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
Loading