JustCaptain neovim-and-yazi-settings

create files

anc · 2 недели назад deefd48d70992bb116e3c774c379b66d9d4c167d
Первый коммит репозитория — родителя у него нет.
33 файла
  • .gitignore +4
    Показать разницуСкрыть разницу
    1 +.DS_Store
    2 +config/nvim/doc/tags
    3 +config/nvim/spell/
    4 +config/nvim/.luarc.json
  • README.md +223
    Показать разницуСкрыть разницу
    1 +# 🌊 neovim + yazi + kitty
    2 +
    3 +Моя терминальная среда разработки: **Neovim** (IDE), **Yazi** (файловый менеджер), **kitty** (терминал).
    4 +Единая тема **Kanagawa Wave** и шрифт **Lilex** во всех трёх.
    5 +Устанавливается одной командой на **macOS** и **Arch Linux**.
    6 +
    7 +| | Что это | Конфиг |
    8 +|---|---|---|
    9 +| 📝 **Neovim** | IDE: LSP, автодополнение, отладка, форматирование | [`config/nvim`](config/nvim) · основа — [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim) |
    10 +| 📂 **Yazi** | быстрый файловый менеджер с превью | [`config/yazi`](config/yazi) |
    11 +| 🐱 **kitty** | GPU-терминал со вкладками и сплитами | [`config/kitty`](config/kitty) |
    12 +
    13 +---
    14 +
    15 +## ⚡ Быстрая установка
    16 +
    17 +```bash
    18 +git clone <URL-этого-репозитория> ~/neovim_yazi_settings
    19 +cd ~/neovim_yazi_settings
    20 +./install.sh
    21 +```
    22 +
    23 +Перезапусти терминал — готово. Подробности ниже.
    24 +
    25 +> [!IMPORTANT]
    26 +> Не удаляй и не перемещай папку репозитория после установки: конфиги подключены **симлинками** на неё.
    27 +> Нужна независимая копия — запусти `./install.sh --copy`.
    28 +
    29 +---
    30 +
    31 +## 📋 Что делает `install.sh`
    32 +
    33 +| # | Шаг | macOS | Arch Linux |
    34 +|:-:|---|---|---|
    35 +| 1 | Пакеты | Homebrew (ставит его, если нет) + [`packages/Brewfile`](packages/Brewfile) | `pacman` + [`packages/arch.txt`](packages/arch.txt) |
    36 +| 2 | Шрифты | `font-lilex`, `font-symbols-only-nerd-font` | Lilex с GitHub → `~/.local/share/fonts`, `ttf-nerd-fonts-symbols-mono` |
    37 +| 3 | Конфиги | симлинки `~/.config/{nvim,yazi,kitty}` → `config/*` | то же |
    38 +| 4 | Shell | строка в `~/.zshrc` / `~/.bashrc` → [`shell/shellrc.sh`](shell/shellrc.sh) | то же |
    39 +| 5 | Neovim | плагины (точные версии из `lazy-lock.json`), LSP/форматтеры через Mason, парсеры Treesitter | то же |
    40 +
    41 +**Существующие конфиги не удаляются** — они переименовываются в `~/.config/nvim.bak-<дата>` и т.п.
    42 +Скрипт можно запускать повторно: уже подключённое пропускается.
    43 +
    44 +### Флаги
    45 +
    46 +| Команда | Что делает |
    47 +|---|---|
    48 +| `./install.sh` | всё целиком |
    49 +| `./install.sh --skip-packages` | без установки пакетов (только конфиги, shell и плагины) |
    50 +| `./install.sh --copy` | копировать конфиги вместо симлинков |
    51 +| `./install.sh --help` | справка |
    52 +
    53 +---
    54 +
    55 +## 🍏 Установка на macOS — пошагово
    56 +
    57 +1. **Command Line Tools** (git, компилятор):
    58 + ```bash
    59 + xcode-select --install
    60 + ```
    61 +2. **Клонировать и запустить:**
    62 + ```bash
    63 + git clone <URL-этого-репозитория> ~/neovim_yazi_settings
    64 + cd ~/neovim_yazi_settings
    65 + ./install.sh
    66 + ```
    67 + Homebrew поставится сам, если его нет (попросит пароль).
    68 +3. **Открыть kitty** (Launchpad → kitty). Сделать его терминалом по умолчанию необязательно.
    69 +4. Проверить: `nvim` → `:checkhealth`.
    70 +
    71 +## 🐧 Установка на Arch Linux — пошагово
    72 +
    73 +1. **git:**
    74 + ```bash
    75 + sudo pacman -S --needed git
    76 + ```
    77 +2. **Клонировать и запустить:**
    78 + ```bash
    79 + git clone <URL-этого-репозитория> ~/neovim_yazi_settings
    80 + cd ~/neovim_yazi_settings
    81 + ./install.sh
    82 + ```
    83 + `sudo` спросит пароль для `pacman`.
    84 +3. **Запустить kitty** из меню приложений.
    85 +4. Проверить: `nvim` → `:checkhealth`.
    86 +
    87 +> [!NOTE]
    88 +> Подходит и для производных Arch: EndeavourOS, Manjaro, CachyOS, Garuda.
    89 +> Пакеты только из официальных репозиториев — AUR-хелпер (yay/paru) не нужен.
    90 +
    91 +---
    92 +
    93 +## 🎮 Как пользоваться
    Разница обрезана: показаны первые 93 строк.
  • Показать разницуСкрыть разницу
    1 +# === Шрифт — Lilex (IBM Plex Mono + лигатуры, как код на zed.dev) ===
    2 +font_family family="Lilex"
    3 +bold_font auto
    4 +italic_font auto
    5 +bold_italic_font auto
    6 +font_size 15.0
    7 +
    8 +# Прежние шрифты — чтобы вернуть, раскомментируй нужный и закомментируй строку выше:
    9 +# font_family family="IBM Plex Mono"
    10 +# font_family Monaspace Xenon NF
    11 +
    12 +# В Lilex нет иконок Nerd Font: берём их явно из Symbols Nerd Font Mono,
    13 +# чтобы значки в yazi / neo-tree / statusline были моноширинными.
    14 +symbol_map U+E000-U+F8FF,U+F0000-U+FFFFD,U+23FB-U+23FE,U+2665,U+26A1,U+2B58 Symbols Nerd Font Mono
    15 +
    16 +# Лигатуры включены по умолчанию, но можно настроить поведение курсора
    17 +disable_ligatures cursor
    18 +
    19 +# === Курсор ===
    20 +cursor_shape block
    21 +cursor_blink_interval 0
    22 +
    23 +# === Окно ===
    24 +window_padding_width 8
    25 +hide_window_decorations titlebar-only
    26 +remember_window_size yes
    27 +macos_option_as_alt yes
    28 +
    29 +# === Производительность ===
    30 +repaint_delay 8
    31 +input_delay 2
    32 +sync_to_monitor yes
    33 +
    34 +# === Прокрутка ===
    35 +scrollback_lines 10000
    36 +wheel_scroll_multiplier 5.0
    37 +
    38 +# === Табы ===
    39 +tab_bar_edge bottom
    40 +tab_bar_style powerline
    41 +tab_powerline_style slanted
    42 +tab_title_template "{index}: {title}"
    43 +
    44 +# === Цветовая схема — Kanagawa (wave) ===
    45 +# Единый стандарт с neovim (init.lua) и yazi (theme.toml)
    46 +# Окно непрозрачное: без blur фон под текстом не «дышит» и контраст постоянный.
    47 +background_opacity 1.0
    48 +
    49 +foreground #dcd7ba
    50 +background #1f1f28
    51 +selection_foreground #c8c093
    52 +selection_background #2d4f67
    53 +
    54 +cursor #c8c093
    55 +cursor_text_color #1f1f28
    56 +
    57 +url_color #7fb4ca
    58 +
    59 +# Границы окон/сплитов
    60 +active_border_color #7e9cd8
    61 +inactive_border_color #363646
    62 +bell_border_color #ffa066
    63 +
    64 +# Табы
    65 +tab_bar_background #16161d
    66 +active_tab_foreground #1f1f28
    67 +active_tab_background #7e9cd8
    68 +active_tab_font_style bold
    69 +inactive_tab_foreground #727169
    70 +inactive_tab_background #2a2a37
    71 +
    72 +# Black
    73 +color0 #16161d
    74 +color8 #727169
    75 +# Red
    76 +color1 #c34043
    77 +color9 #e82424
    78 +# Green
    79 +color2 #76946a
    80 +color10 #98bb6c
    81 +# Yellow
    82 +color3 #c0a36e
    83 +color11 #e6c384
    84 +# Blue
    85 +color4 #7e9cd8
    86 +color12 #7fb4ca
    87 +# Magenta
    88 +color5 #957fb8
    89 +color13 #938aa9
    90 +# Cyan
    91 +color6 #6a9589
    92 +color14 #7aa89f
    93 +# White
    Разница обрезана: показаны первые 93 строк.
  • Показать разницуСкрыть разницу
    1 +# Подключается из kitty.conf только на Linux (include ${KITTY_OS}.conf).
    2 +# На Linux Cmd-шорткаты из kitty.conf работают через Super, но Super часто занят окружением рабочего стола —
    3 +# поэтому дублируем самое нужное на Ctrl+Shift.
    4 +
    5 +font_size 12.0
    6 +
    7 +map ctrl+shift+d launch --location=vsplit --cwd=current
    8 +map ctrl+shift+alt+d launch --location=hsplit --cwd=current
    9 +map ctrl+shift+k clear_terminal scroll active
    10 +map ctrl+shift+r load_config_file
  • Показать разницуСкрыть разницу
    1 +# Подключается из kitty.conf только на macOS (include ${KITTY_OS}.conf).
    2 +# Все macOS-настройки уже в kitty.conf — файл оставлен для локальных правок под Mac.
  • Показать разницуСкрыть разницу
    1 +column_width = 160
    2 +line_endings = "Unix"
    3 +indent_type = "Spaces"
    4 +indent_width = 2
    5 +quote_style = "AutoPreferSingle"
    6 +call_parentheses = "None"
    7 +collapse_simple_statement = "Always"
  • Показать разницуСкрыть разницу
    1 +# Шпаргалка по командам и шорткатам
    2 +
    3 +Конфиг основан на kickstart.nvim с моими доработками. **Leader = `<Space>` (пробел).**
    4 +Везде ниже `<leader>` = пробел.
    5 +
    6 +## Базовые понятия
    7 +
    8 +Чтобы не путаться в терминологии Vim/Neovim:
    9 +
    10 +- **Buffer** — открытый в памяти файл. Не обязательно виден на экране.
    11 +- **Window** (окно/сплит) — прямоугольник на экране, в котором показан буфер. Их можно открывать рядом (`vsplit`) или одно над другим (`split`).
    12 +- **Tab** (вкладка) — набор окон. Здесь почти не используется; для переключения файлов используются **буферы** (табы сверху от `bufferline` — это буферы, не Vim-вкладки).
    13 +
    14 +Режимы:
    15 +- `n` — normal (по умолчанию, нажмите `<Esc>`)
    16 +- `i` — insert (для печати, заходишь через `i`, `a`, `o`)
    17 +- `v` — visual (выделение, через `v`/`V`/`<C-v>`)
    18 +- `t` — terminal (внутри терминала)
    19 +
    20 +---
    21 +
    22 +## Окна (splits) — как сделать «несколько окон»
    23 +
    24 +Открыть новое окно рядом:
    25 +
    26 +| Шорткат | Что делает |
    27 +| ------------ | ------------------------------------------------ |
    28 +| `<leader>wv` | Вертикальный сплит (новое окно справа) |
    29 +| `<leader>ws` | Горизонтальный сплит (новое окно снизу) |
    30 +| `<leader>wc` | Закрыть текущее окно |
    31 +| `<leader>wo` | Оставить только текущее окно (закрыть остальные) |
    32 +| `<leader>w=` | Уравнять размеры всех окон |
    33 +
    34 +Навигация между открытыми окнами:
    35 +
    36 +| Шорткат | Куда |
    37 +| ------- | ------------------- |
    38 +| `<C-h>` | окно слева |
    39 +| `<C-l>` | окно справа |
    40 +| `<C-j>` | окно снизу |
    41 +| `<C-k>` | окно сверху |
    42 +
    43 +Ресайз текущего окна:
    44 +
    45 +| Шорткат | Что делает |
    46 +| -------------------- | ----------------------- |
    47 +| `<C-Up>` / `<C-Down>` | выше / ниже |
    48 +| `<C-Left>` / `<C-Right>` | уже / шире |
    49 +
    50 +**Пример рабочего раскладки.** Открыл файл, хочешь редактор слева + терминал снизу + дерево слева:
    51 +
    52 +1. `<leader>e` — открыть дерево слева
    53 +2. `<leader>ws` — горизонтальный сплит (нижнее окно)
    54 +3. В нижнем окне `<C-\>` — открыть терминал
    55 +4. `<C-k>` — вернуться вверх
    56 +
    57 +---
    58 +
    59 +## Буферы (открытые файлы — табы сверху)
    60 +
    61 +| Шорткат | Что делает |
    62 +| ---------------- | ----------------------------------- |
    63 +| `<S-l>` | следующий буфер (Shift+L) |
    64 +| `<S-h>` | предыдущий буфер (Shift+H) |
    65 +| `<leader>x` | закрыть текущий буфер |
    66 +| `<leader><leader>` | список всех открытых буферов (Telescope) |
    67 +
    68 +> Раньше было `<Tab>`/`<S-Tab>`, но `<Tab>` нужен для автокомплита (blink.cmp), поэтому переключение перенесено на `<S-l>`/`<S-h>`.
    69 +
    70 +---
    71 +
    72 +## Файловое дерево (neo-tree)
    73 +
    74 +| Шорткат | Что делает |
    75 +| ------------ | ------------------------------------------------ |
    76 +| `<leader>e` | открыть / закрыть дерево слева |
    77 +| `<leader>E` | открыть дерево и подсветить **текущий** файл |
    78 +
    79 +Внутри дерева (в фокусе neo-tree):
    80 +
    81 +| Клавиша | Действие |
    82 +| ------- | ----------------------- |
    83 +| `<CR>` | открыть файл/папку |
    84 +| `a` | создать файл/папку |
    85 +| `d` | удалить |
    86 +| `r` | переименовать |
    87 +| `y` | скопировать (yank) |
    88 +| `x` | вырезать |
    89 +| `p` | вставить |
    90 +| `H` | показать скрытые файлы |
    91 +| `?` | справка по всем кнопкам |
    92 +| `q` | закрыть дерево |
    93 +
    94 +---
    95 +
    96 +## Поиск файлов и текста (Telescope)
    97 +
    98 +| Шорткат | Что ищет |
    99 +| ------------ | ----------------------------------------- |
    100 +| `<leader>sf` | файл по имени |
    101 +| `<leader>sg` | grep по всему проекту (live grep) |
    102 +| `<leader>sw` | слово под курсором по проекту |
    103 +| `<leader>s.` | недавно открытые файлы |
    Разница обрезана: показаны первые 103 строк.
  • Показать разницуСкрыть разницу
    1 +MIT License
    2 +
    3 +Permission is hereby granted, free of charge, to any person obtaining a copy
    4 +of this software and associated documentation files (the "Software"), to deal
    5 +in the Software without restriction, including without limitation the rights
    6 +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    7 +copies of the Software, and to permit persons to whom the Software is
    8 +furnished to do so, subject to the following conditions:
    9 +
    10 +The above copyright notice and this permission notice shall be included in all
    11 +copies or substantial portions of the Software.
    12 +
    13 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    14 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    15 +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    16 +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    17 +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    18 +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    19 +SOFTWARE.
  • Показать разницуСкрыть разницу
    1 +# kickstart.nvim
    2 +
    3 +## Introduction
    4 +
    5 +A starting point for Neovim that is:
    6 +
    7 +* Small
    8 +* Single-file
    9 +* Completely Documented
    10 +
    11 +**NOT** a Neovim distribution, but instead a starting point for your configuration.
    12 +
    13 +## Installation
    14 +
    15 +### Install Neovim
    16 +
    17 +Kickstart.nvim targets *only* the latest
    18 +['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
    19 +['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
    20 +If you are experiencing issues, please make sure you have at least the latest
    21 +stable version. Most likely, you want to install neovim via a [package
    22 +manager](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package).
    23 +To check your neovim version, run `nvim --version` and make sure it is not
    24 +below the latest
    25 +['stable'](https://github.com/neovim/neovim/releases/tag/stable) version. If
    26 +your chosen install method only gives you an outdated version of neovim, find
    27 +alternative [installation methods below](#alternative-neovim-installation-methods).
    28 +
    29 +### Install External Dependencies
    30 +
    31 +External Requirements:
    32 +- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
    33 +- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
    34 + [fd-find](https://github.com/sharkdp/fd#installation)
    35 +- [tree-sitter CLI](https://github.com/tree-sitter/tree-sitter/blob/master/crates/cli/README.md#installation)
    36 +- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
    37 +- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
    38 + - if you have it set `vim.g.have_nerd_font` in `init.lua` to true
    39 +- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
    40 +- Language Setup:
    41 + - If you want to write Typescript, you need `npm`
    42 + - If you want to write Golang, you will need `go`
    43 + - etc.
    44 +
    45 +> [!NOTE]
    46 +> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
    47 +> and quick install snippets
    48 +
    49 +### Install Kickstart
    50 +
    51 +> [!NOTE]
    52 +> [Backup](#FAQ) your previous configuration (if any exists)
    53 +
    54 +Neovim's configurations are located under the following paths, depending on your OS:
    55 +
    56 +| OS | PATH |
    57 +| :- | :--- |
    58 +| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
    59 +| Windows (cmd)| `%localappdata%\nvim\` |
    60 +| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
    61 +
    62 +#### Recommended Step
    63 +
    64 +[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
    65 +so that you have your own copy that you can modify, then install by cloning the
    66 +fork to your machine using one of the commands below, depending on your OS.
    67 +
    68 +> [!NOTE]
    69 +> Your fork's URL will be something like this:
    70 +> `https://github.com/<your_github_username>/kickstart.nvim.git`
    71 +
    72 +You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
    73 +too - it's ignored in the kickstart repo to make maintenance easier, but it's
    74 +[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
    75 +
    76 +#### Clone kickstart.nvim
    77 +
    78 +> [!NOTE]
    79 +> If following the recommended step above (i.e., forking the repo), replace
    80 +> `nvim-lua` with `<your_github_username>` in the commands below
    81 +
    82 +<details><summary> Linux and Mac </summary>
    83 +
    84 +```sh
    85 +git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
    86 +```
    87 +
    88 +</details>
    89 +
    90 +<details><summary> Windows </summary>
    91 +
    92 +If you're using `cmd.exe`:
    93 +
    94 +```
    95 +git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
    96 +```
    97 +
    98 +If you're using `powershell.exe`
    99 +
    100 +```
    101 +git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
    102 +```
    103 +
    104 +</details>
    105 +
    106 +### Post Installation
    Разница обрезана: показаны первые 106 строк.
  • Показать разницуСкрыть разницу
    1 +================================================================================
    2 +INTRODUCTION *kickstart.nvim*
    3 +
    4 +Kickstart.nvim is a project to help you get started on your neovim journey.
    5 +
    6 + *kickstart-is-not*
    7 +It is not:
    8 +- Complete framework for every plugin under the sun
    9 +- Place to add every plugin that could ever be useful
    10 +
    11 + *kickstart-is*
    12 +It is:
    13 +- Somewhere that has a good start for the most common "IDE" type features:
    14 + - autocompletion
    15 + - goto-definition
    16 + - find references
    17 + - fuzzy finding
    18 + - and hinting at what more can be done :)
    19 +- A place to _kickstart_ your journey.
    20 + - You should fork this project and use/modify it so that it matches your
    21 + style and preferences. If you don't want to do that, there are probably
    22 + other projects that would fit much better for you (and that's great!)!
    23 +
    24 + vim:tw=78:ts=8:ft=help:norl:
  • Показать разницуСкрыть разницу
    1 +--[[
    2 +
    3 +=====================================================================
    4 +==================== READ THIS BEFORE CONTINUING ====================
    5 +=====================================================================
    6 +======== .-----. ========
    7 +======== .----------------------. | === | ========
    8 +======== |.-""""""""""""""""""-.| |-----| ========
    9 +======== || || | === | ========
    10 +======== || KICKSTART.NVIM || |-----| ========
    11 +======== || || | === | ========
    12 +======== || || |-----| ========
    13 +======== ||:Tutor || |:::::| ========
    14 +======== |'-..................-'| |____o| ========
    15 +======== `"")----------------(""` ___________ ========
    16 +======== /::::::::::| |::::::::::\ \ no mouse \ ========
    17 +======== /:::========| |==hjkl==:::\ \ required \ ========
    18 +======== '""""""""""""' '""""""""""""' '""""""""""' ========
    19 +======== ========
    20 +=====================================================================
    21 +=====================================================================
    22 +
    23 +What is Kickstart?
    24 +
    25 + Kickstart.nvim is *not* a distribution.
    26 +
    27 + Kickstart.nvim is a starting point for your own configuration.
    28 + The goal is that you can read every line of code, top-to-bottom, understand
    29 + what your configuration is doing, and modify it to suit your needs.
    30 +
    31 + Once you've done that, you can start exploring, configuring and tinkering to
    32 + make Neovim your own! That might mean leaving Kickstart just the way it is for a while
    33 + or immediately breaking it into modular pieces. It's up to you!
    34 +
    35 + If you don't know anything about Lua, I recommend taking some time to read through
    36 + a guide. One possible example which will only take 10-15 minutes:
    37 + - https://learnxinyminutes.com/docs/lua/
    38 +
    39 + After understanding a bit more about Lua, you can use `:help lua-guide` as a
    40 + reference for how Neovim integrates Lua.
    41 + - :help lua-guide
    42 + - (or HTML version): https://neovim.io/doc/user/lua-guide.html
    43 +
    44 +Kickstart Guide:
    45 +
    46 + TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
    47 +
    48 + If you don't know what this means, type the following:
    49 + - <escape key>
    50 + - :
    51 + - Tutor
    52 + - <enter key>
    53 +
    54 + (If you already know the Neovim basics, you can skip this step.)
    55 +
    56 + :lua print(vim.g.hav::lua print(vim.g.have_nerd_font) Once you've completed that, you can continue working through **AND READING** the rest
    57 + of the kickstart init.lua.
    58 +
    59 + Next, run AND READ `:help`.
    60 + This will open up a help window with some basic information
    61 + about reading, navigating and searching the builtin help documentation.
    62 +
    63 + This should be the first place you go to look when you're stuck or confused
    64 + with something. It's one of my favorite Neovim features.
    65 +
    66 + MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
    67 + which is very useful when you're not exactly sure of what you're looking for.
    68 +
    69 + I have left several `:help X` comments throughout the init.lua
    70 + These are hints about where to find more information about the relevant settings,
    71 + plugins or Neovim features used in Kickstart.
    72 +
    73 + NOTE: Look for lines like this
    74 +
    75 + Throughout the file. These are for you, the reader, to help you understand what is happening.
    76 + Feel free to delete them once you know what you're doing, but they should serve as a guide
    77 + for when you are first encountering a few different constructs in your Neovim config.
    78 +
    79 +If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
    80 +
    81 +I hope you enjoy your Neovim journey,
    82 +- TJ
    83 +
    84 +P.S. You can delete this when you're done too. It's your config now! :)
    85 +--]]
    86 +
    87 +-- Set <space> as the leader key
    88 +-- See `:help mapleader`
    89 +-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
    90 +vim.g.mapleader = ' '
    91 +vim.g.maplocalleader = ' '
    92 +
    93 +-- Set to true if you have a Nerd Font installed and selected in the terminal
    94 +-- (терминал использует Monaspace Xenon NF — Nerd Font есть)
    95 +vim.g.have_nerd_font = true
    96 +
    97 +-- [[ Setting options ]]
    98 +-- See `:help vim.o`
    99 +-- NOTE: You can change these options as you wish!
    100 +-- For more options, you can see `:help option-list`
    101 +
    102 +-- Make line numbers default
    103 +vim.o.number = true
    104 +-- You can also add relative line numbers, to help with jumping.
    105 +-- Experiment for yourself to see if you like it!
    106 +-- vim.o.relativenumber = true
    107 +
    108 +-- Enable mouse mode, can be useful for resizing splits for example!
    109 +vim.o.mouse = 'a'
    110 +
    Разница обрезана: показаны первые 110 строк.
  • Показать разницуСкрыть разницу
    1 +{
    2 + "LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
    3 + "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
    4 + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
    5 + "conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
    6 + "fidget.nvim": { "branch": "main", "commit": "9e0201673e08e997e7cf52afca5565c70bd117f3" },
    7 + "gitsigns.nvim": { "branch": "main", "commit": "070a5d7b985546cc57e1fc61e5bc507fecac6045" },
    8 + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
    9 + "kanagawa.nvim": { "branch": "master", "commit": "bb85e4bfc8d89b0e62c8fa53ccdd13d12e2f77b3" },
    10 + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
    11 + "mason-lspconfig.nvim": { "branch": "main", "commit": "b3298993d55fa194279b5eb9dbfb3a43da65cadf" },
    12 + "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
    13 + "mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
    14 + "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
    15 + "mini.nvim": { "branch": "main", "commit": "65d615e1f78775323bfd4651f694824256e2adc1" },
    16 + "neo-tree.nvim": { "branch": "v3.x", "commit": "1a14083046d96e88e361d1da00761c40d45012f3" },
    17 + "nui.nvim": { "branch": "main", "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97" },
    18 + "nvim-dap": { "branch": "master", "commit": "cfa2d58f4537aca6ca83e2de1a0d9f1491121264" },
    19 + "nvim-dap-ui": { "branch": "master", "commit": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43" },
    20 + "nvim-highlight-colors": { "branch": "main", "commit": "e4c7af0211866162d999ce0bdd6a029302e19139" },
    21 + "nvim-lspconfig": { "branch": "master", "commit": "3e8d598d3b5f8338a41699c436e5fa11d2666cf0" },
    22 + "nvim-nio": { "branch": "master", "commit": "edcc181a875301dd21840189aa2f2f9ad69fc172" },
    23 + "nvim-treesitter": { "branch": "main", "commit": "e289100ff98969e118c702199d88b764ce9e7fdf" },
    24 + "nvim-ts-autotag": { "branch": "main", "commit": "d7220b55e16ed3c04e88086256def5d282429493" },
    25 + "nvim-web-devicons": { "branch": "master", "commit": "58447c1fca354bbf184425e4a8d01deecbd6f3c4" },
    26 + "package-info.nvim": { "branch": "master", "commit": "b86cf49efc3855dd94afb33304b278f6f122bf1a" },
    27 + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
    28 + "render-markdown.nvim": { "branch": "main", "commit": "640a3ec6d538bad17c328be373c7cad0293d9589" },
    29 + "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
    30 + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
    31 + "telescope.nvim": { "branch": "master", "commit": "40aedd8a68c78a656a10a8d62d80c54af59420fb" },
    32 + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
    33 + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
    34 + "ts-error-translator.nvim": { "branch": "main", "commit": "558abff11b9e8f4cefc0de09df780c56841c7a4b" },
    35 + "venv-selector.nvim": { "branch": "main", "commit": "cc4bb3975de8835291f9bb45889e96c6b2795fc4" },
    36 + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
    37 +}
  • Показать разницуСкрыть разницу
    1 +return {
    2 + 'akinsho/bufferline.nvim',
    3 + version = '*',
    4 + dependencies = {
    5 + 'nvim-tree/nvim-web-devicons',
    6 + },
    7 +
    8 + opts = {
    9 + options = {
    10 + mode = 'buffers',
    11 + diagnostics = 'nvim_lsp',
    12 +
    13 + offsets = {
    14 + {
    15 + filetype = 'neo-tree',
    16 + text = 'File Explorer',
    17 + highlight = 'Directory',
    18 + separator = true,
    19 + },
    20 + },
    21 + },
    22 + },
    23 +
    24 + keys = {
    25 + { '<S-l>', '<cmd>BufferLineCycleNext<cr>', desc = 'Next buffer' },
    26 + { '<S-h>', '<cmd>BufferLineCyclePrev<cr>', desc = 'Previous buffer' },
    27 + { '<leader>x', '<cmd>bdelete<cr>', desc = 'Close buffer' },
    28 + },
    29 +}
  • Показать разницуСкрыть разницу
    1 +return {
    2 + 'stevearc/conform.nvim',
    3 +
    4 + opts = {
    5 + formatters_by_ft = {
    6 + python = { 'ruff_format', 'ruff_organize_imports' },
    7 + lua = { 'stylua' },
    8 +
    9 + -- C/C++: стиль берётся из .clang-format в проекте (если есть)
    10 + c = { 'clang-format' },
    11 + cpp = { 'clang-format' },
    12 +
    13 + -- Web: prettierd (демон, быстрый), с фолбэком на prettier
    14 + javascript = { 'prettierd', 'prettier', stop_after_first = true },
    15 + javascriptreact = { 'prettierd', 'prettier', stop_after_first = true },
    16 + typescript = { 'prettierd', 'prettier', stop_after_first = true },
    17 + typescriptreact = { 'prettierd', 'prettier', stop_after_first = true },
    18 + vue = { 'prettierd', 'prettier', stop_after_first = true },
    19 + svelte = { 'prettierd', 'prettier', stop_after_first = true },
    20 + html = { 'prettierd', 'prettier', stop_after_first = true },
    21 + css = { 'prettierd', 'prettier', stop_after_first = true },
    22 + scss = { 'prettierd', 'prettier', stop_after_first = true },
    23 + less = { 'prettierd', 'prettier', stop_after_first = true },
    24 + graphql = { 'prettierd', 'prettier', stop_after_first = true },
    25 +
    26 + json = { 'prettierd', 'prettier', stop_after_first = true },
    27 + jsonc = { 'prettierd', 'prettier', stop_after_first = true },
    28 + yaml = { 'prettierd', 'prettier', stop_after_first = true },
    29 + markdown = { 'prettierd', 'prettier', stop_after_first = true },
    30 + },
    31 +
    32 + formatters = {
    33 + -- Если в проекте нет .clang-format: стиль LLVM, но с отступом 4 пробела
    34 + ['clang-format'] = {
    35 + prepend_args = function(_, ctx)
    36 + if vim.fs.find({ '.clang-format', '_clang-format' }, { path = ctx.dirname, upward = true })[1] then return {} end
    37 + return { '--style={BasedOnStyle: LLVM, IndentWidth: 4}' }
    38 + end,
    39 + },
    40 + },
    41 +
    42 + format_on_save = {
    43 + timeout_ms = 1000,
    44 + lsp_format = 'fallback',
    45 + },
    46 + },
    47 +}
  • Показать разницуСкрыть разницу
    1 +return {
    2 + {
    3 + 'nvim-tree/nvim-web-devicons',
    4 + enabled = true,
    5 + },
    6 +}
  • Показать разницуСкрыть разницу
    1 +-- You can add your own plugins here or in other files in this directory!
    2 +-- I promise not to create any merge conflicts in this directory :)
    3 +--
    4 +-- See the kickstart.nvim README for more information
    5 +
    6 +---@module 'lazy'
    7 +---@type LazySpec
    8 +return {}
  • Показать разницуСкрыть разницу
    1 +return {
    2 + 'MeanderingProgrammer/render-markdown.nvim',
    3 +
    4 + dependencies = {
    5 + 'nvim-treesitter/nvim-treesitter',
    6 + 'nvim-tree/nvim-web-devicons',
    7 + },
    8 +
    9 + ft = { 'markdown' },
    10 +
    11 + opts = {},
    12 +}
  • Показать разницуСкрыть разницу
    1 +return {
    2 + 'nvim-neo-tree/neo-tree.nvim',
    3 + branch = 'v3.x',
    4 +
    5 + dependencies = {
    6 + 'nvim-lua/plenary.nvim',
    7 + 'nvim-tree/nvim-web-devicons',
    8 + 'MunifTanjim/nui.nvim',
    9 + },
    10 + keys = {
    11 + {
    12 + '<leader>e',
    13 + ':Neotree toggle<CR>',
    14 + desc = 'Neo-tree toggle',
    15 + },
    16 + {
    17 + '<leader>E',
    18 + ':Neotree reveal<CR>',
    19 + desc = 'Neo-tree reveal current file',
    20 + },
    21 + },
    22 + opts = {
    23 + window = {
    24 + width = 45,
    25 + },
    26 + filesystem = {
    27 + follow_current_file = {
    28 + enabled = true,
    29 + },
    30 + hijack_netrw_behavior = 'open_default',
    31 + },
    32 +
    33 + default_component_configs = {
    34 + icon = {
    35 + user_nvim_devicons = true,
    36 + },
    37 + },
    38 + },
    39 +}
  • Показать разницуСкрыть разницу
    1 +return {
    2 + 'akinsho/toggleterm.nvim',
    3 + version = '*',
    4 + opts = {
    5 + size = 15,
    6 + open_mapping = [[<c-\>]],
    7 + direction = 'horizontal',
    8 + shade_terminals = true,
    9 + },
    10 + keys = {
    11 + { '<leader>tt', '<cmd>ToggleTerm<cr>' },
    12 + { '<leader>tf', '<cmd>ToggleTerm direction=float<cr>' },
    13 + { '<leader>tv', '<cmd>ToggleTerm direction=vertical<cr>' },
    14 +
    15 + -- C/C++: сохранить, собрать текущий файл и запустить в терминале (с вводом через cin)
    16 + {
    17 + '<leader>rr',
    18 + function()
    19 + vim.cmd 'write'
    20 + local file = vim.fn.expand '%:p'
    21 + local out = vim.fn.expand '%:p:r'
    22 + local compiler = vim.bo.filetype == 'c' and 'clang -std=c17' or 'clang++ -std=c++20'
    23 + local cmd = string.format('%s -Wall -Wextra -g %s -o %s && %s', compiler, vim.fn.shellescape(file), vim.fn.shellescape(out), vim.fn.shellescape(out))
    24 + require('toggleterm').exec(cmd, 1, nil, vim.fn.expand '%:p:h')
    25 + end,
    26 + ft = { 'c', 'cpp' },
    27 + desc = '[R]un C/C++ file',
    28 + },
    29 + },
    30 +}
  • Показать разницуСкрыть разницу
    1 +return {
    2 + 'linux-cultist/venv-selector.nvim',
    3 + dependencies = {
    4 + 'neovim/nvim-lspconfig',
    5 + 'nvim-telescope/telescope.nvim',
    6 + 'nvim-lua/plenary.nvim',
    7 + },
    8 +
    9 + keys = {
    10 + { '<leader>vs', '<cmd>VenvSelect<cr>' },
    11 + },
    12 +
    13 + opts = {
    14 + name = { '.venv', 'venv', 'env' },
    15 + auto_refresh = true,
    16 + },
    17 +}
  • Показать разницуСкрыть разницу
    1 +-- Web-разработка: TS/TSX, HTML, CSS.
    2 +-- LSP-серверы (vtsls, eslint, html, cssls, tailwindcss, emmet, jsonls) и
    3 +-- форматирование prettier настроены в init.lua и custom/plugins/conform.lua.
    4 +return {
    5 + -- Автозакрытие и переименование HTML/JSX-тегов
    6 + {
    7 + 'windwp/nvim-ts-autotag',
    8 + ft = {
    9 + 'html',
    10 + 'htmldjango',
    11 + 'xml',
    12 + 'javascript',
    13 + 'javascriptreact',
    14 + 'typescript',
    15 + 'typescriptreact',
    16 + 'svelte',
    17 + 'vue',
    18 + 'markdown',
    19 + },
    20 + opts = {
    21 + opts = {
    22 + enable_close = true,
    23 + enable_rename = true,
    24 + enable_close_on_slash = false,
    25 + },
    26 + },
    27 + },
    28 +
    29 + -- Подсветка цветов прямо в коде: #a7c080, rgb(...), tailwind-классы
    30 + {
    31 + 'brenoprata10/nvim-highlight-colors',
    32 + event = { 'BufReadPost', 'BufNewFile' },
    33 + opts = {
    34 + render = 'virtual',
    35 + virtual_symbol = '󰝤',
    36 + virtual_symbol_position = 'eol',
    37 + enable_named_colors = true,
    38 + enable_tailwind = true,
    39 + },
    40 + },
    41 +
    42 + -- Читаемые ошибки TypeScript вместо простыней tsserver
    43 + {
    44 + 'dmmulroy/ts-error-translator.nvim',
    45 + ft = { 'typescript', 'typescriptreact', 'javascript', 'javascriptreact', 'svelte', 'vue' },
    46 + opts = {},
    47 + },
    48 +
    49 + -- Версии зависимостей и уязвимости прямо в package.json
    50 + {
    51 + 'vuki656/package-info.nvim',
    52 + dependencies = { 'MunifTanjim/nui.nvim' },
    53 + event = { 'BufRead package.json' },
    54 + opts = { hide_up_to_date = true, package_manager = 'npm' },
    55 + keys = {
    56 + { '<leader>ns', function() require('package-info').show() end, desc = 'package.json: показать версии' },
    57 + { '<leader>nu', function() require('package-info').update() end, desc = 'package.json: обновить пакет' },
    58 + { '<leader>ni', function() require('package-info').install() end, desc = 'package.json: установить пакет' },
    59 + { '<leader>nc', function() require('package-info').change_version() end, desc = 'package.json: сменить версию' },
    60 + },
    61 + },
    62 +}
  • Показать разницуСкрыть разницу
    1 +--[[
    2 +--
    3 +-- This file is not required for your own configuration,
    4 +-- but helps people determine if their system is setup correctly.
    5 +--
    6 +--]]
    7 +
    8 +local check_version = function()
    9 + local verstr = tostring(vim.version())
    10 + if not vim.version.ge then
    11 + vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
    12 + return
    13 + end
    14 +
    15 + if vim.version.ge(vim.version(), '0.11') then
    16 + vim.health.ok(string.format("Neovim version is: '%s'", verstr))
    17 + else
    18 + vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr))
    19 + end
    20 +end
    21 +
    22 +local check_external_reqs = function()
    23 + -- Basic utils: `git`, `make`, `unzip`
    24 + for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
    25 + local is_executable = vim.fn.executable(exe) == 1
    26 + if is_executable then
    27 + vim.health.ok(string.format("Found executable: '%s'", exe))
    28 + else
    29 + vim.health.warn(string.format("Could not find executable: '%s'", exe))
    30 + end
    31 + end
    32 +
    33 + return true
    34 +end
    35 +
    36 +return {
    37 + check = function()
    38 + vim.health.start 'kickstart.nvim'
    39 +
    40 + vim.health.info [[NOTE: Not every warning is a 'must-fix' in `:checkhealth`
    41 +
    42 + Fix only warnings for plugins and languages you intend to use.
    43 + Mason will give warnings for languages that are not installed.
    44 + You do not need to install, unless you want to use those languages!]]
    45 +
    46 + local uv = vim.uv or vim.loop
    47 + vim.health.info('System Information: ' .. vim.inspect(uv.os_uname()))
    48 +
    49 + check_version()
    50 + check_external_reqs()
    51 + end,
    52 +}
  • Показать разницуСкрыть разницу
    1 +-- autopairs
    2 +-- https://github.com/windwp/nvim-autopairs
    3 +
    4 +---@module 'lazy'
    5 +---@type LazySpec
    6 +return {
    7 + 'windwp/nvim-autopairs',
    8 + event = 'InsertEnter',
    9 + opts = {},
    10 +}
  • Показать разницуСкрыть разницу
    1 +-- debug.lua
    2 +--
    3 +-- Shows how to use the DAP plugin to debug your code.
    4 +--
    5 +-- Primarily focused on configuring the debugger for Go, but can
    6 +-- be extended to other languages as well. That's why it's called
    7 +-- kickstart.nvim and not kitchen-sink.nvim ;)
    8 +
    9 +---@module 'lazy'
    10 +---@type LazySpec
    11 +return {
    12 + -- NOTE: Yes, you can install new plugins here!
    13 + 'mfussenegger/nvim-dap',
    14 + -- NOTE: And you can specify dependencies as well
    15 + dependencies = {
    16 + -- Creates a beautiful debugger UI
    17 + 'rcarriga/nvim-dap-ui',
    18 +
    19 + -- Required dependency for nvim-dap-ui
    20 + 'nvim-neotest/nvim-nio',
    21 +
    22 + -- Installs the debug adapters for you
    23 + 'mason-org/mason.nvim',
    24 + 'jay-babu/mason-nvim-dap.nvim',
    25 +
    26 + },
    27 + keys = {
    28 + -- Basic debugging keymaps, feel free to change to your liking!
    29 + { '<F5>', function() require('dap').continue() end, desc = 'Debug: Start/Continue' },
    30 + { '<F1>', function() require('dap').step_into() end, desc = 'Debug: Step Into' },
    31 + { '<F2>', function() require('dap').step_over() end, desc = 'Debug: Step Over' },
    32 + { '<F3>', function() require('dap').step_out() end, desc = 'Debug: Step Out' },
    33 + { '<leader>b', function() require('dap').toggle_breakpoint() end, desc = 'Debug: Toggle Breakpoint' },
    34 + { '<leader>B', function() require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') end, desc = 'Debug: Set Breakpoint' },
    35 + -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
    36 + { '<F7>', function() require('dapui').toggle() end, desc = 'Debug: See last session result.' },
    37 + },
    38 + config = function()
    39 + local dap = require 'dap'
    40 + local dapui = require 'dapui'
    41 +
    42 + require('mason-nvim-dap').setup {
    43 + -- Makes a best effort to setup the various debuggers with
    44 + -- reasonable debug configurations
    45 + automatic_installation = true,
    46 +
    47 + -- You can provide additional configuration to the handlers,
    48 + -- see mason-nvim-dap README for more information
    49 + handlers = {},
    50 +
    51 + -- You'll need to check that you have the required things installed
    52 + -- online, please don't ask me how to install them :)
    53 + ensure_installed = {
    54 + -- Update this to ensure that you have the debuggers for the langs you want
    55 + 'codelldb', -- C/C++/Rust
    56 + },
    57 + }
    58 +
    59 + -- Dap UI setup
    60 + -- For more information, see |:help nvim-dap-ui|
    61 + ---@diagnostic disable-next-line: missing-fields
    62 + dapui.setup {
    63 + -- Set icons to characters that are more likely to work in every terminal.
    64 + -- Feel free to remove or use ones that you like more! :)
    65 + -- Don't feel like these are good choices.
    66 + icons = { expanded = '▾', collapsed = '▸', current_frame = '*' },
    67 + ---@diagnostic disable-next-line: missing-fields
    68 + controls = {
    69 + icons = {
    70 + pause = '⏸',
    71 + play = '▶',
    72 + step_into = '⏎',
    73 + step_over = '⏭',
    74 + step_out = '⏮',
    75 + step_back = 'b',
    76 + run_last = '▶▶',
    77 + terminate = '⏹',
    78 + disconnect = '⏏',
    79 + },
    80 + },
    81 + }
    82 +
    83 + -- Change breakpoint icons
    84 + -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
    85 + -- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' })
    86 + -- local breakpoint_icons = vim.g.have_nerd_font
    87 + -- and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' }
    88 + -- or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' }
    89 + -- for type, icon in pairs(breakpoint_icons) do
    90 + -- local tp = 'Dap' .. type
    91 + -- local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak'
    92 + -- vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl })
    93 + -- end
    94 +
    95 + dap.listeners.after.event_initialized['dapui_config'] = dapui.open
    96 + dap.listeners.before.event_terminated['dapui_config'] = dapui.close
    97 + dap.listeners.before.event_exited['dapui_config'] = dapui.close
    98 + end,
    99 +}
  • Показать разницуСкрыть разницу
    1 +-- Adds git related signs to the gutter, as well as utilities for managing changes
    2 +-- NOTE: gitsigns is already included in init.lua but contains only the base
    3 +-- config. This will add also the recommended keymaps.
    4 +
    5 +---@module 'lazy'
    6 +---@type LazySpec
    7 +return {
    8 + 'lewis6991/gitsigns.nvim',
    9 + ---@module 'gitsigns'
    10 + ---@type Gitsigns.Config
    11 + ---@diagnostic disable-next-line: missing-fields
    12 + opts = {
    13 + on_attach = function(bufnr)
    14 + local gitsigns = require 'gitsigns'
    15 +
    16 + local function map(mode, l, r, opts)
    17 + opts = opts or {}
    18 + opts.buffer = bufnr
    19 + vim.keymap.set(mode, l, r, opts)
    20 + end
    21 +
    22 + -- Navigation
    23 + map('n', ']c', function()
    24 + if vim.wo.diff then
    25 + vim.cmd.normal { ']c', bang = true }
    26 + else
    27 + gitsigns.nav_hunk 'next'
    28 + end
    29 + end, { desc = 'Jump to next git [c]hange' })
    30 +
    31 + map('n', '[c', function()
    32 + if vim.wo.diff then
    33 + vim.cmd.normal { '[c', bang = true }
    34 + else
    35 + gitsigns.nav_hunk 'prev'
    36 + end
    37 + end, { desc = 'Jump to previous git [c]hange' })
    38 +
    39 + -- Actions
    40 + -- visual mode
    41 + map('v', '<leader>hs', function() gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [s]tage hunk' })
    42 + map('v', '<leader>hr', function() gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'git [r]eset hunk' })
    43 + -- normal mode
    44 + map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
    45 + map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
    46 + map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
    47 + map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
    48 + map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
    49 + map('n', '<leader>hi', gitsigns.preview_hunk_inline, { desc = 'git preview hunk [i]nline' })
    50 + map('n', '<leader>hb', function() gitsigns.blame_line { full = true } end, { desc = 'git [b]lame line' })
    51 + map('n', '<leader>hd', gitsigns.diffthis, { desc = 'git [d]iff against index' })
    52 + map('n', '<leader>hD', function() gitsigns.diffthis '@' end, { desc = 'git [D]iff against last commit' })
    53 + map('n', '<leader>hQ', function() gitsigns.setqflist 'all' end)
    54 + map('n', '<leader>hq', gitsigns.setqflist)
    55 + -- Toggles
    56 + map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
    57 + map('n', '<leader>tw', gitsigns.toggle_word_diff)
    58 +
    59 + -- Text object
    60 + map({ 'o', 'x' }, 'ih', gitsigns.select_hunk)
    61 + end,
    62 + },
    63 +}
  • Показать разницуСкрыть разницу
    1 +-- Add indentation guides even on blank lines
    2 +
    3 +---@module 'lazy'
    4 +---@type LazySpec
    5 +return {
    6 + 'lukas-reineke/indent-blankline.nvim',
    7 + -- Enable `lukas-reineke/indent-blankline.nvim`
    8 + -- See `:help ibl`
    9 + main = 'ibl',
    10 + ---@module 'ibl'
    11 + ---@type ibl.config
    12 + opts = {},
    13 +}
  • Показать разницуСкрыть разницу
    1 +-- Linting
    2 +
    3 +---@module 'lazy'
    4 +---@type LazySpec
    5 +return {
    6 + 'mfussenegger/nvim-lint',
    7 + event = { 'BufReadPre', 'BufNewFile' },
    8 + config = function()
    9 + local lint = require 'lint'
    10 + lint.linters_by_ft = {
    11 + markdown = { 'markdownlint' }, -- Make sure to install `markdownlint` via mason / npm
    12 + }
    13 +
    14 + -- To allow other plugins to add linters to require('lint').linters_by_ft,
    15 + -- instead set linters_by_ft like this:
    16 + -- lint.linters_by_ft = lint.linters_by_ft or {}
    17 + -- lint.linters_by_ft['markdown'] = { 'markdownlint' }
    18 + --
    19 + -- However, note that this will enable a set of default linters,
    20 + -- which will cause errors unless these tools are available:
    21 + -- {
    22 + -- clojure = { "clj-kondo" },
    23 + -- dockerfile = { "hadolint" },
    24 + -- inko = { "inko" },
    25 + -- janet = { "janet" },
    26 + -- json = { "jsonlint" },
    27 + -- markdown = { "vale" },
    28 + -- rst = { "vale" },
    29 + -- ruby = { "ruby" },
    30 + -- terraform = { "tflint" },
    31 + -- text = { "vale" }
    32 + -- }
    33 + --
    34 + -- You can disable the default linters by setting their filetypes to nil:
    35 + -- lint.linters_by_ft['clojure'] = nil
    36 + -- lint.linters_by_ft['dockerfile'] = nil
    37 + -- lint.linters_by_ft['inko'] = nil
    38 + -- lint.linters_by_ft['janet'] = nil
    39 + -- lint.linters_by_ft['json'] = nil
    40 + -- lint.linters_by_ft['markdown'] = nil
    41 + -- lint.linters_by_ft['rst'] = nil
    42 + -- lint.linters_by_ft['ruby'] = nil
    43 + -- lint.linters_by_ft['terraform'] = nil
    44 + -- lint.linters_by_ft['text'] = nil
    45 +
    46 + -- Create autocommand which carries out the actual linting
    47 + -- on the specified events.
    48 + local lint_augroup = vim.api.nvim_create_augroup('lint', { clear = true })
    49 + vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
    50 + group = lint_augroup,
    51 + callback = function()
    52 + -- Only run the linter in buffers that you can modify in order to
    53 + -- avoid superfluous noise, notably within the handy LSP pop-ups that
    54 + -- describe the hovered symbol using Markdown.
    55 + if vim.bo.modifiable then lint.try_lint() end
    56 + end,
    57 + })
    58 + end,
    59 +}
  • Показать разницуСкрыть разницу
    1 +-- Neo-tree is a Neovim plugin to browse the file system
    2 +-- https://github.com/nvim-neo-tree/neo-tree.nvim
    3 +
    4 +---@module 'lazy'
    5 +---@type LazySpec
    6 +return {
    7 + 'nvim-neo-tree/neo-tree.nvim',
    8 + version = '*',
    9 + dependencies = {
    10 + 'nvim-lua/plenary.nvim',
    11 + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
    12 + 'MunifTanjim/nui.nvim',
    13 + },
    14 + lazy = false,
    15 + keys = {
    16 + { '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
    17 + },
    18 + ---@module 'neo-tree'
    19 + ---@type neotree.Config
    20 + opts = {
    21 + filesystem = {
    22 + window = {
    23 + mappings = {
    24 + ['\\'] = 'close_window',
    25 + },
    26 + },
    27 + },
    28 + },
    29 +}
  • Показать разницуСкрыть разницу
    1 +# Yazi — тема Kanagawa (wave)
    2 +# Единый стандарт с kitty (kitty.conf) и neovim (init.lua)
    3 +#
    4 +# sumiInk0 #16161d | bg #1f1f28 | sumiInk4 #2a2a37 | sumiInk5 #363646 | sumiInk6 #54546d
    5 +# fg #dcd7ba | oldWhite #c8c093 | comment #8a887f
    6 +# blue #7e9cd8 | springBlue #7fb4ca | aqua #7aa89f | green #98bb6c | yellow #e6c384
    7 +# orange #ffa066 | red #e46876 | violet #957fb8 | pink #d27e99
    8 +
    9 +[mgr]
    10 +cwd = { fg = "#7fb4ca" }
    11 +
    12 +# Курсор / выделенная строка
    13 +hovered = { fg = "#1f1f28", bg = "#7e9cd8" }
    14 +preview_hovered = { underline = true }
    15 +
    16 +# Поиск
    17 +find_keyword = { fg = "#e6c384", bold = true }
    18 +find_position = { fg = "#d27e99", bg = "reset", bold = true }
    19 +
    20 +# Маркеры операций
    21 +marker_copied = { fg = "#98bb6c", bg = "#98bb6c" }
    22 +marker_cut = { fg = "#e46876", bg = "#e46876" }
    23 +marker_marked = { fg = "#7aa89f", bg = "#7aa89f" }
    24 +marker_selected = { fg = "#e6c384", bg = "#e6c384" }
    25 +
    26 +# Счётчики
    27 +count_copied = { fg = "#1f1f28", bg = "#98bb6c" }
    28 +count_cut = { fg = "#1f1f28", bg = "#e46876" }
    29 +count_selected = { fg = "#1f1f28", bg = "#e6c384" }
    30 +
    31 +border_symbol = "│"
    32 +border_style = { fg = "#363646" }
    33 +
    34 +[mode]
    35 +normal_main = { fg = "#1f1f28", bg = "#7e9cd8", bold = true }
    36 +normal_alt = { fg = "#7e9cd8", bg = "#2a2a37" }
    37 +select_main = { fg = "#1f1f28", bg = "#ffa066", bold = true }
    38 +select_alt = { fg = "#ffa066", bg = "#2a2a37" }
    39 +unset_main = { fg = "#1f1f28", bg = "#957fb8", bold = true }
    40 +unset_alt = { fg = "#957fb8", bg = "#2a2a37" }
    41 +
    42 +[status]
    43 +separator_open = ""
    44 +separator_close = ""
    45 +separator_style = { fg = "#2a2a37", bg = "#2a2a37" }
    46 +
    47 +progress_label = { fg = "#dcd7ba", bold = true }
    48 +progress_normal = { fg = "#7e9cd8", bg = "#363646" }
    49 +progress_error = { fg = "#e46876", bg = "#363646" }
    50 +
    51 +perm_type = { fg = "#7aa89f" }
    52 +perm_read = { fg = "#e6c384" }
    53 +perm_write = { fg = "#e46876" }
    54 +perm_exec = { fg = "#98bb6c" }
    55 +perm_sep = { fg = "#54546d" }
    56 +
    57 +[tabs]
    58 +active = { fg = "#1f1f28", bg = "#7e9cd8", bold = true }
    59 +inactive = { fg = "#8a887f", bg = "#2a2a37" }
    60 +
    61 +[which]
    62 +mask = { bg = "#2a2a37" }
    63 +cand = { fg = "#7aa89f" }
    64 +rest = { fg = "#8a887f" }
    65 +desc = { fg = "#dcd7ba" }
    66 +separator = " "
    67 +separator_style = { fg = "#363646" }
    68 +
    69 +[confirm]
    70 +border = { fg = "#7e9cd8" }
    71 +title = { fg = "#7e9cd8" }
    72 +content = {}
    73 +list = { fg = "#7aa89f" }
    74 +btn_yes = { fg = "#1f1f28", bg = "#98bb6c", bold = true }
    75 +btn_no = { fg = "#1f1f28", bg = "#e46876", bold = true }
    76 +btn_labels = [ " Yes ", " (N)o " ]
    77 +
    78 +[spot]
    79 +border = { fg = "#7e9cd8" }
    80 +title = { fg = "#7e9cd8" }
    81 +tbl_col = { fg = "#e6c384" }
    82 +tbl_cell = { fg = "#1f1f28", bg = "#7e9cd8" }
    83 +
    84 +[notify]
    85 +title_info = { fg = "#98bb6c" }
    86 +title_warn = { fg = "#e6c384" }
    87 +title_error = { fg = "#e46876" }
    88 +
    89 +[pick]
    90 +border = { fg = "#7e9cd8" }
    91 +active = { fg = "#d27e99", bold = true }
    92 +inactive = { fg = "#dcd7ba" }
    93 +
    94 +[input]
    95 +border = { fg = "#7e9cd8" }
    96 +title = {}
    97 +value = {}
    98 +selected = { reversed = true }
    99 +
    100 +[cmp]
    101 +border = { fg = "#7e9cd8" }
    102 +active = { fg = "#d27e99", bold = true }
    103 +inactive = { fg = "#dcd7ba" }
    104 +icon_file = ""
    105 +icon_folder = ""
    106 +icon_command = ""
    107 +
    108 +[tasks]
    109 +border = { fg = "#7e9cd8" }
    110 +title = {}
    111 +hovered = { fg = "#d27e99", underline = true }
    112 +
    113 +[help]
    114 +on = { fg = "#7aa89f" }
    115 +run = { fg = "#d27e99" }
    116 +desc = { fg = "#dcd7ba" }
    117 +hovered = { fg = "#1f1f28", bg = "#7e9cd8", bold = true }
    118 +footer = { fg = "#dcd7ba", bg = "#2a2a37" }
    119 +
    120 +[filetype]
    121 +rules = [
    122 + { mime = "image/*", fg = "#7aa89f" },
    123 + { mime = "{audio,video}/*", fg = "#e6c384" },
    124 + { mime = "application/{,g}zip", fg = "#957fb8" },
    125 + { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}", fg = "#957fb8" },
    126 + { mime = "application/{pdf,doc,rtf}", fg = "#ffa066" },
    127 + { url = "*.md", fg = "#ffa066" },
    128 + { url = "*/", fg = "#7e9cd8" },
    129 + { url = "*", fg = "#dcd7ba" },
    130 +]
  • install.sh +194
    Показать разницуСкрыть разницу
    1 +#!/usr/bin/env bash
    2 +# Установка сборки neovim + yazi + kitty на macOS и Arch Linux.
    3 +#
    4 +# ./install.sh всё: пакеты, шрифты, конфиги, shell, плагины nvim
    5 +# ./install.sh --skip-packages только конфиги, shell и плагины (пакеты уже стоят)
    6 +# ./install.sh --copy копировать конфиги вместо симлинков
    7 +# ./install.sh --help
    8 +#
    9 +# Существующие ~/.config/{nvim,yazi,kitty} не удаляются, а переименовываются в *.bak-<дата>.
    10 +
    11 +set -euo pipefail
    12 +
    13 +REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    14 +CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
    15 +STAMP="$(date +%Y%m%d-%H%M%S)"
    16 +CONFIGS=(nvim yazi kitty)
    17 +TS_PARSERS="'bash','c','cpp','diff','lua','luadoc','query','vim','vimdoc','html','css','scss','javascript','typescript','tsx','jsdoc','json','json5','yaml','toml','graphql','regex','markdown','markdown_inline','python','rust'"
    18 +
    19 +SKIP_PACKAGES=0
    20 +MODE=link
    21 +
    22 +for arg in "$@"; do
    23 + case "$arg" in
    24 + --skip-packages) SKIP_PACKAGES=1 ;;
    25 + --copy) MODE=copy ;;
    26 + -h | --help)
    27 + sed -n '2,9p' "$0" | sed 's/^# \{0,1\}//'
    28 + exit 0
    29 + ;;
    30 + *)
    31 + echo "Неизвестный аргумент: $arg (см. --help)" >&2
    32 + exit 1
    33 + ;;
    34 + esac
    35 +done
    36 +
    37 +# ── Вывод ─────────────────────────────────────────────
    38 +if [ -t 1 ]; then
    39 + B=$'\e[1m' G=$'\e[32m' Y=$'\e[33m' R=$'\e[31m' C=$'\e[36m' N=$'\e[0m'
    40 +else
    41 + B='' G='' Y='' R='' C='' N=''
    42 +fi
    43 +step() { printf '\n%s==>%s %s%s%s\n' "$C" "$N" "$B" "$*" "$N"; }
    44 +ok() { printf ' %s✓%s %s\n' "$G" "$N" "$*"; }
    45 +warn() { printf ' %s!%s %s\n' "$Y" "$N" "$*"; }
    46 +die() {
    47 + printf '%sОшибка:%s %s\n' "$R" "$N" "$*" >&2
    48 + exit 1
    49 +}
    50 +
    51 +# ── ОС ────────────────────────────────────────────────
    52 +case "$(uname -s)" in
    53 + Darwin) OS=macos ;;
    54 + Linux)
    55 + if [ -f /etc/arch-release ] || command -v pacman >/dev/null 2>&1; then
    56 + OS=arch
    57 + else
    58 + die "поддерживаются только macOS и Arch Linux (и производные: EndeavourOS, Manjaro, CachyOS)"
    59 + fi
    60 + ;;
    61 + *) die "неподдерживаемая система: $(uname -s)" ;;
    62 +esac
    63 +printf '%sСборка neovim + yazi + kitty%s — %s, режим: %s\n' "$B" "$N" "$OS" "$MODE"
    64 +
    65 +# ── 1. Пакеты ─────────────────────────────────────────
    66 +install_macos() {
    67 + if ! command -v brew >/dev/null 2>&1; then
    68 + step "Установка Homebrew"
    69 + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    70 + if [ -x /opt/homebrew/bin/brew ]; then
    71 + eval "$(/opt/homebrew/bin/brew shellenv)"
    72 + elif [ -x /usr/local/bin/brew ]; then
    73 + eval "$(/usr/local/bin/brew shellenv)"
    74 + fi
    75 + fi
    76 + step "Пакеты и шрифты (brew bundle)"
    77 + brew bundle --file="$REPO/packages/Brewfile"
    78 + ok "пакеты установлены"
    79 +}
    80 +
    81 +install_lilex_linux() {
    82 + local dir="$HOME/.local/share/fonts/Lilex"
    83 + if fc-list 2>/dev/null | grep -qi 'Lilex'; then
    84 + ok "шрифт Lilex уже установлен"
    85 + return
    86 + fi
    87 + step "Шрифт Lilex (GitHub mishamyrt/Lilex)"
    88 + local tmp
    89 + tmp="$(mktemp -d)"
    90 + curl -fsSL -o "$tmp/Lilex.zip" https://github.com/mishamyrt/Lilex/releases/latest/download/Lilex.zip
    91 + unzip -q "$tmp/Lilex.zip" -d "$tmp/Lilex"
    92 + mkdir -p "$dir"
    93 + find "$tmp/Lilex" -name '*.ttf' -exec cp {} "$dir/" \;
    94 + [ -n "$(ls -A "$dir")" ] || find "$tmp/Lilex" -name '*.otf' -exec cp {} "$dir/" \;
    95 + rm -rf "$tmp"
    96 + fc-cache -f "$dir" >/dev/null
    97 + ok "Lilex установлен в $dir"
    98 +}
    99 +
    100 +install_arch() {
    101 + step "Пакеты (pacman)"
    102 + grep -vE '^\s*(#|$)' "$REPO/packages/arch.txt" | sudo pacman -S --needed --noconfirm -
    103 + ok "пакеты установлены"
    104 + install_lilex_linux
    105 +}
    106 +
    107 +if [ "$SKIP_PACKAGES" -eq 1 ]; then
    108 + step "Пакеты: пропущено (--skip-packages)"
    109 +else
    110 + "install_$OS"
    111 +fi
    112 +
    113 +for cmd in nvim yazi git; do
    114 + command -v "$cmd" >/dev/null 2>&1 || die "не найден '$cmd' — установи пакеты (запусти без --skip-packages)"
    115 +done
    116 +
    117 +# ── 2. Конфиги ────────────────────────────────────────
    118 +step "Конфиги → $CONFIG_HOME"
    119 +mkdir -p "$CONFIG_HOME"
    120 +
    121 +for name in "${CONFIGS[@]}"; do
    122 + src="$REPO/config/$name"
    123 + dst="$CONFIG_HOME/$name"
    124 +
    125 + if [ -L "$dst" ] && [ "$(readlink "$dst")" = "$src" ]; then
    126 + ok "$name: уже подключён"
    127 + continue
    128 + fi
    129 + if [ -e "$dst" ] || [ -L "$dst" ]; then
    130 + mv "$dst" "$dst.bak-$STAMP"
    131 + warn "$name: старый конфиг сохранён в $dst.bak-$STAMP"
    132 + fi
    133 + if [ "$MODE" = link ]; then
    134 + ln -s "$src" "$dst"
    135 + ok "$name: симлинк $dst → $src"
    136 + else
    137 + cp -R "$src" "$dst"
    138 + ok "$name: скопирован в $dst"
    139 + fi
    140 +done
    141 +
    142 +# ── 3. Shell ──────────────────────────────────────────
    143 +step "Интеграция в shell (функция y, zoxide, EDITOR=nvim)"
    144 +MARK="# neovim_yazi_settings"
    145 +LINE="[ -f \"$REPO/shell/shellrc.sh\" ] && . \"$REPO/shell/shellrc.sh\" $MARK"
    146 +
    147 +rc_files=()
    148 +[ -f "$HOME/.zshrc" ] || [ "$(basename "${SHELL:-}")" = zsh ] && rc_files+=("$HOME/.zshrc")
    149 +[ -f "$HOME/.bashrc" ] || [ "$(basename "${SHELL:-}")" = bash ] && rc_files+=("$HOME/.bashrc")
    150 +
    151 +for rc in "${rc_files[@]}"; do
    152 + touch "$rc"
    153 + if grep -qF "$MARK" "$rc"; then
    154 + # Репозиторий могли переместить — обновим путь
    155 + grep -vF "$MARK" "$rc" >"$rc.tmp" && mv "$rc.tmp" "$rc"
    156 + fi
    157 + printf '\n%s\n' "$LINE" >>"$rc"
    158 + ok "подключено в $rc"
    159 +done
    160 +
    161 +# ── 4. Плагины Neovim ─────────────────────────────────
    162 +step "Плагины Neovim (lazy.nvim, версии из lazy-lock.json)"
    163 +# При первом запуске lazy.nvim ставит часть плагинов свежими и перезаписывает lockfile.
    164 +# Сохраняем зафиксированные версии, а после установки откатываем плагины на них.
    165 +LOCK="$CONFIG_HOME/nvim/lazy-lock.json"
    166 +LOCK_SAVED="$(mktemp)"
    167 +cp "$LOCK" "$LOCK_SAVED"
    168 +nvim --headless '+Lazy! install' +qa
    169 +cp "$LOCK_SAVED" "$LOCK"
    170 +nvim --headless '+Lazy! restore' +qa
    171 +cp "$LOCK_SAVED" "$LOCK"
    172 +rm -f "$LOCK_SAVED"
    173 +ok "плагины установлены"
    174 +
    175 +step "LSP-серверы и форматтеры (Mason) — может занять несколько минут"
    176 +nvim --headless '+MasonToolsInstallSync' +qa
    177 +nvim --headless '+MasonInstall codelldb' +qa >/dev/null # отладчик C/C++/Rust (иначе ставится при первом F5)
    178 +ok "Mason: инструменты установлены"
    179 +
    180 +step "Парсеры Treesitter"
    181 +nvim --headless "+lua require('nvim-treesitter').install({ $TS_PARSERS }):wait(600000)" +qa
    182 +ok "парсеры установлены"
    183 +
    184 +# ── Готово ────────────────────────────────────────────
    185 +printf '\n%s%sГотово!%s\n' "$G" "$B" "$N"
    186 +cat <<EOF
    187 +
    188 + • Перезапусти терминал (или: source ~/.zshrc)
    189 + • Открой kitty — шрифт Lilex и тема Kanagawa уже настроены
    190 + • nvim — редактор (проверка: :checkhealth)
    191 + • y — файловый менеджер yazi
    192 + • Шпаргалка по Neovim: $REPO/config/nvim/COMMANDS.md
    193 +
    194 +EOF
  • Показать разницуСкрыть разницу
    1 +# macOS: всё, что нужно сборке. Установка: brew bundle --file=packages/Brewfile
    2 +
    3 +# ── Ядро ──────────────────────────────────────────────
    4 +brew "neovim"
    5 +brew "yazi"
    6 +cask "kitty"
    7 +brew "git"
    8 +
    9 +# ── Neovim: поиск, сборка плагинов, LSP/форматтеры (Mason) ──
    10 +brew "ripgrep" # Telescope live grep
    11 +brew "fd" # Telescope find files
    12 +brew "fzf"
    13 +brew "tree-sitter-cli" # компиляция парсеров nvim-treesitter
    14 +brew "node" # Mason: pyright, ts/html/css серверы, prettier
    15 +brew "python"
    16 +brew "uv" # Python-окружения (venv-selector)
    17 +brew "unzip"
    18 +brew "cmake" # C/C++ проекты
    19 +
    20 +# ── Yazi: превью и интеграции ─────────────────────────
    21 +brew "ffmpeg" # превью видео
    22 +brew "sevenzip" # архивы
    23 +brew "jq" # JSON
    24 +brew "poppler" # PDF
    25 +brew "resvg" # SVG
    26 +brew "imagemagick" # шрифты, HEIC, JPEG XL
    27 +brew "zoxide" # быстрый переход по папкам (z)
    28 +
    29 +# ── Шрифты ────────────────────────────────────────────
    30 +cask "font-lilex" # основной шрифт kitty
    31 +cask "font-symbols-only-nerd-font" # иконки (Nerd Font symbols)
  • Показать разницуСкрыть разницу
    1 +# Arch Linux: пакеты из официальных репозиториев (core/extra).
    2 +# Установка: grep -v '^#' packages/arch.txt | sudo pacman -S --needed -
    3 +# Шрифт Lilex в репозиториях нет — install.sh скачивает его с GitHub.
    4 +
    5 +# Ядро
    6 +neovim
    7 +yazi
    8 +kitty
    9 +git
    10 +curl
    11 +base-devel
    12 +
    13 +# Neovim: поиск, сборка плагинов, LSP/форматтеры (Mason)
    14 +ripgrep
    15 +fd
    16 +fzf
    17 +tree-sitter-cli
    18 +nodejs
    19 +npm
    20 +python
    21 +uv
    22 +unzip
    23 +clang
    24 +cmake
    25 +gdb
    26 +
    27 +# Буфер обмена (Wayland / X11)
    28 +wl-clipboard
    29 +xclip
    30 +
    31 +# Yazi: превью и интеграции
    32 +ffmpeg
    33 +7zip
    34 +jq
    35 +poppler
    36 +resvg
    37 +imagemagick
    38 +zoxide
    39 +
    40 +# Шрифты
    41 +fontconfig
    42 +ttf-nerd-fonts-symbols-mono
  • Показать разницуСкрыть разницу
    1 +# Интеграция сборки в shell (zsh / bash). Подключается из ~/.zshrc / ~/.bashrc через install.sh.
    2 +
    3 +export EDITOR=nvim
    4 +export VISUAL=nvim
    5 +
    6 +# y — запуск yazi; при выходе (q) терминал остаётся в папке, где ты был в yazi.
    7 +y() {
    8 + local tmp cwd
    9 + tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
    10 + yazi "$@" --cwd-file="$tmp"
    11 + cwd="$(command cat -- "$tmp")"
    12 + if [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
    13 + builtin cd -- "$cwd" || return
    14 + fi
    15 + rm -f -- "$tmp"
    16 +}
    17 +
    18 +# z <часть-пути> — прыжок в часто используемую папку
    19 +if command -v zoxide >/dev/null 2>&1; then
    20 + if [ -n "$ZSH_VERSION" ]; then
    21 + eval "$(zoxide init zsh)"
    22 + elif [ -n "$BASH_VERSION" ]; then
    23 + eval "$(zoxide init bash)"
    24 + fi
    25 +fi