Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96fdd735ad |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +0,0 @@
|
|||||||
node_modules
|
|
||||||
package.json
|
|
||||||
package-lock.json
|
|
||||||
27
README.md
27
README.md
@@ -1,26 +1,3 @@
|
|||||||
# NVIM by MIRZAEV
|
# nvim
|
||||||
My settings, keymaps and plugins for NeoVim 😼<br>
|
|
||||||
<small><i>The installer only works with [fish](https://fishshell.com/) and [ubuntu](https://ubuntu.com/)</i></small>
|
|
||||||
|
|
||||||
# Install
|
My settings, keymaps and plugins for NeoVim
|
||||||
|
|
||||||
### Send these commands
|
|
||||||
1. `cd ~/.config`
|
|
||||||
2. `git clone https://git.svoboda.works/mirzaev/nvim`
|
|
||||||
3. `cd nvim`
|
|
||||||
4. `./install.sh -u`
|
|
||||||
|
|
||||||
### Open nvim and then
|
|
||||||
1. `:PackerSync`
|
|
||||||
2. `:PackerSync` (yeah, again)
|
|
||||||
3. `:TSInstall fish php html css javascript` (add your languages here)
|
|
||||||
4. `:COQdeps`
|
|
||||||
|
|
||||||
<small><b>Have fun!</b></small>
|
|
||||||
|
|
||||||
# Installer screenshots
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
# NVIM screenshots
|
|
||||||
later
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 73 KiB |
11
init.lua
11
init.lua
@@ -1,15 +1,12 @@
|
|||||||
-- Settings
|
-- Настройки
|
||||||
require('settings/system')
|
require('settings/system')
|
||||||
require('settings/tabs')
|
require('settings/tabs')
|
||||||
require('settings/panels')
|
require('settings/panels')
|
||||||
require('settings/search')
|
require('settings/search')
|
||||||
|
|
||||||
-- Plugins
|
-- Плагины
|
||||||
require("settings/lazy")
|
require('plugins/packer')
|
||||||
|
|
||||||
-- Keymaps
|
-- Комбинации клавиш
|
||||||
require('keymaps/system')
|
require('keymaps/system')
|
||||||
require('keymaps/plugins')
|
require('keymaps/plugins')
|
||||||
|
|
||||||
-- Autocommands
|
|
||||||
require('autocommands')
|
|
||||||
|
|||||||
401
install.sh
401
install.sh
@@ -1,29 +1,15 @@
|
|||||||
#!/usr/bin/env fish
|
#!/usr/bin/fish
|
||||||
|
|
||||||
# Initializing the flags
|
|
||||||
set -l options (fish_opt -s v -l verbose)
|
|
||||||
set options $options (fish_opt -s f -l force)
|
|
||||||
set options $options (fish_opt -s u -l update)
|
|
||||||
set options $options (fish_opt -s h -l help)
|
|
||||||
|
|
||||||
# Initializing settings
|
|
||||||
set NODEJS_VERSION 23
|
|
||||||
set NVIM_WIKI_INSTALLATION "https://github.com/neovim/neovim/wiki/Installing-Neovim/921fe8c40c34dd1f3fb35d5b48c484db1b8ae94b"
|
|
||||||
|
|
||||||
# Reading the flags
|
|
||||||
argparse $options -- $argv
|
|
||||||
|
|
||||||
# Initializing the buffer of output
|
|
||||||
set -l output (if set -q _flag_verbose; echo '/dev/tty'; else; echo '/dev/null'; end)
|
|
||||||
|
|
||||||
# Инициализация текста сообщений в зависимости от установленного языка в оболочке
|
# Инициализация текста сообщений в зависимости от установленного языка в оболочке
|
||||||
if test (string match -ri "ru" "$LANG")
|
if test (string match -ri "ru" "$LANG")
|
||||||
function print -a TYPE PARAM1 PARAM2 -d "Текст сообщений"
|
function print -a TYPE PARAM1 PARAM2 -d "Текст сообщений"
|
||||||
switch $TYPE
|
switch $TYPE
|
||||||
case HELP
|
case PACKER_INSTALL
|
||||||
set_color -b red yellow; echo -n "[mirzaev/nvim] "; set_color brcyan; echo -n "[ИНФОРМАЦИЯ] "; set_color -o white; echo "Формат: install.sh [флаги]"; echo; set_color normal; set_color yellow; echo -n " -u "; set_color cyan; echo -n "--update "; set_color -d white; echo "Обновить все зависимости"; set_color normal; set_color yellow; echo -n " -f "; set_color cyan; echo -n "--force "; set_color -d white; echo "Не просить подтверждения"; set_color normal; set_color yellow; echo -n " -v "; set_color cyan; echo -n "--verbose "; set_color -d white; echo "Подключить TTY к буферу вывода"; set_color normal; set_color yellow; echo -n " -h "; set_color cyan; echo -n "--help "; set_color -d white; echo "Прислать это сообщение"; echo; set_color normal; set_color white; echo -n "Этот установщик работает только для "; set_color yellow; echo -n "fish "; set_color white; echo -n "и "; set_color red; echo -n "ubuntu";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить Packer? (\"wbthomason/packer.nvim\") (y/N) ";
|
||||||
case NVIM_NOT_INSTALLED
|
case PACKER_EXISTS
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color red; echo -n "[ОШИБКА] "; set_color white; echo "NeoVim не установлен";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Packer уже установлен. Переустановить? (y/N) ";
|
||||||
|
case PACKER_INSTALLED
|
||||||
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен Packer";
|
||||||
case LSP_INTELEPHENSE_INSTALL
|
case LSP_INTELEPHENSE_INSTALL
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для PHP? (\"bmewburn/vscode-intelephense\") (y/N) ";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для PHP? (\"bmewburn/vscode-intelephense\") (y/N) ";
|
||||||
case LSP_INTELEPHENSE_INSTALLED
|
case LSP_INTELEPHENSE_INSTALLED
|
||||||
@@ -52,35 +38,17 @@ if test (string match -ri "ru" "$LANG")
|
|||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить форматировщик для NGINX? (\"vasilevich/nginxbeautifier\") (y/N) ";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить форматировщик для NGINX? (\"vasilevich/nginxbeautifier\") (y/N) ";
|
||||||
case FORMATTER_NGINX_INSTALLED
|
case FORMATTER_NGINX_INSTALLED
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен форматировщик для NGINX (\"vasilevich/nginxbeautifier\")";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен форматировщик для NGINX (\"vasilevich/nginxbeautifier\")";
|
||||||
case FORMATTER_PRETTIER_INSTALL
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить форматировщик Prettier? (\"prettier/vim-prettier\") (y/N) ";
|
|
||||||
case FORMATTER_PRETTIER_INSTALLED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен форматировщик Prettier (\"prettier/vim-prettier\")";
|
|
||||||
case PHP_DEBUG_ADAPTER_INSTALL
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить адаптер для отладки PHP? (\"xdebug/vscode-php-debug\") (y/N) ";
|
|
||||||
case PHP_DEBUG_ADAPTER_INSTALLED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен адаптер для отладки PHP (\"xdebug/vscode-php-debug\")";
|
|
||||||
case FONT_INSTALL
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить шрифт "(set_color cyan)"FiraCode"(set_color white)"? (y/N) ";
|
|
||||||
case FONT_INSTALLED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен шрифт "(set_color cyan)"FiraCode"(set_color white)" (выбери его в настройках твоего эмулятора терминала)";
|
|
||||||
case FONTS
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color magenta; echo -n "[ДАННЫЕ] "; set_color white; echo "Шрифты для GNOME эмулятора терминала: https://www.nerdfonts.com/font-downloads (моя рекомендация - "(set_color cyan)"FiraCode"(set_color white)")";
|
|
||||||
case FONT_PATCH
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Пропатчить шрифт для иконок? (\"nvim-tree/nvim-web-devicons\") (y/N) ";
|
|
||||||
case FONT_CHOOSE
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Путь до шрифта";
|
|
||||||
case FONT_PATCHED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Пропатчен шрифт для иконок (\"nvim-tree/nvim-web-devicons\")";
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
function print -a TYPE PARAM1 PARAM2 -d "Messages text"
|
function print -a TYPE PARAM1 PARAM2 -d "Messages text"
|
||||||
switch $TYPE
|
switch $TYPE
|
||||||
case HELP
|
case PACKER_INSTALL
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color brcyan; echo -n "[INFORMATION] "; set_color -o white; echo "Format: install.sh [flags]"; echo; set_color normal; set_color yellow; echo -n " -u "; set_color cyan; echo -n "--update "; set_color -d white; echo "Update all dependencies"; set_color normal; set_color yellow; echo -n " -f "; set_color cyan; echo -n "--force "; set_color -d white; echo "Do not ask for confirmations"; set_color normal; set_color yellow; echo -n " -v "; set_color cyan; echo -n "--verbose "; set_color -d white; echo "Connect TTY to the output buffer"; set_color normal; set_color yellow; echo -n " -h "; set_color cyan; echo -n "--help "; set_color -d white; echo "Send this message"; set_color normal; set_color white; echo; echo -n "This installer only works with "; set_color yellow; echo -n "fish "; set_color white; echo -n "and "; set_color red; echo "ubuntu";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install Packer? (\"wbthomason/packer.nvim\") (y/N) ";
|
||||||
case NVIM_NOT_INSTALLED
|
case PACKER_EXISTS
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color red; echo -n "[ERROR] "; set_color white; echo "NeoVim is not installed";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Packer already installed. Reinstall? (y/N) ";
|
||||||
|
case PACKER_INSTALLED
|
||||||
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed Packer";
|
||||||
case LSP_INTELEPHENSE_INSTALL
|
case LSP_INTELEPHENSE_INSTALL
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for PHP? (\"bmewburn/vscode-intelephense\") (y/N) ";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for PHP? (\"bmewburn/vscode-intelephense\") (y/N) ";
|
||||||
case LSP_INTELEPHENSE_INSTALLED
|
case LSP_INTELEPHENSE_INSTALLED
|
||||||
@@ -96,11 +64,11 @@ else
|
|||||||
case LSP_CSSMODULES_INSTALL
|
case LSP_CSSMODULES_INSTALL
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for CSS (formatter)? (\"antonk52/cssmodules-language-server\") (y/N) ";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for CSS (formatter)? (\"antonk52/cssmodules-language-server\") (y/N) ";
|
||||||
case LSP_CSSMODULES_INSTALLED
|
case LSP_CSSMODULES_INSTALLED
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the LSP-server for CSS (formatter) (\"antonk52/cssmodules-language-server\")";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Install the LSP-server for CSS (formatter) (\"antonk52/cssmodules-language-server\")";
|
||||||
case LSP_DENO_INSTALL
|
case LSP_DENO_INSTALL
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for JavaScript and PostScript? (\"denoland/deno\") (y/N) ";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for JavaScript и PostScript? (\"denoland/deno\") (y/N) ";
|
||||||
case LSP_DENO_INSTALLED
|
case LSP_DENO_INSTALLED
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the LSP-server for JavaScript and PostScript (\"denoland/deno\")";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the LSP-server for JavaScript и PostScript (\"denoland/deno\")";
|
||||||
case LSP_LUA_INSTALL
|
case LSP_LUA_INSTALL
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for Lua? (\"luals/lua-language-server\") (y/N) ";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for Lua? (\"luals/lua-language-server\") (y/N) ";
|
||||||
case LSP_LUA_INSTALLED
|
case LSP_LUA_INSTALLED
|
||||||
@@ -109,311 +77,136 @@ else
|
|||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the formatter for NGINX? (\"vasilevich/nginxbeautifier\") (y/N) ";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the formatter for NGINX? (\"vasilevich/nginxbeautifier\") (y/N) ";
|
||||||
case FORMATTER_NGINX_INSTALLED
|
case FORMATTER_NGINX_INSTALLED
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the formatter for NGINX (\"vasilevich/nginxbeautifier\")";
|
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the formatter for NGINX (\"vasilevich/nginxbeautifier\")";
|
||||||
case FORMATTER_PRETTIER_INSTALL
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the formatter Prettier? (\"prettier/vim-prettier\") (y/N) ";
|
|
||||||
case FORMATTER_PRETTIER_INSTALLED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the formatter Prettier (\"prettier/vim-prettier\")";
|
|
||||||
case PHP_DEBUG_ADAPTER_INSTALL
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the debug adapter for PHP? (\"xdebug/vscode-php-debug\") (y/N) ";
|
|
||||||
case PHP_DEBUG_ADAPTER_INSTALLED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the debug-adapter for PHP (\"xdebug/vscode-php-debug\")";
|
|
||||||
case FONT_INSTALL
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install "(set_color cyan)"FiraCode"(set_color white)" font? (y/N) ";
|
|
||||||
case FONT_INSTALLED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed "(set_color cyan)"FiraCode"(set_color white)" font (select it in your terminal emulator settings)";
|
|
||||||
case FONTS
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color magenta; echo -n "[INFO] "; set_color white; echo "Fonts for GNOME terminal emulator: https://www.nerdfonts.com/font-downloads (my recommendation - "(set_color cyan)"FiraCode"(set_color white)") ";
|
|
||||||
case FONT_PATCH
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Patch your font for icons? (\"nvim-tree/nvim-web-devicons\") (y/N) ";
|
|
||||||
case FONT_CHOOSE
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Path to the font";
|
|
||||||
case FONT_PATCHED
|
|
||||||
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Pathed the font for icons (\"nvim-tree/nvim-web-devicons\")";
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if set -q _flag_help
|
# Installation request
|
||||||
# Sending the message
|
set RESPONSE (read -n 1 -p "print PACKER_INSTALL")
|
||||||
print HELP
|
bind -e y
|
||||||
|
|
||||||
# Exit (success)
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
exit 0
|
if test -d ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||||
|
# Найден репозиторий "wbthomason/packer.nvim"
|
||||||
|
|
||||||
|
# Installation request
|
||||||
|
set RESPONSE (read -n 1 -p "print PACKER_EXISTS")
|
||||||
|
bind -e y
|
||||||
|
|
||||||
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
|
# Запрошена переустановка
|
||||||
|
|
||||||
|
# Деинициализация старого репозитория
|
||||||
|
rm -rf ~/.local/share/nvim/site/pack/packer/start/packer.nvim 1> /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
# Инициализация репозитория
|
||||||
|
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||||
|
~/.local/share/nvim/site/pack/packer/start/packer.nvim 1> /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
print PACKER_INSTALLED
|
||||||
|
end
|
||||||
|
else
|
||||||
|
# Не найден репозиторий "wbthomason/packer.nvim"
|
||||||
|
|
||||||
|
# Инициализация репозитория
|
||||||
|
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||||
|
~/.local/share/nvim/site/pack/packer/start/packer.nvim 1> /dev/null 2> /dev/null
|
||||||
|
|
||||||
|
print PACKER_INSTALLED
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not type -q nvim
|
# Installation request
|
||||||
# Sending the message
|
set RESPONSE (read -n 1 -p "print LSP_INTELEPHENSE_INSTALL")
|
||||||
print NVIM_NOT_INSTALLED
|
bind -e y
|
||||||
set_color blue
|
|
||||||
echo $NVIM_WIKI_INSTALLATION
|
|
||||||
|
|
||||||
# Exit (fail)
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
exit 1
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_update
|
|
||||||
begin
|
|
||||||
# Downloading and installing fnm (for NodeJS)
|
|
||||||
curl -o- https://fnm.vercel.app/install | bash
|
|
||||||
|
|
||||||
# Initializing fnm
|
|
||||||
source ~/.config/fish/conf.d/fnm.fish
|
|
||||||
|
|
||||||
# Installing dependencies
|
|
||||||
sudo apt install -y curl zip
|
|
||||||
|
|
||||||
# Downloadind and installing Node.js:
|
|
||||||
fnm install $NODEJS_VERSION
|
|
||||||
|
|
||||||
# need to rewrite in the future (бляяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяя)
|
|
||||||
sudo apt install -y npm python3-venv python3-pip rubygems ruby-dev pkg-config lua5.4 luarocks
|
|
||||||
python3 -m pip install --upgrade pip
|
|
||||||
pip install --upgrade pynvim
|
|
||||||
sudo gem install neovim
|
|
||||||
|
|
||||||
# Install NeoVim module for NPM
|
|
||||||
npm i -g neovim
|
|
||||||
end &> $output
|
|
||||||
end
|
|
||||||
|
|
||||||
# Initializing the virtual environment for Python packages
|
|
||||||
python3 -m venv ~/.local --system-site-packages
|
|
||||||
|
|
||||||
if not set -q _flag_force
|
|
||||||
# Installation request
|
|
||||||
set RESPONSE (read -n 1 -p "print LSP_INTELEPHENSE_INSTALL")
|
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
|
||||||
# Запрошена установка "bmewburn/vscode-intelephense"
|
# Запрошена установка "bmewburn/vscode-intelephense"
|
||||||
|
|
||||||
begin
|
# Установка
|
||||||
# Установка
|
npm i intelephense 1> /dev/null 2> /dev/null
|
||||||
npm i -g intelephense
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print LSP_INTELEPHENSE_INSTALLED
|
print LSP_INTELEPHENSE_INSTALLED
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q _flag_force
|
# Installation request
|
||||||
# Installation request
|
set RESPONSE (read -n 1 -p "print LSP_VSCODE-LANGSERVERS_INSTALL")
|
||||||
set RESPONSE (read -n 1 -p "print LSP_VSCODE-LANGSERVERS_INSTALL")
|
bind -e y
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
# Запрошена установка "hrsh7th/vscode-langservers-extracted"
|
# Запрошена установка "hrsh7th/vscode-langservers-extracted"
|
||||||
|
|
||||||
begin
|
# Установка
|
||||||
# Установка
|
npm i vscode-langservers-extracted 1> /dev/null 2> /dev/null
|
||||||
npm i -g vscode-langservers-extracted
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print LSP_VSCODE-LANGSERVERS_INSTALLED
|
print LSP_VSCODE-LANGSERVERS_INSTALLED
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q _flag_force
|
# Installation request
|
||||||
# Installation request
|
set RESPONSE (read -n 1 -p "print LSP_EMMET_INSTALL")
|
||||||
set RESPONSE (read -n 1 -p "print LSP_EMMET_INSTALL")
|
bind -e y
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
# Запрошена установка "aca/emmet-ls"
|
# Запрошена установка "aca/emmet-ls"
|
||||||
|
|
||||||
begin
|
# Установка
|
||||||
# Установка
|
npm i emmet-ls 1> /dev/null 2> /dev/null
|
||||||
npm i -g emmet-ls
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print LSP_EMMET_INSTALLED
|
print LSP_EMMET_INSTALLED
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q _flag_force
|
# Installation request
|
||||||
# Installation request
|
set RESPONSE (read -n 1 -p "print LSP_CSSMODULES_INSTALL")
|
||||||
set RESPONSE (read -n 1 -p "print LSP_CSSMODULES_INSTALL")
|
bind -e y
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
# Запрошена установка "antonk52/cssmodules-language-server"
|
# Запрошена установка "antonk52/cssmodules-language-server"
|
||||||
|
|
||||||
begin
|
# Установка
|
||||||
# Установка
|
npm i cssmodules-language-server 1> /dev/null 2> /dev/null
|
||||||
npm i -g cssmodules-language-server
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print LSP_CSSMODULES_INSTALLED
|
print LSP_CSSMODULES_INSTALLED
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q _flag_force
|
# Installation request
|
||||||
# Installation request
|
set RESPONSE (read -n 1 -p "print LSP_DENO_INSTALL")
|
||||||
set RESPONSE (read -n 1 -p "print LSP_DENO_INSTALL")
|
bind -e y
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
# Запрошена установка "denoland/deno"
|
# Запрошена установка "denoland/deno"
|
||||||
|
|
||||||
begin
|
# Установка
|
||||||
# Установка
|
curl -fsSL https://deno.land/install.sh | sh 1> /dev/null 2> /dev/null
|
||||||
curl -fsSL https://deno.land/install.sh | sh
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
# TODO доделать нормально
|
|
||||||
set -g DENO_INSTALL "$HOME/.deno"
|
|
||||||
fish_add_path $DENO_INSTALL/bin
|
|
||||||
|
|
||||||
print LSP_DENO_INSTALLED
|
print LSP_DENO_INSTALLED
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Installation request
|
||||||
|
set RESPONSE (read -n 1 -p "print LSP_LUA_INSTALL")
|
||||||
|
bind -e y
|
||||||
|
|
||||||
if not set -q _flag_force
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
# Installation request
|
|
||||||
set RESPONSE (read -n 1 -p "print LSP_LUA_INSTALL")
|
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
|
||||||
# Запрошена установка "luals/lua-language-server"
|
# Запрошена установка "luals/lua-language-server"
|
||||||
|
|
||||||
begin
|
# Установка
|
||||||
# Установка
|
cd ~/
|
||||||
sudo apt install ninja-build -y
|
git clone https://github.com/LuaLS/lua-language-server 1> /dev/null 2> /dev/null
|
||||||
cd ~/
|
cd lua-language-server
|
||||||
rm -rf lua-language-server
|
fish ./make.sh 1> /dev/null 2> /dev/null
|
||||||
git clone https://github.com/LuaLS/lua-language-server
|
fish_add_path $(realpath ./)/bin 1> /dev/null 2> /dev/null
|
||||||
cd lua-language-server
|
|
||||||
bash ./make.sh
|
|
||||||
fish_add_path $HOME/lua-language-server/bin
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print LSP_LUA_INSTALLED
|
print LSP_LUA_INSTALLED
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q _flag_force
|
# Installation request
|
||||||
# Installation request
|
set RESPONSE (read -n 1 -p "print FORMATTER_NGINX_INSTALL")
|
||||||
set RESPONSE (read -n 1 -p "print FORMATTER_NGINX_INSTALL")
|
bind -e y
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
if test (string match -ri 'y' "$RESPONSE")
|
||||||
# Запрошена установка "vasilevich/nginxbeautifier"
|
# Запрошена установка "vasilevich/nginxbeautifier"
|
||||||
|
|
||||||
begin
|
# Установка
|
||||||
# Установка
|
npm i nginxbeautifier 1> /dev/null 2> /dev/null
|
||||||
npm i -g nginxbeautifier
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print FORMATTER_NGINX_INSTALLED
|
print FORMATTER_NGINX_INSTALLED
|
||||||
end
|
end
|
||||||
|
|
||||||
if not set -q _flag_force
|
|
||||||
# Installation request
|
|
||||||
set RESPONSE (read -n 1 -p "print FORMATTER_PRETTIER_INSTALL")
|
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
|
||||||
# Accepted installation of "prettier/vim-prettier"
|
|
||||||
|
|
||||||
begin
|
|
||||||
npm i prettier
|
|
||||||
npm i -g prettier
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print FORMATTER_PRETTIER_INSTALLED
|
|
||||||
end
|
|
||||||
|
|
||||||
if not set -q _flag_force
|
|
||||||
# Installation request
|
|
||||||
set RESPONSE (read -n 1 -p "print PHP_DEBUG_ADAPTER_INSTALL")
|
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
|
||||||
# Accepted installation of "xdebug/vscode-php-debug"
|
|
||||||
|
|
||||||
begin
|
|
||||||
cd ~/
|
|
||||||
git clone https://github.com/xdebug/vscode-php-debug.git
|
|
||||||
cd vscode-php-debug
|
|
||||||
npm install && npm run build
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print PHP_DEBUG_ADAPTER_INSTALLED
|
|
||||||
end
|
|
||||||
|
|
||||||
print FONTS
|
|
||||||
|
|
||||||
if not set -q _flag_force
|
|
||||||
# Installation request
|
|
||||||
set RESPONSE (read -n 1 -p "print FONT_INSTALL")
|
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
|
||||||
# Accepted installation of the FiraCode font
|
|
||||||
|
|
||||||
begin
|
|
||||||
mkdir -p ~/.local/share/fonts/FiraCode
|
|
||||||
cd ~/.local/share/fonts/FiraCode
|
|
||||||
wget "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/FiraCode.zip"
|
|
||||||
unzip -o FiraCode.zip
|
|
||||||
rm FiraCode.zip
|
|
||||||
sudo apt install fontconfig
|
|
||||||
fc-cache -f -v
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print FONT_INSTALLED
|
|
||||||
|
|
||||||
if type -q dconf
|
|
||||||
# GNOME
|
|
||||||
|
|
||||||
# if (set -q _flag_force or string match (lsb_release -i | grep -Po '[^\s]*$') Ubuntu))
|
|
||||||
# sudo apt-get install dconf
|
|
||||||
# end
|
|
||||||
end
|
|
||||||
|
|
||||||
# dconf write /apps/gnome-terminal/profiles/Default/font FiraCodeNerdFontMono-Medium.ttf
|
|
||||||
# gconftool-2 --set /apps/gnome-terminal/profiles/Default/use_system_font --type=boolean false
|
|
||||||
# gconftool-2 --set /apps/gnome-terminal/profiles/Default/font --type string FiraCodeNerdFontMono-Medium.ttf
|
|
||||||
else
|
|
||||||
# Denied installation of the FiraCode font
|
|
||||||
|
|
||||||
if not set -q _flag_force
|
|
||||||
# Installation request
|
|
||||||
set RESPONSE (read -n 1 -p "print FONT_PATCH")
|
|
||||||
bind -e y
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
|
|
||||||
# Accepted to patching the font
|
|
||||||
|
|
||||||
begin
|
|
||||||
cd ~/
|
|
||||||
wget "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip"
|
|
||||||
unzip -o FontPatcher.zip -d font_patcher
|
|
||||||
cd font_patcher
|
|
||||||
|
|
||||||
#if not type -q python && type -q python3
|
|
||||||
if not type -q python
|
|
||||||
# alias python=python3
|
|
||||||
sudo apt install python-is-python3 -y
|
|
||||||
end
|
|
||||||
|
|
||||||
sudo apt install fontforge python3-fontforge -y
|
|
||||||
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
# Initializing path to the font
|
|
||||||
set FONT (read -p "print FONT_CHOOSE")
|
|
||||||
|
|
||||||
begin
|
|
||||||
./font-patcher $FONT
|
|
||||||
end &> $output
|
|
||||||
|
|
||||||
print FONT_PATCHED
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
{
|
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
|
||||||
"coq.artifacts": { "branch": "artifacts", "commit": "ef5f21d638ccc456cfa5b8d0ab37093cefe48c8b" },
|
|
||||||
"coq.thirdparty": { "branch": "3p", "commit": "2bd969a2bcd2624f9c260b1000957c7e665e308e" },
|
|
||||||
"coq_nvim": { "branch": "coq", "commit": "d8b71757358038fa151fb45c493c3a1e8c3629a3" },
|
|
||||||
"diaglist.nvim": { "branch": "master", "commit": "8aba9fcf62cc60e1d5ce941faedecc399d9a1e8b" },
|
|
||||||
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
|
|
||||||
"flexoki": { "branch": "main", "commit": "079554c242a86be5d1a95598c7c6368d6eedd7a3" },
|
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" },
|
|
||||||
"jsctags": { "branch": "master", "commit": "22d3fb848c429d4704dc3a8946bc3a4423a8e4a4" },
|
|
||||||
"kommentary": { "branch": "main", "commit": "d5a111a3bc4109a8f913a5863c9092b3b3801482" },
|
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
|
||||||
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
|
|
||||||
"lspkind-nvim": { "branch": "master", "commit": "3ddd1b4edefa425fda5a9f95a4f25578727c0bb3" },
|
|
||||||
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
|
|
||||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
|
||||||
"lush.nvim": { "branch": "main", "commit": "9c60ec2279d62487d942ce095e49006af28eed6e" },
|
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
|
||||||
"nginx.vim": { "branch": "master", "commit": "cffaec54f0c7f9518de053634413a20e90eac825" },
|
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
|
|
||||||
"nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" },
|
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
|
||||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
|
||||||
"nvim-lint": { "branch": "master", "commit": "c47b71d146a0b638f46672e6704c322369385df6" },
|
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "c4f67bf85b01a57e3c130352c0a0e453ab8cd5b9" },
|
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "4fc09bee78e91bf4ba471cdab4bf9dfa37fde51c" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
|
||||||
"phpctags": { "branch": "master", "commit": "5ed731eb86227d416977b0a1fd06e77e58363818" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
|
||||||
"reticle.nvim": { "branch": "main", "commit": "66bfa2b1c28fd71bb8ae4e871e0cd9e9c509ea86" },
|
|
||||||
"tagbar": { "branch": "master", "commit": "7bfffca1f121afb7a9e38747500bf5270e006bb1" },
|
|
||||||
"telescope-dap.nvim": { "branch": "master", "commit": "783366bd6c1e7fa0a5c59c07db37f49c805a28df" },
|
|
||||||
"telescope.nvim": { "branch": "master", "commit": "3d757e586ff0bfc85bdb7b46c9d3d932147a0cde" },
|
|
||||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
|
||||||
"vim-fish": { "branch": "master", "commit": "50b95cbbcd09c046121367d49039710e9dc9c15f" },
|
|
||||||
"vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" },
|
|
||||||
"vim-signify": { "branch": "master", "commit": "9ec7989ef5f92c5073de26abb46fc6a998b75ef8" },
|
|
||||||
"vim-test": { "branch": "master", "commit": "1eeb12774a0f251571700ccf68da27789b2f0852" }
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, {
|
|
||||||
group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
|
|
||||||
callback = function()
|
|
||||||
-- Folding code method
|
|
||||||
-- vim.opt.foldmethod = 'expr'
|
|
||||||
|
|
||||||
-- Expression for folding code
|
|
||||||
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
|
|
||||||
end
|
|
||||||
})
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- Quick compilation with GCC and running
|
|
||||||
vim.keymap.set('n', 'co', '<cmd>:!gcc -o test % && ./test', {noremap = true})
|
|
||||||
@@ -1,3 +1,51 @@
|
|||||||
|
--[[ nvim-neo-tree/neo-tree ]]
|
||||||
|
-- Открыть интерфейс с древовидным отображением файлов
|
||||||
|
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f1>', '<cmd>NeoTreeRevealToggle<cr>', { noremap = true })
|
||||||
|
|
||||||
|
|
||||||
|
-- [[ folke/trouble.nvim ]]
|
||||||
|
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f2>', '<cmd>TroubleToggle<cr>', { noremap = true })
|
||||||
|
|
||||||
|
|
||||||
|
--[[ onsails/diaglist.nvim ]]
|
||||||
|
-- Открыть интерфейс диагностики
|
||||||
|
vim.keymap.set('n', '<space>dw', '<cmd>lua require(\'diaglist\').open_all_diagnostics()<cr>', { noremap = true })
|
||||||
|
vim.keymap.set('n', '<space>d0', '<cmd>lua require(\'diaglist\').open_buffer_diagnostics()<cr>', { noremap = true })
|
||||||
|
|
||||||
|
|
||||||
|
--[[ noib3/nvim-cokeline ]]
|
||||||
|
-- Переключение вкладок
|
||||||
|
vim.keymap.set('n', '<tab>', '<plug>(cokeline-focus-next)', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('n', '<s-tab>', '<Plug>(cokeline-focus-prev)', { noremap = true, silent = true })
|
||||||
|
|
||||||
|
|
||||||
|
--[[ neovim/nvim-lspconfig ]]
|
||||||
|
-- Диагностика
|
||||||
|
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Инициализация только после того, как LSP-сервер подключится к текущему буферу
|
||||||
|
lspconfig_on_attach = function(client, bufnr)
|
||||||
|
-- Активация завершения
|
||||||
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', 'K', vim.lsp.buf.hover, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<c-k>', vim.lsp.buf.signature_help, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<space>wl', function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end,
|
||||||
|
{ noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
vim.keymap.set('n', 'gr', vim.lsp.buf.references, { noremap = true, silent = true, buffer = bufnr })
|
||||||
|
end
|
||||||
|
|
||||||
-- Formatting
|
-- Formatting
|
||||||
vim.keymap.set({ 'n', 'v', 't' }, 'F', function()
|
vim.keymap.set({ 'n', 'v', 't' }, 'F', function()
|
||||||
if (vim.bo.filetype == 'nginx') then
|
if (vim.bo.filetype == 'nginx') then
|
||||||
@@ -6,78 +54,112 @@ vim.keymap.set({ 'n', 'v', 't' }, 'F', function()
|
|||||||
vim.api.nvim_exec('w', false)
|
vim.api.nvim_exec('w', false)
|
||||||
vim.api.nvim_exec('! nginxbeautifier -i %', false)
|
vim.api.nvim_exec('! nginxbeautifier -i %', false)
|
||||||
vim.api.nvim_exec('redraw', false)
|
vim.api.nvim_exec('redraw', false)
|
||||||
elseif (not (vim.diff(vim.inspect(vim.lsp.buf_get_clients()), '{}') == '')) then
|
elseif (vim.lsp.buf.server_ready()) then
|
||||||
-- LSP-server clients is ready
|
-- LSP-server is ready
|
||||||
|
|
||||||
vim.lsp.buf.format { async = true }
|
vim.lsp.buf.format { async = true }
|
||||||
else
|
else
|
||||||
-- LSP-server clients not found
|
-- LSP-server not found
|
||||||
|
|
||||||
-- vim.api.nvim_exec('PrettierAsync', false)
|
vim.api.nvim_exec('PrettierAsync', false)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
{ noremap = true, silent = true, buffer = bufnr }
|
{ noremap = true, silent = true, buffer = bufnr })
|
||||||
)
|
|
||||||
|
|
||||||
--[[ lewis6991/gitsigns.nvim ]]
|
--[[ lewis6991/gitsigns.nvim ]]
|
||||||
-- Инициализация только после того, как LSP-сервер подключится к текущему буферу
|
-- Инициализация только после того, как LSP-сервер подключится к текущему буферу
|
||||||
-- gitsigns_on_attach = function(bufnr)
|
gitsigns_on_attach = function(bufnr)
|
||||||
-- -- Инициализация ярлыка
|
-- Инициализация ярлыка
|
||||||
-- local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
--
|
|
||||||
-- -- Навигация
|
|
||||||
-- vim.keymap.set('n', ']c', function()
|
|
||||||
-- if vim.wo.diff then return ']c' end
|
|
||||||
-- vim.schedule(function() gs.next_hunk() end)
|
|
||||||
-- return '<Ignore>'
|
|
||||||
-- end, { expr = true, buffer = bufnr })
|
|
||||||
--
|
|
||||||
-- -- Навигация
|
|
||||||
-- vim.keymap.set('n', '[c', function()
|
|
||||||
-- if vim.wo.diff then return '[c' end
|
|
||||||
-- vim.schedule(function() gs.prev_hunk() end)
|
|
||||||
-- return '<Ignore>'
|
|
||||||
-- end, { expr = true, buffer = bufnr })
|
|
||||||
--
|
|
||||||
-- vim.keymap.set('n', '<leader>hs', '<cmd>Gitsigns stage_hunk<cr>', { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('v', '<leader>hs', '<cmd>Gitsigns stage_hunk<cr>', { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hr', '<cmd>Gitsigns reset_hunk<cr>', { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('v', '<leader>hr', '<cmd>Gitsigns reset_hunk<cr>', { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hS', gs.stage_buffer, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hu', gs.undo_stage_hunk, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hR', gs.reset_buffer, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hp', gs.preview_hunk, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hb', function() gs.blame_line { full = true } end, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>tb', gs.toggle_current_line_blame, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hd', gs.diffthis, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>hD', function() gs.diffthis('~') end, { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('n', '<leader>td', gs.toggle_deleted, { buffer = bufnr })
|
|
||||||
--
|
|
||||||
-- vim.keymap.set('o', 'ih', '<cmd><c-U>Gitsigns select_hunk<cr>', { buffer = bufnr })
|
|
||||||
-- vim.keymap.set('x', 'ih', '<cmd><c-U>Gitsigns select_hunk<cr>', { buffer = bufnr })
|
|
||||||
-- end
|
|
||||||
|
|
||||||
--[[ mfussenegger/nvim-dap ]]
|
-- Навигация
|
||||||
vim.keymap.set('n', '<F5>', function() require('dap').continue() end)
|
vim.keymap.set('n', ']c', function()
|
||||||
vim.keymap.set('n', '<F10>', function() require('dap').step_over() end)
|
if vim.wo.diff then return ']c' end
|
||||||
vim.keymap.set('n', '<F11>', function() require('dap').step_into() end)
|
vim.schedule(function() gs.next_hunk() end)
|
||||||
vim.keymap.set('n', '<F12>', function() require('dap').step_out() end)
|
return '<Ignore>'
|
||||||
vim.keymap.set('n', '<Leader>b', function() require('dap').toggle_breakpoint() end)
|
end, { expr = true, buffer = bufnr })
|
||||||
vim.keymap.set('n', '<Leader>B', function() require('dap').set_breakpoint() end)
|
|
||||||
vim.keymap.set('n', '<Leader>lp', function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end)
|
-- Навигация
|
||||||
vim.keymap.set('n', '<Leader>dr', function() require('dap').repl.open() end)
|
vim.keymap.set('n', '[c', function()
|
||||||
vim.keymap.set('n', '<Leader>dl', function() require('dap').run_last() end)
|
if vim.wo.diff then return '[c' end
|
||||||
vim.keymap.set({'n', 'v'}, '<Leader>dh', function()
|
vim.schedule(function() gs.prev_hunk() end)
|
||||||
require('dap.ui.widgets').hover()
|
return '<Ignore>'
|
||||||
end)
|
end, { expr = true, buffer = bufnr })
|
||||||
vim.keymap.set({'n', 'v'}, '<Leader>dp', function()
|
|
||||||
require('dap.ui.widgets').preview()
|
vim.keymap.set('n', '<leader>hs', '<cmd>Gitsigns stage_hunk<cr>', { buffer = bufnr })
|
||||||
end)
|
vim.keymap.set('v', '<leader>hs', '<cmd>Gitsigns stage_hunk<cr>', { buffer = bufnr })
|
||||||
vim.keymap.set('n', '<Leader>df', function()
|
vim.keymap.set('n', '<leader>hr', '<cmd>Gitsigns reset_hunk<cr>', { buffer = bufnr })
|
||||||
local widgets = require('dap.ui.widgets')
|
vim.keymap.set('v', '<leader>hr', '<cmd>Gitsigns reset_hunk<cr>', { buffer = bufnr })
|
||||||
widgets.centered_float(widgets.frames)
|
vim.keymap.set('n', '<leader>hS', gs.stage_buffer, { buffer = bufnr })
|
||||||
end)
|
vim.keymap.set('n', '<leader>hu', gs.undo_stage_hunk, { buffer = bufnr })
|
||||||
vim.keymap.set('n', '<Leader>ds', function()
|
vim.keymap.set('n', '<leader>hR', gs.reset_buffer, { buffer = bufnr })
|
||||||
local widgets = require('dap.ui.widgets')
|
vim.keymap.set('n', '<leader>hp', gs.preview_hunk, { buffer = bufnr })
|
||||||
widgets.centered_float(widgets.scopes)
|
vim.keymap.set('n', '<leader>hb', function() gs.blame_line { full = true } end, { buffer = bufnr })
|
||||||
end)
|
vim.keymap.set('n', '<leader>tb', gs.toggle_current_line_blame, { buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<leader>hd', gs.diffthis, { buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<leader>hD', function() gs.diffthis('~') end, { buffer = bufnr })
|
||||||
|
vim.keymap.set('n', '<leader>td', gs.toggle_deleted, { buffer = bufnr })
|
||||||
|
|
||||||
|
vim.keymap.set('o', 'ih', '<cmd><c-U>Gitsigns select_hunk<cr>', { buffer = bufnr })
|
||||||
|
vim.keymap.set('x', 'ih', '<cmd><c-U>Gitsigns select_hunk<cr>', { buffer = bufnr })
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--[[ nvim-telescope/telescope.nvim ]]
|
||||||
|
-- Инициализация ярлыка
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
|
-- Поиск файла
|
||||||
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- grep
|
||||||
|
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Буферы?
|
||||||
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, { noremap = true, silent = true })
|
||||||
|
|
||||||
|
-- Помощь
|
||||||
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { noremap = true, silent = true })
|
||||||
|
|
||||||
|
|
||||||
|
--[[ windwp/nvim-autopairs ]]
|
||||||
|
-- Переназначение стандартных сочетаний клавиш для "ms-jpq/coq_nvim"
|
||||||
|
--vim.keymap.set('i', '<esc>', [[pumvisible() ? "<c-e><esc>" : "<esc>"]], {expr = true, noremap = true})
|
||||||
|
--vim.keymap.set('i', '<c-c>', [[pumvisible() ? "<c-e><c-c>" : "<c-c>"]], {expr = true, noremap = true})
|
||||||
|
--vim.keymap.set('i', '<tab>', [[pumvisible() ? "<c-n>" : "<tab>"]], {expr = true, noremap = true})
|
||||||
|
--vim.keymap.set('i', '<s-tab>', [[pumvisible() ? "<c-p>" : "<tab>"]], {expr = true, noremap = true})
|
||||||
|
|
||||||
|
_G.PairIT = function()
|
||||||
|
local autopairs = {
|
||||||
|
['('] = ')',
|
||||||
|
['['] = ']',
|
||||||
|
['{'] = '}',
|
||||||
|
['<'] = '>',
|
||||||
|
[ [=[']=] ] = [=[']=],
|
||||||
|
[ [=["]=] ] = [=["]=],
|
||||||
|
}
|
||||||
|
local set_pairs = vim.keymap.set
|
||||||
|
for k, v in pairs(autopairs) do
|
||||||
|
set_pairs('i', k, function()
|
||||||
|
return k .. v .. '<Left>'
|
||||||
|
end, { expr = true, noremap = true })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--[[ b3nj5m1n/kommentary ]]
|
||||||
|
vim.keymap.set('n', '<leader>cic', '<Plug>kommentary_line_increase', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('n', '<leader>ci', '<Plug>kommentary_motion_increase', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('x', '<leader>ci', '<Plug>kommentary_visual_increase', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('n', '<leader>cdc', '<Plug>kommentary_line_decrease', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('n', '<leader>cd', '<Plug>kommentary_motion_decrease', { noremap = true, silent = true })
|
||||||
|
vim.keymap.set('x', '<leader>cd', '<Plug>kommentary_visual_decrease', { noremap = true, silent = true })
|
||||||
|
|
||||||
|
|
||||||
|
--[[ preservim/tagbar ]]
|
||||||
|
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f8>', '<cmd>TagbarToggle<cr>', { noremap = true, silent = true })
|
||||||
|
|
||||||
|
|
||||||
|
--[[ simrat39/symbols-outline.nvim ]]
|
||||||
|
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f7>', '<cmd>SymbolsOutline<cr>', { noremap = true, silent = true })
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
-- Offset
|
-- Выход из режима "ВСТАВКА" (insert)
|
||||||
vim.keymap.set({'i', 'v', 't'}, '<tab>', '>', {noremap = true, silent = true})
|
vim.keymap.set('i', '<C-i>', '<escape>', {noremap = true, silent = true})
|
||||||
vim.keymap.set({'i', 'v', 't'}, '<s-tab>', '<', {noremap = true, silent = true})
|
|
||||||
|
|
||||||
-- Disabling arrows
|
-- Быстрый сдвиг текста в режиме 'ВСТАВКА' (insert)
|
||||||
|
-- (надо будет проработать в визуальном режиме на множество строк)
|
||||||
|
vim.keymap.set({'i', 'v', 't'}, '<tab>', '<cmd>><cr>', {noremap = true, silent = true})
|
||||||
|
vim.keymap.set({'i', 'v', 't'}, '<s-tab>', '<cmd><<cr>', {noremap = true, silent = true})
|
||||||
|
|
||||||
|
-- Отключение стрелок
|
||||||
vim.keymap.set({'n', 'i', 'v', 't'}, '<left>', '', {noremap = true, silent = true})
|
vim.keymap.set({'n', 'i', 'v', 't'}, '<left>', '', {noremap = true, silent = true})
|
||||||
vim.keymap.set({'n', 'i', 'v', 't'}, '<up>', '', {noremap = true, silent = true})
|
vim.keymap.set({'n', 'i', 'v', 't'}, '<up>', '', {noremap = true, silent = true})
|
||||||
vim.keymap.set({'n', 'i', 'v', 't'}, '<right>', '', {noremap = true, silent = true})
|
vim.keymap.set({'n', 'i', 'v', 't'}, '<right>', '', {noremap = true, silent = true})
|
||||||
@@ -15,3 +19,6 @@ vim.keymap.set({'n', 'i', 'v', 't'}, '<c-left>', '', {noremap = true, silent = t
|
|||||||
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-up>', '', {noremap = true, silent = true})
|
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-up>', '', {noremap = true, silent = true})
|
||||||
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-right>', '', {noremap = true, silent = true})
|
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-right>', '', {noremap = true, silent = true})
|
||||||
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-down>', '', {noremap = true, silent = true})
|
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-down>', '', {noremap = true, silent = true})
|
||||||
|
|
||||||
|
-- Быстрое форматирование всего документа
|
||||||
|
vim.keymap.set({'n', 'v', 't'}, '<space>F', '1GVG=<cr>', {noremap = true, silent = true})
|
||||||
|
|||||||
@@ -1,12 +1,4 @@
|
|||||||
-- A super powerful autopair plugin for Neovim that supports multiple characters
|
require('nvim-autopairs').setup({
|
||||||
return {
|
map_bs = false,
|
||||||
'windwp/nvim-autopairs',
|
map_cr = false
|
||||||
enabled = true,
|
})
|
||||||
lazy = true,
|
|
||||||
event = 'InsertEnter',
|
|
||||||
opts = {
|
|
||||||
-- map_bs = false,
|
|
||||||
-- map_cr = false
|
|
||||||
},
|
|
||||||
config = true
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,72 +1,2 @@
|
|||||||
-- A snazzy 💅 buffer line (with tabpage integration) for Neovim built using lua
|
require('bufferline').setup({
|
||||||
return {
|
})
|
||||||
'akinsho/bufferline.nvim',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
event = 'BufReadPre',
|
|
||||||
keys = {
|
|
||||||
{ '<tab>', '<cmd>BufferLineCycleNext<cr>', mode = { 'n' }, desc = 'Move to the next tab', noremap = true, silent = true },
|
|
||||||
{ '<s-tab>', '<cmd>BufferLineCyclePrev<cr>', mode = { 'n' }, desc = 'Move to the previous tab', noremap = true, silent = true },
|
|
||||||
{ '<leader><tab>', '<cmd>lua require("bufferline").go_to(vim.fn.input("Enter tab number: "), true)<cr>', mode = { 'n' }, desc = 'Move to the tab', noremap = true, silent = true },
|
|
||||||
},
|
|
||||||
version = '*',
|
|
||||||
dependencies = {
|
|
||||||
--
|
|
||||||
{ 'nvim-tree/nvim-web-devicons' }
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
options = {
|
|
||||||
themable = true,
|
|
||||||
numbers = 'ordinal',
|
|
||||||
-- close_command = 'bdelete! %d',
|
|
||||||
-- right_mouse_command = 'bdelete! %d',
|
|
||||||
-- left_mouse_command = 'buffer %d',
|
|
||||||
-- middle_mouse_command = nil,
|
|
||||||
indicator = {
|
|
||||||
icon = '▎',
|
|
||||||
style = 'icon',
|
|
||||||
},
|
|
||||||
max_name_length = 24,
|
|
||||||
max_prefix_length = 18,
|
|
||||||
truncate_names = true,
|
|
||||||
tab_size = 18,
|
|
||||||
diagnostics = 'nvim_lsp',
|
|
||||||
offsets = {
|
|
||||||
{
|
|
||||||
filetype = 'NvimTree',
|
|
||||||
text = 'File Explorer',
|
|
||||||
text_align = 'left',
|
|
||||||
separator = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
color_icons = true,
|
|
||||||
show_buffer_icons = true,
|
|
||||||
show_buffer_close_icons = true,
|
|
||||||
show_close_icon = true,
|
|
||||||
show_tab_indicators = true,
|
|
||||||
show_duplicate_prefix = true,
|
|
||||||
duplicates_across_groups = true,
|
|
||||||
persist_buffer_sort = true,
|
|
||||||
move_wraps_at_ends = false,
|
|
||||||
-- separator_style = 'slant' | 'slope' | 'thick' | 'thin' | { 'any', 'any' },
|
|
||||||
separator_style = 'default',
|
|
||||||
enforce_regular_tabs = false,
|
|
||||||
always_show_bufferline = true,
|
|
||||||
auto_toggle_bufferline = true,
|
|
||||||
hover = {
|
|
||||||
enabled = true,
|
|
||||||
delay = 200,
|
|
||||||
reveal = {'close'}
|
|
||||||
},
|
|
||||||
--[[ sort_by = 'insert_after_current' |'insert_at_end' | 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b)
|
|
||||||
local modified_a = vim.fn.getftime(buffer_a.path)
|
|
||||||
local modified_b = vim.fn.getftime(buffer_b.path)
|
|
||||||
return modified_a > modified_b
|
|
||||||
end, ]]
|
|
||||||
sort_by = 'insert_after_current',
|
|
||||||
pick = {
|
|
||||||
alphabet = 'abcdefghijklmopqrstuvwxyzABCDEFGHIJKLMOPQRSTUVWXYZ1234567890',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,23 +1,4 @@
|
|||||||
-- Fast as FUCK nvim completion
|
-- Настройка "ms-jpq/coq_nvim"
|
||||||
return {
|
vim.g.coq_settings = {
|
||||||
'ms-jpq/coq_nvim',
|
auto_start = 'shut-up'
|
||||||
enabled = true,
|
|
||||||
lazy = false,
|
|
||||||
priority = 30,
|
|
||||||
branch = 'coq',
|
|
||||||
dependencies = {
|
|
||||||
-- Quickstart configs for Nvim LSP
|
|
||||||
{ 'neovim/nvim-lspconfig' },
|
|
||||||
|
|
||||||
-- 9000+ Snippets
|
|
||||||
{ 'ms-jpq/coq.artifacts', branch = 'artifacts' },
|
|
||||||
|
|
||||||
-- Lua & third party sources. Need to **configure separately**
|
|
||||||
{ 'ms-jpq/coq.thirdparty', branch = '3p' }
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.g.coq_settings = {
|
|
||||||
auto_start = 'shut-up',
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
-- Virtual text support to nvim-dap
|
|
||||||
return {
|
|
||||||
'theHamsta/nvim-dap-virtual-text',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
dependencies = {
|
|
||||||
-- Debug Adapter Protocol client implementation for Neovim
|
|
||||||
{ 'mfussenegger/nvim-dap' },
|
|
||||||
|
|
||||||
-- Nvim Treesitter configurations and abstraction layer
|
|
||||||
{ 'nvim-treesitter/nvim-treesitter' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
-- A UI for nvim-dap
|
|
||||||
return {
|
|
||||||
'rcarriga/nvim-dap-ui',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
dependencies = {
|
|
||||||
-- Debug Adapter Protocol client implementation for Neovim
|
|
||||||
'mfussenegger/nvim-dap',
|
|
||||||
|
|
||||||
-- A library for asynchronous IO in Neovim
|
|
||||||
'nvim-neotest/nvim-nio'
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local dap, dapui = require('dap'), require('dapui')
|
|
||||||
|
|
||||||
dap.listeners.before.attach.dapui_config = function()
|
|
||||||
dapui.open()
|
|
||||||
end
|
|
||||||
|
|
||||||
dap.listeners.before.launch.dapui_config = function()
|
|
||||||
dapui.open()
|
|
||||||
end
|
|
||||||
|
|
||||||
dap.listeners.before.event_terminated.dapui_config = function()
|
|
||||||
dapui.close()
|
|
||||||
end
|
|
||||||
|
|
||||||
dap.listeners.before.event_exited.dapui_config = function()
|
|
||||||
dapui.close()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,29 +1,2 @@
|
|||||||
-- Debug Adapter Protocol client implementation for Neovim
|
require('dap').configurations.cpp = {
|
||||||
return {
|
|
||||||
'mfussenegger/nvim-dap',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
config = function()
|
|
||||||
local dap = require('dap')
|
|
||||||
|
|
||||||
-- Installing debuggers for C, Rust and C++
|
|
||||||
dap.configurations.cpp = {}
|
|
||||||
|
|
||||||
-- Initializing PHP debugger adapter
|
|
||||||
dap.adapters.php = {
|
|
||||||
type = 'executable',
|
|
||||||
command = 'node',
|
|
||||||
args = { os.getenv('HOME') .. '/vscode-php-debug/out/phpDebug.js' }
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Installing PHP debugger
|
|
||||||
dap.configurations.php = {
|
|
||||||
{
|
|
||||||
type = 'php',
|
|
||||||
request = 'launch',
|
|
||||||
name = 'Listen for Xdebug',
|
|
||||||
port = 9003
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
-- Live render workspace diagnostics in quickfix with
|
require('diaglist').init({
|
||||||
-- current buf errors on top, buffer diagnostics in loclist
|
-- below are defaults
|
||||||
-- @todo удалить и заменить на трабл
|
debug = false,
|
||||||
return {
|
|
||||||
'onsails/diaglist.nvim',
|
-- increase for noisy servers
|
||||||
enabled = false,
|
debounce_ms = 150,
|
||||||
lazy = true,
|
})
|
||||||
keys = {
|
|
||||||
{ '<leader><f3>', '<cmd>lua require(\'diaglist\').open_all_diagnostics()<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Open all diagnostics (diaglist)', noremap = true, silent = true },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
debug = false,
|
|
||||||
debounce_ms = 150
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
--[[ -- Форматировщик Prettier
|
|
||||||
use {
|
|
||||||
'prettier/vim-prettier',
|
|
||||||
branch = 'master',
|
|
||||||
-- run = 'sudo npm i -g',
|
|
||||||
run = 'yarn install --frozen-lockfile --production'
|
|
||||||
} ]]
|
|
||||||
@@ -1,7 +1,95 @@
|
|||||||
-- 💫 Extensible UI for Neovim notifications and LSP progress messages
|
require('fidget').setup({
|
||||||
return {
|
-- Options related to LSP progress subsystem
|
||||||
'j-hui/fidget.nvim',
|
progress = {
|
||||||
enabled = true,
|
poll_rate = 0, -- How and when to poll for progress messages
|
||||||
lazy = true,
|
suppress_on_insert = false, -- Suppress new messages while in insert mode
|
||||||
opts = {}
|
ignore_done_already = false, -- Ignore new tasks that are already complete
|
||||||
}
|
ignore_empty_message = false, -- Ignore new tasks that don't contain a message
|
||||||
|
clear_on_detach = -- Clear notification group when LSP server detaches
|
||||||
|
function(client_id)
|
||||||
|
local client = vim.lsp.get_client_by_id(client_id)
|
||||||
|
return client and client.name or nil
|
||||||
|
end,
|
||||||
|
notification_group = -- How to get a progress message's notification group key
|
||||||
|
function(msg) return msg.lsp_client.name end,
|
||||||
|
ignore = {}, -- List of LSP servers to ignore
|
||||||
|
-- Options related to how LSP progress messages are displayed as notifications
|
||||||
|
display = {
|
||||||
|
render_limit = 16, -- How many LSP messages to show at once
|
||||||
|
done_ttl = 3, -- How long a message should persist after completion
|
||||||
|
done_icon = "✔", -- Icon shown when all LSP progress tasks are complete
|
||||||
|
done_style = "Constant", -- Highlight group for completed LSP tasks
|
||||||
|
progress_ttl = math.huge, -- How long a message should persist when in progress
|
||||||
|
progress_icon = -- Icon shown when LSP progress tasks are in progress
|
||||||
|
{ pattern = "dots", period = 1 },
|
||||||
|
progress_style = -- Highlight group for in-progress LSP tasks
|
||||||
|
"WarningMsg",
|
||||||
|
group_style = "Title", -- Highlight group for group name (LSP server name)
|
||||||
|
icon_style = "Question", -- Highlight group for group icons
|
||||||
|
priority = 30, -- Ordering priority for LSP notification group
|
||||||
|
skip_history = true, -- Whether progress notifications should be omitted from history
|
||||||
|
format_message = -- How to format a progress message
|
||||||
|
require("fidget.progress.display").default_format_message,
|
||||||
|
format_annote = -- How to format a progress annotation
|
||||||
|
function(msg) return msg.title end,
|
||||||
|
format_group_name = -- How to format a progress notification group's name
|
||||||
|
function(group) return tostring(group) end,
|
||||||
|
overrides = { -- Override options from the default notification config
|
||||||
|
rust_analyzer = { name = "rust-analyzer" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Options related to Neovim's built-in LSP client
|
||||||
|
lsp = {
|
||||||
|
progress_ringbuf_size = 0, -- Configure the nvim's LSP progress ring buffer size
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Options related to notification subsystem
|
||||||
|
notification = {
|
||||||
|
poll_rate = 10, -- How frequently to update and render notifications
|
||||||
|
filter = vim.log.levels.INFO, -- Minimum notifications level
|
||||||
|
history_size = 128, -- Number of removed messages to retain in history
|
||||||
|
override_vim_notify = false, -- Automatically override vim.notify() with Fidget
|
||||||
|
configs = -- How to configure notification groups when instantiated
|
||||||
|
{ default = require("fidget.notification").default_config },
|
||||||
|
redirect = -- Conditionally redirect notifications to another backend
|
||||||
|
function(msg, level, opts)
|
||||||
|
if opts and opts.on_open then
|
||||||
|
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
-- Options related to how notifications are rendered as text
|
||||||
|
view = {
|
||||||
|
stack_upwards = true, -- Display notification items from bottom to top
|
||||||
|
icon_separator = " ", -- Separator between group name and icon
|
||||||
|
group_separator = "---", -- Separator between notification groups
|
||||||
|
group_separator_hl = -- Highlight group used for group separator
|
||||||
|
"Comment",
|
||||||
|
},
|
||||||
|
-- Options related to the notification window and buffer
|
||||||
|
window = {
|
||||||
|
normal_hl = "Comment", -- Base highlight group in the notification window
|
||||||
|
winblend = 100, -- Background color opacity in the notification window
|
||||||
|
border = "none", -- Border around the notification window
|
||||||
|
zindex = 45, -- Stacking priority of the notification window
|
||||||
|
max_width = 0, -- Maximum width of the notification window
|
||||||
|
max_height = 0, -- Maximum height of the notification window
|
||||||
|
x_padding = 1, -- Padding from right edge of window boundary
|
||||||
|
y_padding = 0, -- Padding from bottom edge of window boundary
|
||||||
|
align = "bottom", -- How to align the notification window
|
||||||
|
relative = "editor", -- What the notification window position is relative to
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Options related to integrating with other plugins
|
||||||
|
integration = {
|
||||||
|
["nvim-tree"] = {
|
||||||
|
enable = true, -- Integrate with nvim-tree/nvim-tree.lua (if installed)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- Options related to logging
|
||||||
|
logger = {
|
||||||
|
level = vim.log.levels.WARN, -- Minimum logging level
|
||||||
|
float_precision = 0.01, -- Limit the number of decimals displayed for floats
|
||||||
|
path = -- Where Fidget writes its logs to
|
||||||
|
string.format("%s/fidget.nvim.log", vim.fn.stdpath("cache")),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
-- Inky color scheme
|
|
||||||
-- todo навести порядок
|
|
||||||
return {
|
|
||||||
'nuvic/flexoki-nvim',
|
|
||||||
enabled = true,
|
|
||||||
lazy = false,
|
|
||||||
priority = 100,
|
|
||||||
name = 'flexoki',
|
|
||||||
opts = {
|
|
||||||
variant = 'auto', -- auto, moon, or dawn
|
|
||||||
dim_inactive_windows = false,
|
|
||||||
extend_background_behind_borders = true,
|
|
||||||
|
|
||||||
enable = {
|
|
||||||
terminal = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
styles = {
|
|
||||||
bold = true,
|
|
||||||
italic = false,
|
|
||||||
},
|
|
||||||
|
|
||||||
groups = {
|
|
||||||
border = 'muted',
|
|
||||||
link = 'purple_two',
|
|
||||||
panel = 'surface',
|
|
||||||
|
|
||||||
error = 'red_one',
|
|
||||||
hint = 'purple_one',
|
|
||||||
info = 'cyan_one',
|
|
||||||
ok = 'green_one',
|
|
||||||
warn = 'orange_one',
|
|
||||||
note = 'blue_one',
|
|
||||||
todo = 'magenta_one',
|
|
||||||
|
|
||||||
git_add = 'green_one',
|
|
||||||
git_change = 'yellow_one',
|
|
||||||
git_delete = 'red_one',
|
|
||||||
git_dirty = 'yellow_one',
|
|
||||||
git_ignore = 'muted',
|
|
||||||
git_merge = 'purple_one',
|
|
||||||
git_rename = 'blue_one',
|
|
||||||
git_stage = 'purple_one',
|
|
||||||
git_text = 'magenta_one',
|
|
||||||
git_untracked = 'subtle',
|
|
||||||
|
|
||||||
h1 = 'purple_two',
|
|
||||||
h2 = 'cyan_two',
|
|
||||||
h3 = 'magenta_two',
|
|
||||||
h4 = 'orange_two',
|
|
||||||
h5 = 'blue_two',
|
|
||||||
h6 = 'cyan_two',
|
|
||||||
},
|
|
||||||
|
|
||||||
palette = {
|
|
||||||
-- Override the builtin palette per variant
|
|
||||||
-- moon = {
|
|
||||||
-- base = '#100f0f',
|
|
||||||
-- overlay = '#1c1b1a',
|
|
||||||
-- },
|
|
||||||
},
|
|
||||||
|
|
||||||
highlight_groups = {
|
|
||||||
-- Comment = { fg = 'subtle' },
|
|
||||||
-- VertSplit = { fg = 'muted', bg = 'muted' },
|
|
||||||
},
|
|
||||||
|
|
||||||
before_highlight = function(group, highlight, palette)
|
|
||||||
-- Disable all undercurls
|
|
||||||
-- if highlight.undercurl then
|
|
||||||
-- highlight.undercurl = false
|
|
||||||
-- end
|
|
||||||
--
|
|
||||||
-- Change palette colour
|
|
||||||
-- if highlight.fg == palette.blue_two then
|
|
||||||
-- highlight.fg = palette.cyan_two
|
|
||||||
-- end
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- Activating
|
|
||||||
vim.cmd('colorscheme flexoki')
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,11 +1,5 @@
|
|||||||
-- Git integration for buffers
|
require('gitsigns').setup {
|
||||||
-- todo навести порядок
|
on_attach = gitsigns_on_attach,
|
||||||
return {
|
|
||||||
'lewis6991/gitsigns.nvim',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
opts = {
|
|
||||||
on_attach = gitsigns_on_attach,
|
|
||||||
signs = {
|
signs = {
|
||||||
add = { text = '│' },
|
add = { text = '│' },
|
||||||
change = { text = '│' },
|
change = { text = '│' },
|
||||||
@@ -43,9 +37,7 @@ return {
|
|||||||
row = 0,
|
row = 0,
|
||||||
col = 1
|
col = 1
|
||||||
},
|
},
|
||||||
--[[ yadm = {
|
yadm = {
|
||||||
enable = false
|
enable = false
|
||||||
}, ]]
|
},
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
-- Neovim commenting plugin, written in lua
|
|
||||||
return {
|
|
||||||
'b3nj5m1n/kommentary',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
keys = {
|
|
||||||
{ 'gcc', '<Plug>kommentary_line_default', mode = 'n', desc = 'Comment', noremap = true, silent = true },
|
|
||||||
{ 'gc', '<Plug>kommentary_motion_default', mode = 'n', desc = 'Comment', noremap = true, silent = true },
|
|
||||||
{ 'gc', '<Plug>kommentary_visual_default<C-c>', mode = 'v', desc = 'Comment', noremap = true, silent = true },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.g.kommentary_create_default_mappings = false
|
|
||||||
end
|
|
||||||
}
|
|
||||||
@@ -1,14 +1,5 @@
|
|||||||
-- An asynchronous linter plugin for Neovim complementary
|
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
|
||||||
-- to the built-in Language Server Protocol support.
|
callback = function()
|
||||||
return {
|
require('lint').try_lint()
|
||||||
'mfussenegger/nvim-lint',
|
end,
|
||||||
enabled = true,
|
})
|
||||||
lazy = true,
|
|
||||||
config = function()
|
|
||||||
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
|
|
||||||
callback = function()
|
|
||||||
require('lint').try_lint()
|
|
||||||
end
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,48 +1,24 @@
|
|||||||
-- Quickstart configs for Nvim LSP
|
-- Инициализация "neovim/nvim-lspconfig"
|
||||||
return {
|
local lspconfig = require('lspconfig')
|
||||||
'neovim/nvim-lspconfig',
|
|
||||||
enabled = true,
|
|
||||||
lazy = false,
|
|
||||||
priority = 70,
|
|
||||||
dependencies = {
|
|
||||||
-- 🌈 Plugin that creates missing LSP diagnostics
|
|
||||||
-- highlight groups for color schemes that do not
|
|
||||||
-- yet support the Neovim 0.5 builtin LSP client
|
|
||||||
{ 'folke/lsp-colors.nvim' },
|
|
||||||
|
|
||||||
-- 9000+ Snippets
|
|
||||||
{ 'ms-jpq/coq.artifacts', branch = 'artifacts' },
|
|
||||||
|
|
||||||
-- Lua & third party sources. Need to **configure separately**
|
|
||||||
{ 'ms-jpq/coq.thirdparty', branch = '3p' }
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- @todo навести порядок
|
|
||||||
|
|
||||||
-- Активация вещания готовых набросков
|
-- Активация вещания готовых набросков
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||||
|
|
||||||
-- Инициализация 'ms-jpq/coq_nvim'
|
-- Инициализация "ms-jpq/coq_nvim"
|
||||||
local coq = require('coq')
|
local coq = require('coq')
|
||||||
|
|
||||||
-- Инициализация LSP-серверов
|
-- Инициализация LSP-серверов
|
||||||
|
|
||||||
-- Инициализация 'bmewburn/vscode-intelephense' (LSP-сервер для PHP)
|
-- Инициализация "bmewburn/vscode-intelephense" (LSP-сервер для PHP)
|
||||||
vim.lsp.config(
|
lspconfig.intelephense.setup({
|
||||||
'intelephense',
|
on_attach = lspconfig_on_attach,
|
||||||
{
|
coq.lsp_ensure_capabilities(),
|
||||||
on_attach = lspconfig_on_attach,
|
capabilities = capabilities
|
||||||
coq.lsp_ensure_capabilities(),
|
})
|
||||||
capabilities = capabilities
|
|
||||||
}
|
|
||||||
)
|
|
||||||
vim.lsp.enable('intelephense')
|
|
||||||
|
|
||||||
-- Инициализация 'hrsh7th/vscode-html-language-server' (LSP-сервер для HTML)
|
-- Инициализация "hrsh7th/vscode-html-language-server" (LSP-сервер для HTML)
|
||||||
vim.lsp.config(
|
lspconfig.html.setup({
|
||||||
'html',
|
|
||||||
{
|
|
||||||
init_options = {
|
init_options = {
|
||||||
configurationSection = { 'html' },
|
configurationSection = { 'html' },
|
||||||
embeddedLanguages = {
|
embeddedLanguages = {
|
||||||
@@ -54,18 +30,14 @@ vim.lsp.config(
|
|||||||
on_attach = lspconfig_on_attach,
|
on_attach = lspconfig_on_attach,
|
||||||
coq.lsp_ensure_capabilities(),
|
coq.lsp_ensure_capabilities(),
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
}
|
})
|
||||||
)
|
|
||||||
vim.lsp.enable('html')
|
|
||||||
|
|
||||||
-- Инициализация 'aca/emmet-ls' (LSP-сервер для HTML)
|
-- Инициализация "aca/emmet-ls" (LSP-сервер для HTML)
|
||||||
vim.lsp.config(
|
lspconfig.emmet_ls.setup({
|
||||||
'emmet_ls',
|
|
||||||
{
|
|
||||||
init_options = {
|
init_options = {
|
||||||
html = {
|
html = {
|
||||||
options = {
|
options = {
|
||||||
['bem.enabled'] = true,
|
["bem.enabled"] = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -73,12 +45,9 @@ vim.lsp.config(
|
|||||||
coq.lsp_ensure_capabilities(),
|
coq.lsp_ensure_capabilities(),
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
vim.lsp.enable('emmet_ls')
|
|
||||||
|
|
||||||
-- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для CSS)
|
-- Инициализация "hrsh7th/vscode-langservers-extracted" (LSP-сервер для CSS)
|
||||||
vim.lsp.config(
|
lspconfig.cssls.setup({
|
||||||
'cssls',
|
|
||||||
{
|
|
||||||
settings = {
|
settings = {
|
||||||
css = {
|
css = {
|
||||||
validate = true
|
validate = true
|
||||||
@@ -94,12 +63,9 @@ vim.lsp.config(
|
|||||||
coq.lsp_ensure_capabilities(),
|
coq.lsp_ensure_capabilities(),
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
vim.lsp.enable('cssls')
|
|
||||||
|
|
||||||
-- Инициализация 'antonk52/cssmodules-language-server' (LSP-сервер для JS, вспомогательный для CSS)
|
-- Инициализация "antonk52/cssmodules-language-server" (LSP-сервер для JS, вспомогательный для CSS)
|
||||||
vim.lsp.config(
|
lspconfig.cssmodules_ls.setup({
|
||||||
'cssmodules_ls',
|
|
||||||
{
|
|
||||||
init_options = {
|
init_options = {
|
||||||
camelCase = false,
|
camelCase = false,
|
||||||
},
|
},
|
||||||
@@ -107,12 +73,9 @@ vim.lsp.config(
|
|||||||
coq.lsp_ensure_capabilities(),
|
coq.lsp_ensure_capabilities(),
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
vim.lsp.enable('cssmodules_ls')
|
|
||||||
|
|
||||||
-- Инициализация 'denoland/deno' (LSP-сервер для JavaScript и PostScript)
|
-- Инициализация "denoland/deno" (LSP-сервер для JavaScript и PostScript)
|
||||||
vim.lsp.config(
|
lspconfig.denols.setup({
|
||||||
'denols',
|
|
||||||
{
|
|
||||||
init_options = {
|
init_options = {
|
||||||
enable = true,
|
enable = true,
|
||||||
unstable = false
|
unstable = false
|
||||||
@@ -121,22 +84,16 @@ vim.lsp.config(
|
|||||||
coq.lsp_ensure_capabilities(),
|
coq.lsp_ensure_capabilities(),
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
vim.lsp.enable('denols')
|
|
||||||
|
|
||||||
-- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для JSON)
|
-- Инициализация "hrsh7th/vscode-langservers-extracted" (LSP-сервер для JSON)
|
||||||
vim.lsp.config(
|
lspconfig.jsonls.setup({
|
||||||
'jsonls',
|
|
||||||
{
|
|
||||||
on_attach = lspconfig_on_attach,
|
on_attach = lspconfig_on_attach,
|
||||||
coq.lsp_ensure_capabilities(),
|
coq.lsp_ensure_capabilities(),
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
})
|
})
|
||||||
vim.lsp.enable('jsonls')
|
|
||||||
|
|
||||||
-- Инициализация 'luals/lua-language-server' (LSP-сервер для Lua)
|
-- Инициализация "luals/lua-language-server" (LSP-сервер для Lua)
|
||||||
vim.lsp.config(
|
lspconfig.lua_ls.setup({
|
||||||
'lua_ls',
|
|
||||||
{
|
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
@@ -149,7 +106,7 @@ vim.lsp.enable('jsonls')
|
|||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
-- Make the server aware of Neovim runtime files
|
-- Make the server aware of Neovim runtime files
|
||||||
library = vim.api.nvim_get_runtime_file('', true),
|
library = vim.api.nvim_get_runtime_file("", true),
|
||||||
},
|
},
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
telemetry = {
|
telemetry = {
|
||||||
@@ -159,9 +116,5 @@ vim.lsp.enable('jsonls')
|
|||||||
},
|
},
|
||||||
on_attach = lspconfig_on_attach,
|
on_attach = lspconfig_on_attach,
|
||||||
coq.lsp_ensure_capabilities(),
|
coq.lsp_ensure_capabilities(),
|
||||||
capabilities = capabilities
|
capabilities = capabilities
|
||||||
}
|
})
|
||||||
)
|
|
||||||
vim.lsp.enable('lua_ls')
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,10 +1,44 @@
|
|||||||
-- VSCode–style pictograms for Neovim completion items
|
require('lspkind').init({
|
||||||
return {
|
-- defines how annotations are shown
|
||||||
'onsails/lspkind-nvim',
|
-- default: symbol
|
||||||
enabled = true,
|
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol'
|
||||||
lazy = true,
|
mode = 'symbol_text',
|
||||||
opts = {
|
|
||||||
mode = 'symbol',
|
-- default symbol map
|
||||||
preset = 'default',
|
-- can be either 'default' (requires nerd-fonts font) or
|
||||||
}
|
-- 'codicons' for codicon preset (requires vscode-codicons font)
|
||||||
}
|
--
|
||||||
|
-- default: 'default'
|
||||||
|
preset = 'codicons',
|
||||||
|
|
||||||
|
-- override preset symbols
|
||||||
|
--
|
||||||
|
-- default: {}
|
||||||
|
symbol_map = {
|
||||||
|
Text = "",
|
||||||
|
Method = "",
|
||||||
|
Function = "",
|
||||||
|
Constructor = "",
|
||||||
|
Field = "ﰠ",
|
||||||
|
Variable = "",
|
||||||
|
Class = "ﴯ",
|
||||||
|
Interface = "",
|
||||||
|
Module = "",
|
||||||
|
Property = "ﰠ",
|
||||||
|
Unit = "塞",
|
||||||
|
Value = "",
|
||||||
|
Enum = "",
|
||||||
|
Keyword = "",
|
||||||
|
Snippet = "",
|
||||||
|
Color = "",
|
||||||
|
File = "",
|
||||||
|
Reference = "",
|
||||||
|
Folder = "",
|
||||||
|
EnumMember = "",
|
||||||
|
Constant = "",
|
||||||
|
Struct = "פּ",
|
||||||
|
Event = "",
|
||||||
|
Operator = "",
|
||||||
|
TypeParameter = ""
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|||||||
0
lua/plugins/lualine-lsp-progress.lua
Normal file
0
lua/plugins/lualine-lsp-progress.lua
Normal file
@@ -1,23 +1,6 @@
|
|||||||
-- A blazing fast and easy to configure
|
require('lualine').setup {
|
||||||
-- neovim statusline plugin written in pure lua
|
options = {
|
||||||
-- @todo навести порядок
|
icons_enabled = true,
|
||||||
return {
|
|
||||||
'nvim-lualine/lualine.nvim',
|
|
||||||
enabled = true,
|
|
||||||
lazy = false,
|
|
||||||
priority = 80,
|
|
||||||
dependencies = {
|
|
||||||
-- Provides Nerd Font icons (glyphs) for use by neovim plugins
|
|
||||||
{ 'nvim-tree/nvim-web-devicons' },
|
|
||||||
|
|
||||||
-- LSP Progress lualine componenet
|
|
||||||
{ 'arkav/lualine-lsp-progress' },
|
|
||||||
|
|
||||||
-- A Git wrapper so awesome, it should be illegal
|
|
||||||
{ 'tpope/vim-fugitive' }
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
icons_enabled = true,
|
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
component_separators = { left = '', right = ''},
|
component_separators = { left = '', right = ''},
|
||||||
section_separators = { left = '', right = ''},
|
section_separators = { left = '', right = ''},
|
||||||
@@ -27,30 +10,17 @@ return {
|
|||||||
},
|
},
|
||||||
ignore_focus = {},
|
ignore_focus = {},
|
||||||
always_divide_middle = true,
|
always_divide_middle = true,
|
||||||
always_show_tabline = true,
|
globalstatus = false,
|
||||||
globalstatus = true,
|
|
||||||
refresh = {
|
refresh = {
|
||||||
statusline = 1000,
|
statusline = 1000,
|
||||||
tabline = 1000,
|
tabline = 1000,
|
||||||
winbar = 1000,
|
winbar = 1000,
|
||||||
refresh_time = 16, -- ~60fps
|
|
||||||
events = {
|
|
||||||
'WinEnter',
|
|
||||||
'BufEnter',
|
|
||||||
'BufWritePost',
|
|
||||||
'SessionLoadPost',
|
|
||||||
'FileChangedShellPost',
|
|
||||||
'VimResized',
|
|
||||||
'Filetype',
|
|
||||||
'CursorMoved',
|
|
||||||
'CursorMovedI',
|
|
||||||
'ModeChanged',
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = {
|
lualine_a = {
|
||||||
'mode',
|
{
|
||||||
|
'mode',
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
icon = nil,
|
icon = nil,
|
||||||
separator = nil,
|
separator = nil,
|
||||||
@@ -60,11 +30,29 @@ return {
|
|||||||
padding = 1,
|
padding = 1,
|
||||||
fmt = nil,
|
fmt = nil,
|
||||||
on_click = nil,
|
on_click = nil,
|
||||||
},
|
}
|
||||||
lualine_b = {'branch', 'diff'},
|
},
|
||||||
|
lualine_b = {
|
||||||
|
'branch',
|
||||||
|
'diff',
|
||||||
|
{
|
||||||
|
'diagnostics',
|
||||||
|
sources = { 'coc' },
|
||||||
|
sections = { 'error', 'warn', 'info', 'hint' },
|
||||||
|
diagnostics_color = {
|
||||||
|
error = 'DiagnosticError',
|
||||||
|
warn = 'DiagnosticWarn',
|
||||||
|
info = 'DiagnosticInfo',
|
||||||
|
hint = 'DiagnosticHint',
|
||||||
|
},
|
||||||
|
symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'},
|
||||||
|
colored = true,
|
||||||
|
update_in_insert = false,
|
||||||
|
always_visible = false
|
||||||
|
}
|
||||||
|
},
|
||||||
lualine_c = {'filename', 'lsp_progress'},
|
lualine_c = {'filename', 'lsp_progress'},
|
||||||
lualine_x = { FugitiveStatusline, 'encoding', 'fileformat', 'filetype'},
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
||||||
-- lualine_x = { FugitiveHead, 'encoding', 'fileformat', 'filetype'},
|
|
||||||
lualine_y = {'progress'},
|
lualine_y = {'progress'},
|
||||||
lualine_z = {'location'}
|
lualine_z = {'location'}
|
||||||
},
|
},
|
||||||
@@ -79,27 +67,5 @@ return {
|
|||||||
tabline = {},
|
tabline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
inactive_winbar = {},
|
inactive_winbar = {},
|
||||||
extensions = {
|
extensions = {}
|
||||||
'lazy',
|
|
||||||
'nvim-dap-ui',
|
|
||||||
'trouble',
|
|
||||||
'neo-tree'
|
|
||||||
},
|
|
||||||
-- config = function()
|
|
||||||
-- local trouble = require("trouble")
|
|
||||||
-- local symbols = trouble.statusline({
|
|
||||||
-- mode = "lsp_document_symbols",
|
|
||||||
-- groups = {},
|
|
||||||
-- title = false,
|
|
||||||
-- filter = { range = true },
|
|
||||||
-- format = "{kind_icon}{symbol.name:Normal}",
|
|
||||||
-- -- The following line is needed to fix the background color
|
|
||||||
-- -- Set it to the lualine section you want to use
|
|
||||||
-- hl_group = "lualine_c_normal",
|
|
||||||
-- })
|
|
||||||
-- table.insert(opts.sections.lualine_c, {
|
|
||||||
-- symbols.get,
|
|
||||||
-- cond = symbols.has,
|
|
||||||
-- })
|
|
||||||
-- end
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
-- Create Neovim themes with real-time feedback, export anywhere
|
-- Инициализация плагина
|
||||||
return {
|
local lush = require('lush')
|
||||||
'rktjmp/lush.nvim',
|
|
||||||
enabled = true,
|
-- Инициализация ссылки на палитру
|
||||||
lazy = false,
|
local hsl = lush.hsl
|
||||||
priority = 100,
|
|
||||||
-- if you wish to use your own colorscheme:
|
-- Тема будет разработана позднее - не до неё сейчас
|
||||||
-- { dir = '/absolute/path/to/colorscheme', lazy = true },
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,29 +1,48 @@
|
|||||||
-- Neovim plugin to manage the file system
|
local highlights = require("neo-tree.ui.highlights")
|
||||||
-- and other tree like structures
|
|
||||||
return {
|
require('neo-tree').setup({
|
||||||
'nvim-neo-tree/neo-tree.nvim',
|
filesystem = {
|
||||||
enabled = true,
|
components = {
|
||||||
lazy = true,
|
--[[
|
||||||
keys = {
|
icon = function(config, node, state)
|
||||||
{ '<f1>', '<cmd>Neotree toggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'NeoTree toggle', noremap = true, silent = true },
|
local icon = config.default or ' '
|
||||||
},
|
local padding = config.padding or ' '
|
||||||
branch = 'v3.x',
|
local highlight = config.highlight or highlights.FILE_ICON
|
||||||
dependencies = {
|
|
||||||
-- Lua functions
|
if node.type == 'directory' then
|
||||||
{ 'nvim-lua/plenary.nvim' },
|
highlight = highlights.DIRECTORY_ICON
|
||||||
|
if node:is_expanded() then
|
||||||
-- Provides Nerd Font icons (glyphs) for use by neovim plugins
|
icon = config.folder_open or '-'
|
||||||
{ 'nvim-tree/nvim-web-devicons' },
|
else
|
||||||
|
icon = config.folder_closed or '+'
|
||||||
-- UI Component Library for Neovim
|
end
|
||||||
{ 'MunifTanjim/nui.nvim' },
|
elseif node.type == 'file' then
|
||||||
},
|
local success, web_devicons = pcall(require, 'nvim-web-devicons')
|
||||||
opts = {
|
if success then
|
||||||
close_if_last_window = true,
|
local devicon, hl = web_devicons.get_icon(node.name, node.ext)
|
||||||
clipboard = {
|
icon = devicon or icon
|
||||||
sync = "global"
|
highlight = hl or highlight
|
||||||
},
|
end
|
||||||
enable_git_status = true,
|
end
|
||||||
enable_diagnostics = true
|
|
||||||
}
|
return {
|
||||||
}
|
text = icon .. padding,
|
||||||
|
highlight = highlight
|
||||||
|
}
|
||||||
|
end
|
||||||
|
},
|
||||||
|
]]
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
['o'] = 'system_open'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
commands = {
|
||||||
|
-- Открытие файла через программу по умолчанию в операционной системе
|
||||||
|
system_open = function(state)
|
||||||
|
vim.api.nvim_command(string.format('silent !xdg-open \'%s\'', state.tree:get_node():get_id()))
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
-- Improved nginx vim plugin (incl. syntax highlighting)
|
|
||||||
return {
|
|
||||||
'chr4/nginx.vim',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true
|
|
||||||
}
|
|
||||||
@@ -1,13 +1,5 @@
|
|||||||
-- Provides Nerd Font icons (glyphs) for use by neovim plugins
|
require('nvim-web-devicons').setup {
|
||||||
return {
|
override = {},
|
||||||
'nvim-tree/nvim-web-devicons',
|
color_icons = true,
|
||||||
enabled = true,
|
default = false
|
||||||
lazy = false,
|
|
||||||
priority = 110,
|
|
||||||
opts = {
|
|
||||||
override = {},
|
|
||||||
color_icons = true,
|
|
||||||
default = true,
|
|
||||||
strict = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
186
lua/plugins/packer.lua
Normal file
186
lua/plugins/packer.lua
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
-- Инициализация
|
||||||
|
vim.cmd('packadd packer.nvim')
|
||||||
|
|
||||||
|
return require('packer').startup(function(use)
|
||||||
|
-- Менеджер плагинов Packer (автообновление)
|
||||||
|
use 'wbthomason/packer.nvim'
|
||||||
|
|
||||||
|
-- Быстрая настройка LSP-серверов
|
||||||
|
use {
|
||||||
|
'neovim/nvim-lspconfig',
|
||||||
|
after = 'coq_nvim',
|
||||||
|
config = function() require('plugins/lspconfig') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Прогресс LSP
|
||||||
|
use {
|
||||||
|
'j-hui/fidget.nvim',
|
||||||
|
config = function() require('plugins/fidget') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интерфейс отображающий найденные проблемы LSP-серверами
|
||||||
|
use {
|
||||||
|
'folke/trouble.nvim',
|
||||||
|
requires = 'kyazdani42/nvim-web-devicons',
|
||||||
|
config = function() require('plugins/trouble') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Пиктограммы для плагинов
|
||||||
|
use {
|
||||||
|
'onsails/lspkind-nvim',
|
||||||
|
config = function() require('plugins/lspkind') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Пиктограммы для плагинов
|
||||||
|
use {
|
||||||
|
'nvim-tree/nvim-web-devicons',
|
||||||
|
config = function() require('plugins/nvim-web-devicons') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интеграция с GIT
|
||||||
|
use {
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
config = function() require('plugins/gitsigns') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Обработчик GIT-команд
|
||||||
|
use 'tpope/vim-fugitive'
|
||||||
|
|
||||||
|
-- Отображение изменений GIT
|
||||||
|
use 'mhinz/vim-signify'
|
||||||
|
|
||||||
|
-- Отрисовка в реальном времени найденных ошибок LSP-серверами
|
||||||
|
use {
|
||||||
|
'onsails/diaglist.nvim',
|
||||||
|
config = function() require('plugins/diaglist') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интерфейс строки состояния
|
||||||
|
use {
|
||||||
|
'nvim-lualine/lualine.nvim',
|
||||||
|
requires = 'kyazdani42/nvim-web-devicons',
|
||||||
|
config = function() require('plugins/lualine') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Дополнение для "nvim-lualine/lualine.nvim" с отображением прогресса работы с LSP-серверами
|
||||||
|
use {
|
||||||
|
'arkav/lualine-lsp-progress',
|
||||||
|
config = function() require('plugins/lualine-lsp-progress') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интерфейс строки буфера файлов
|
||||||
|
use {
|
||||||
|
'akinsho/bufferline.nvim',
|
||||||
|
tag = "v3.*",
|
||||||
|
requires = 'nvim-tree/nvim-web-devicons',
|
||||||
|
config = function() require('plugins/bufferline') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интерфейс древовидной структуры файлов
|
||||||
|
use {
|
||||||
|
'nvim-neo-tree/neo-tree.nvim',
|
||||||
|
branch = 'v2.x',
|
||||||
|
requires = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
'kyazdani42/nvim-web-devicons',
|
||||||
|
'MunifTanjim/nui.nvim'
|
||||||
|
},
|
||||||
|
config = function() require('plugins/neo-tree') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Автодополнение скобок и кавычек
|
||||||
|
use {
|
||||||
|
'windwp/nvim-autopairs',
|
||||||
|
config = function() require('plugins/autopairs') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Цвета для отображения найденных ошибок LSP-сервером в случае если другие цвета не найдены
|
||||||
|
use 'folke/lsp-colors.nvim'
|
||||||
|
|
||||||
|
-- Клиентская реализация DAP
|
||||||
|
use {
|
||||||
|
'mfussenegger/nvim-dap',
|
||||||
|
config = function() require('plugins/dap') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Автозавершение
|
||||||
|
use {
|
||||||
|
'ms-jpq/coq_nvim',
|
||||||
|
branch = 'coq',
|
||||||
|
config = function() require('plugins/coq') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Готовые наброски для автозавершения "ms-jpq/coq_nvim"
|
||||||
|
use {
|
||||||
|
'ms-jpq/coq.artifacts',
|
||||||
|
branch = 'artifacts'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Пользовательские готовые наброски для автозавершения "ms-jpq/coq_nvim"
|
||||||
|
use {
|
||||||
|
'ms-jpq/coq.thirdparty',
|
||||||
|
branch = '3p'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Линтер
|
||||||
|
use {
|
||||||
|
'mfussenegger/nvim-lint',
|
||||||
|
config = function() require('plugins/lint') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Тестирование
|
||||||
|
use {
|
||||||
|
'vim-test/vim-test',
|
||||||
|
config = function() require('plugins/vim-test') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интерфейс для поиска
|
||||||
|
use {
|
||||||
|
'nvim-telescope/telescope.nvim',
|
||||||
|
tag = '0.1.1',
|
||||||
|
config = function() require('plugins/telescope') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интеграция treesitter
|
||||||
|
use {
|
||||||
|
'nvim-treesitter/nvim-treesitter',
|
||||||
|
run = ':TSUpdate',
|
||||||
|
config = function() require('plugins/treesitter') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Удобное комментирование
|
||||||
|
use 'b3nj5m1n/kommentary'
|
||||||
|
|
||||||
|
-- Древовидное представление символов
|
||||||
|
use {
|
||||||
|
'simrat39/symbols-outline.nvim',
|
||||||
|
config = function() require('plugins/symbols-outline') end
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Интерфейс для отображения тегов в отдельном окне
|
||||||
|
use 'preservim/tagbar'
|
||||||
|
|
||||||
|
-- PHP-теги для "preservim/tagbar" (phpctags для ctags)
|
||||||
|
use {
|
||||||
|
'vim-php/phpctags',
|
||||||
|
run = 'composer install'
|
||||||
|
}
|
||||||
|
|
||||||
|
-- LSP-сервер для Fish Shell
|
||||||
|
use 'dag/vim-fish'
|
||||||
|
|
||||||
|
-- Цветовая тема
|
||||||
|
use {
|
||||||
|
'rktjmp/lush.nvim',
|
||||||
|
config = function() require('plugins/lush') end
|
||||||
|
};
|
||||||
|
|
||||||
|
-- Аналог LSP-сервера для подержки синтаксиса nginx
|
||||||
|
use 'chr4/nginx.vim'
|
||||||
|
|
||||||
|
-- Форматировщик Prettier
|
||||||
|
use {
|
||||||
|
'prettier/vim-prettier',
|
||||||
|
run = 'yarn install --frozen-lockfile --production'
|
||||||
|
}
|
||||||
|
end)
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
-- Highlight only the screen line of the cursor
|
|
||||||
-- in the currently active window
|
|
||||||
return {
|
|
||||||
'tummetott/reticle.nvim',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
event = 'VeryLazy'
|
|
||||||
}
|
|
||||||
4
lua/plugins/symbols-outline.lua
Normal file
4
lua/plugins/symbols-outline.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
require('symbols-outline').setup({
|
||||||
|
--auto_preview = true,
|
||||||
|
--show_numbers = true
|
||||||
|
})
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
-- Vim plugin that displays tags in a window, ordered by scope
|
|
||||||
return {
|
|
||||||
'preservim/tagbar',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true,
|
|
||||||
keys = {
|
|
||||||
{ '<f2>', '<cmd>TagbarToggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Tagbar toggle', noremap = true, silent = true },
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
-- An enhanced ctags compatible index generator written in pure PHP
|
|
||||||
{ 'vim-php/phpctags' },
|
|
||||||
|
|
||||||
-- jsctags generator using tern
|
|
||||||
{ 'sergioramos/jsctags' }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +1,18 @@
|
|||||||
-- Find, Filter, Preview, Pick. All lua, all the time
|
require('telescope').setup{
|
||||||
-- Gaze deeply into unknown regions using the power of the moon
|
pickers = {
|
||||||
return {
|
-- Default configuration for builtin pickers goes here:
|
||||||
'nvim-telescope/telescope.nvim',
|
-- picker_name = {
|
||||||
enabled = true,
|
-- picker_config_key = value,
|
||||||
lazy = true,
|
-- ...
|
||||||
keys = {
|
-- }
|
||||||
{ '<c-f>', '<cmd>Telescope find_files', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope find', noremap = true, silent = true },
|
-- Now the picker_config_key will be applied every time you call this
|
||||||
{ '<c-F>', '<cmd>Telescope live_grep', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope grep', noremap = true, silent = true },
|
-- builtin picker
|
||||||
{ '<leader><s-tab>', '<cmd>Telescope buffers', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope buffers', noremap = true, silent = true },
|
},
|
||||||
{ '<leader>?', '<cmd>Telescope help_tags', mode = { 'n', 'i', 'v', 't' }, desc = 'Telescope help', noremap = true, silent = true },
|
extensions = {
|
||||||
},
|
-- Your extension configuration goes here:
|
||||||
dependencies = {
|
-- extension_name = {
|
||||||
-- Functions for Telescope
|
-- extension_config_key = value,
|
||||||
{ 'nvim-lua/plenary.nvim' },
|
-- }
|
||||||
|
-- please take a look at the readme of the extension you want to configure
|
||||||
-- Integration for nvim-dap with telescope.nvim
|
}
|
||||||
{ 'nvim-telescope/telescope-dap.nvim' }
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
exteinsions = {
|
|
||||||
dap = {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- Initializing telescope
|
|
||||||
local telescope = require('telescope')
|
|
||||||
|
|
||||||
-- Loading extensions
|
|
||||||
telescope.load_extension('dap')
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,6 @@
|
|||||||
-- Nvim Treesitter configurations and abstraction layer
|
require('nvim-treesitter.configs').setup {
|
||||||
return {
|
highlight = {
|
||||||
'nvim-treesitter/nvim-treesitter',
|
enable = true,
|
||||||
enabled = true,
|
additional_vim_regex_highlighting = false
|
||||||
lazy = false,
|
},
|
||||||
priority = 40,
|
|
||||||
build = ':TSUpdate',
|
|
||||||
opts = {
|
|
||||||
highlight = {
|
|
||||||
enable = true,
|
|
||||||
additional_vim_regex_highlighting = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,48 @@
|
|||||||
-- 🚦 A pretty diagnostics, references, telescope results,
|
require('trouble').setup({
|
||||||
-- quickfix and location list to help you solve
|
position = "bottom", -- position of the list can be: bottom, top, left, right
|
||||||
-- all the trouble your code is causing
|
height = 10, -- height of the trouble list when position is top or bottom
|
||||||
return {
|
width = 50, -- width of the list when position is left or right
|
||||||
'folke/trouble.nvim',
|
icons = true, -- use devicons for filenames
|
||||||
enabled = true,
|
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
|
||||||
lazy = true,
|
fold_open = "", -- icon used for open folds
|
||||||
cmd = 'Trouble',
|
fold_closed = "", -- icon used for closed folds
|
||||||
keys = {
|
group = true, -- group results by file
|
||||||
{ '<f3>', '<cmd>Trouble diagnostics toggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Diagnostics (Trouble)', noremap = true, silent = true },
|
padding = true, -- add an extra new line on top of the list
|
||||||
|
action_keys = {
|
||||||
|
-- key mappings for actions in the trouble list
|
||||||
|
-- map to {} to remove a mapping, for example:
|
||||||
|
-- close = {},
|
||||||
|
close = "q", -- close the list
|
||||||
|
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
|
||||||
|
refresh = "r", -- manually refresh
|
||||||
|
jump = { "<cr>", "<tab>" }, -- jump to the diagnostic or open / close folds
|
||||||
|
open_split = { "<c-x>" }, -- open buffer in new split
|
||||||
|
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
|
||||||
|
open_tab = { "<c-t>" }, -- open buffer in new tab
|
||||||
|
jump_close = { "o" }, -- jump to the diagnostic and close the list
|
||||||
|
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
|
||||||
|
toggle_preview = "P", -- toggle auto_preview
|
||||||
|
hover = "K", -- opens a small popup with the full multiline message
|
||||||
|
preview = "p", -- preview the diagnostic location
|
||||||
|
close_folds = { "zM", "zm" }, -- close all folds
|
||||||
|
open_folds = { "zR", "zr" }, -- open all folds
|
||||||
|
toggle_fold = { "zA", "za" }, -- toggle fold of current file
|
||||||
|
previous = "k", -- previous item
|
||||||
|
next = "j" -- next item
|
||||||
},
|
},
|
||||||
opts = {},
|
indent_lines = true, -- add an indent guide below the fold icons
|
||||||
config = function() end
|
auto_open = false, -- automatically open the list when you have diagnostics
|
||||||
}
|
auto_close = false, -- automatically close the list when you have no diagnostics
|
||||||
|
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
|
||||||
|
auto_fold = false, -- automatically fold a file trouble list at creation
|
||||||
|
auto_jump = { "lsp_definitions" }, -- for the given modes, automatically jump if there is only a single result
|
||||||
|
signs = {
|
||||||
|
-- icons / text used for a diagnostic
|
||||||
|
error = "",
|
||||||
|
warning = "",
|
||||||
|
hint = "",
|
||||||
|
information = "",
|
||||||
|
other = ""
|
||||||
|
},
|
||||||
|
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
-- Run your tests at the speed of thought
|
|
||||||
return {
|
|
||||||
'vim-test/vim-test',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
-- A Git wrapper so awesome, it should be illegal
|
|
||||||
return {
|
|
||||||
'tpope/vim-fugitive',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
-- ➕ Show a diff using Vim its sign column
|
|
||||||
return {
|
|
||||||
'mhinz/vim-signify',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
-- Vim support for editing fish scripts
|
|
||||||
return {
|
|
||||||
'dag/vim-fish',
|
|
||||||
enabled = true,
|
|
||||||
lazy = true
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
-- Bootstrap lazy.nvim
|
|
||||||
local path = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
|
||||||
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(path) then
|
|
||||||
local repository = 'https://github.com/folke/lazy.nvim.git'
|
|
||||||
local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', repository, path })
|
|
||||||
|
|
||||||
if vim.v.shell_error ~= 0 then
|
|
||||||
vim.api.nvim_echo({
|
|
||||||
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
|
|
||||||
{ out, 'WarningMsg' },
|
|
||||||
{ '\nPress any key to exit...' },
|
|
||||||
}, true, {})
|
|
||||||
|
|
||||||
vim.fn.getchar()
|
|
||||||
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.opt.rtp:prepend(path)
|
|
||||||
|
|
||||||
-- Setup lazy.nvim
|
|
||||||
require('lazy').setup({
|
|
||||||
-- Import plugins
|
|
||||||
spec = {
|
|
||||||
{ import = 'plugins' },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- Configure any other settings here. See the documentation for more details.
|
|
||||||
-- colorscheme that will be used when installing plugins.
|
|
||||||
-- install = {
|
|
||||||
-- colorscheme = { 'flexoki' }
|
|
||||||
-- },
|
|
||||||
|
|
||||||
-- Automatically check for plugin updates
|
|
||||||
checker = {
|
|
||||||
enabled = true
|
|
||||||
},
|
|
||||||
})
|
|
||||||
@@ -3,6 +3,3 @@ vim.opt.splitright = true
|
|||||||
|
|
||||||
-- Горизонтальное разделение всегда вниз
|
-- Горизонтальное разделение всегда вниз
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
|
|
||||||
-- Command line height
|
|
||||||
vim.opt.cmdheight = 0
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
-- Leader button
|
|
||||||
vim.g.mapleader = ' '
|
|
||||||
vim.g.maplocalleader = '\\'
|
|
||||||
|
|
||||||
-- Использовать системный буфер обмена
|
-- Использовать системный буфер обмена
|
||||||
vim.opt.clipboard = 'unnamedplus'
|
vim.opt.clipboard = 'unnamedplus'
|
||||||
|
|
||||||
@@ -9,7 +5,7 @@ vim.opt.clipboard = 'unnamedplus'
|
|||||||
--vim.opt.completeopt = 'menuone,noselect'
|
--vim.opt.completeopt = 'menuone,noselect'
|
||||||
|
|
||||||
-- Не автокомментировать новые линии при переходе на новую строку
|
-- Не автокомментировать новые линии при переходе на новую строку
|
||||||
vim.cmd('autocmd BufEnter * set fo-=c fo-=r fo-=o')
|
--vim.cmd('autocmd BufEnter * set fo-=c fo-=r fo-=o')
|
||||||
|
|
||||||
-- Нумерация строк
|
-- Нумерация строк
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
@@ -29,11 +25,8 @@ vim.opt_local.wrap = true
|
|||||||
-- Отображение колонки курсора
|
-- Отображение колонки курсора
|
||||||
vim.opt_local.cursorcolumn = true
|
vim.opt_local.cursorcolumn = true
|
||||||
|
|
||||||
-- Theme
|
-- Выбор цветовой темы
|
||||||
vim.opt.background = "dark"
|
vim.cmd.colorscheme('default')
|
||||||
|
|
||||||
-- Colorscheme @see plugin "flexoki"
|
|
||||||
vim.cmd.colorscheme('vim')
|
|
||||||
|
|
||||||
-- Добавление ru_RU (переключать через <c-^>)
|
-- Добавление ru_RU (переключать через <c-^>)
|
||||||
vim.opt.keymap = 'russian-jcukenwin'
|
vim.opt.keymap = 'russian-jcukenwin'
|
||||||
@@ -50,7 +43,3 @@ vim.opt_local.spelllang = 'ru_yo,en_us'
|
|||||||
vim.g.markdown_fenced_languages = {
|
vim.g.markdown_fenced_languages = {
|
||||||
"ts=typescript"
|
"ts=typescript"
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Syntax hightlighting
|
|
||||||
vim.cmd('syntax on')
|
|
||||||
vim.cmd('filetype plugin on')
|
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
-- 🚦 A pretty diagnostics, references, telescope results,
|
|
||||||
-- quickfix and location list to help you solve
|
|
||||||
-- all the trouble your code is causing
|
|
||||||
return {
|
|
||||||
'folke/trouble.nvim',
|
|
||||||
enabled = true,
|
|
||||||
lazy = false,
|
|
||||||
cmd = 'Trouble',
|
|
||||||
keys = {
|
|
||||||
{ '<f3>', '<cmd>Trouble diagnostics toggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Diagnostics (Trouble)', noremap = true, silent = true },
|
|
||||||
},
|
|
||||||
dependencies = {
|
|
||||||
-- Nvim Treesitter configurations and abstraction layer
|
|
||||||
{ 'nvim-treesitter/nvim-treesitter' },
|
|
||||||
|
|
||||||
-- Provides Nerd Font icons (glyphs) for use by neovim plugins
|
|
||||||
{ 'nvim-tree/nvim-web-devicons' }
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
|
|
||||||
auto_close = true, -- auto close when there are no items
|
|
||||||
auto_open = true, -- auto open when there are items
|
|
||||||
position = 'bottom', -- position of the list can be: bottom, top, left, right
|
|
||||||
auto_preview = true, -- automatically open preview when on an item
|
|
||||||
auto_refresh = true, -- auto refresh when open
|
|
||||||
auto_jump = false, -- auto jump to the item when there's only one
|
|
||||||
focus = false, -- Focus the window when opened
|
|
||||||
restore = true, -- restores the last location in the list when opening
|
|
||||||
follow = true, -- Follow the current item
|
|
||||||
indent_guides = true, -- show indent guides
|
|
||||||
max_items = 200, -- limit number of items that can be displayed per section
|
|
||||||
multiline = true, -- render multi-line messages
|
|
||||||
pinned = false, -- When pinned, the opened trouble window will be bound to the current buffer
|
|
||||||
warn_no_results = true, -- show a warning when there are no results
|
|
||||||
open_no_results = false, -- open the trouble window when there are no results
|
|
||||||
-- use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
-- Initializing Telescope
|
|
||||||
local telescope = require('telescope')
|
|
||||||
local telescope_actions = require('telescope.actions')
|
|
||||||
local telescope_open = require('trouble.sources.telescope').open
|
|
||||||
|
|
||||||
-- Use this to add more results without clearing the trouble list
|
|
||||||
local add_to_trouble = require('trouble.sources.telescope').add
|
|
||||||
|
|
||||||
telescope.setup({
|
|
||||||
defaults = {
|
|
||||||
mappings = {
|
|
||||||
i = { ['<c-t>'] = telescope_open },
|
|
||||||
n = { ['<c-t>'] = telescope_open },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user