11 Commits
1.7.0 ... 2.6.0

Author SHA1 Message Date
059f61c5f2 new plugins, from coq to cmp, fixes, xdebug, install python3 fixes 2026-02-01 11:03:03 +05:00
e85cd46b0d ripgrep 2026-01-12 18:14:01 +05:00
0e719616a4 which key plugin and telescop settings 2026-01-06 11:18:32 +05:00
bce2815847 ctags 2025-12-24 11:44:14 +05:00
eb72445d5c more things!!!!!! 2025-12-20 01:57:37 +07:00
1e969b43a0 even cooler 2025-12-18 23:12:43 +07:00
3c21e12bf3 from packer to lazy 2025-12-17 21:32:34 +07:00
40aee7d3ce sudo apt install -y curl zip 2025-08-19 20:59:42 +07:00
f50ddf9d15 set_color blue 2025-08-19 20:55:57 +07:00
2f22ec02d1 commented "yadm" 2025-05-28 04:01:40 +00:00
8f17023d85 "exit" instead if "return" and fixed path 2025-05-28 03:48:03 +00:00
51 changed files with 1462 additions and 1197 deletions

View File

@@ -5,10 +5,11 @@ require('settings/panels')
require('settings/search') require('settings/search')
-- Plugins -- Plugins
require('plugins/packer') require("settings/lazy")
-- Keymaps -- Keymaps
require('keymaps/system') require('keymaps/system')
require('keymaps/functions')
require('keymaps/plugins') require('keymaps/plugins')
-- Autocommands -- Autocommands

View File

@@ -24,12 +24,6 @@ if test (string match -ri "ru" "$LANG")
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 -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";
case NVIM_NOT_INSTALLED case NVIM_NOT_INSTALLED
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 red; echo -n "[ОШИБКА] "; set_color white; echo "NeoVim не установлен";
case PACKER_INSTALL
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить Packer? (\"wbthomason/packer.nvim\") (y/N) ";
case PACKER_EXISTS
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
@@ -39,9 +33,9 @@ if test (string match -ri "ru" "$LANG")
case LSP_VSCODE-LANGSERVERS_INSTALLED case LSP_VSCODE-LANGSERVERS_INSTALLED
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлены LSP-сервера от VSCode (JSON, HTML, CSS) (\"hrsh7th/vscode-langservers-extracted\")"; set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлены LSP-сервера от VSCode (JSON, HTML, CSS) (\"hrsh7th/vscode-langservers-extracted\")";
case LSP_EMMET_INSTALL case LSP_EMMET_INSTALL
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для набора инструментов Emmet (HTML из CSS)? (\"aca/emmet-ls\") (y/N) "; set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для набора инструментов Emmet (HTML и CSS)? (\"aca/emmet-ls\") (y/N) ";
case LSP_EMMET_INSTALLED case LSP_EMMET_INSTALLED
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен LSP-сервер для набора инструментов Emmet (HTML из CSS) (\"aca/emmet-ls\")"; set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[РАБОТА] "; set_color white; echo "Установлен LSP-сервер для набора инструментов Emmet (HTML и CSS) (\"aca/emmet-ls\")";
case LSP_CSSMODULES_INSTALL case LSP_CSSMODULES_INSTALL
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для CSS (форматировщик)? (\"antonk52/cssmodules-language-server\") (y/N) "; set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[ЗАДАЧА] "; set_color white; echo "Установить LSP-сервер для CSS (форматировщик)? (\"antonk52/cssmodules-language-server\") (y/N) ";
case LSP_CSSMODULES_INSTALLED case LSP_CSSMODULES_INSTALLED
@@ -87,12 +81,6 @@ else
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 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";
case NVIM_NOT_INSTALLED case NVIM_NOT_INSTALLED
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 red; echo -n "[ERROR] "; set_color white; echo "NeoVim is not installed";
case PACKER_INSTALL
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 PACKER_EXISTS
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
@@ -150,16 +138,17 @@ if set -q _flag_help
print HELP print HELP
# Exit (success) # Exit (success)
return 0 exit 0
end end
if not type -q nvim if not type -q nvim
# Sending the message # Sending the message
print NVIM_NOT_INSTALLED print NVIM_NOT_INSTALLED
set_color blue
echo $NVIM_WIKI_INSTALLATION echo $NVIM_WIKI_INSTALLATION
# Exit (fail) # Exit (fail)
return 1 exit 1
end end
if set -q _flag_update if set -q _flag_update
@@ -168,68 +157,70 @@ if set -q _flag_update
curl -o- https://fnm.vercel.app/install | bash curl -o- https://fnm.vercel.app/install | bash
# Initializing fnm # Initializing fnm
source /home/mirzaev/.config/fish/conf.d/fnm.fish source ~/.config/fish/conf.d/fnm.fish
# Installing dependencies
sudo apt install -y curl zip
# Downloadind and installing Node.js: # Downloadind and installing Node.js:
fnm install $NODEJS_VERSION fnm install $NODEJS_VERSION
# need to rewrite in future (бляяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяя) # need to rewrite in the future (бляяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяя)
sudo apt install -y npm python3-venv python3-pip rubygems ruby-dev pkg-config sudo apt install -y npm universal-ctags python3-venv python3-virtualenv python3-pip rubygems ruby-dev pkg-config lua5.4 luarocks ripgrep
python3 -m ~/.local/bin/pip install --upgrade pip
fish_add_path ~/.local/bin python3 -m virtualenv ~/.config/nvim/python
~/.local/bin/pip install --upgrade pynvim source ~/.config/nvim/python/bin/activate.fish
# ~/.config/nvim/python/bin/python3 -m pip install --upgrade pip
# ~/.config/nvim/python/bin/pip install --upgrade pynvim
python3 -m pip install --upgrade pip
pip install --upgrade pynvim
sudo gem install neovim sudo gem install neovim
# Install NeoVim module for NPM # Install NeoVim module for NPM
npm i -g neovim npm i -g neovim
npm i -g tree-sitter-cli
npm i -g yarn
end &> $output end &> $output
end end
sudo apt install -y build-essential flex bison libisl-dev texinfo texlive
# mkdir ~/src
# cd ~/src
# wget https://ftp.gnu.org/gnu/binutils/binutils-2.45.1.tar.xz
# tar -xf binutils-2.45.1.tar.xz
# cd binutils-2.45.1
# mkdir build
# cd build
# ../configure --prefix=/usr/local --target=x86_64-elf --program-prefix=x86_64-elf-
# make all
# sudo make install
# cd ~/src
# wget http://ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.gz
# tar -xf gcc-14.1.0.tar.gz
# cd gcc-14.1.0
# mkdir build
# cd build
# ../configure -v --build=$(uname -m)-linux-gnu --host=$(uname -m)-linux-gnu --target=$(uname -m)-linux-gnu --prefix=/usr/local/gcc-14.1.0 --enable-checking=release --enable-languages=c,c++ --disable-multilib --program-suffix=-14.1.0
# make
# sudo make install
# sudo update-alternatives --install /usr/bin/g++ g++ /usr/local/gcc-14.1.0/bin/g++-14.1.0 14
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/local/gcc-14.1.0/bin/gcc-14.1.0 14
# # git clone git://sourceware.org/git/glibc.git
# git clone https://github.com/bminor/glibc
# cd glibc
# mkdir build
# cd build
# ../configure --disable-sanity-checks
# Initializing the virtual environment for Python packages # Initializing the virtual environment for Python packages
python3 -m venv ~/.local --system-site-packages ~/.config/nvim/python/bin/python3 -m venv ~/.local --system-site-packages
if not set -q _flag_force
# Installation request
set RESPONSE (read -n 1 -p "print PACKER_INSTALL")
bind -e y
end
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
if test -d ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# Найден репозиторий "wbthomason/packer.nvim"
if not set -q _flag_force
# Installation request
set RESPONSE (read -n 1 -p "print PACKER_EXISTS")
bind -e y
end
if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
# Запрошена переустановка
begin
# Деинициализация старого репозитория
rm -rf ~/.local/share/nvim/site/pack/packer/start/packer.nvim
# Инициализация репозитория
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
end &> $output
print PACKER_INSTALLED
end
else
# Не найден репозиторий "wbthomason/packer.nvim"
begin
# Инициализация репозитория
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
end &> $output
print PACKER_INSTALLED
end
end
if not set -q _flag_force if not set -q _flag_force
# Installation request # Installation request
@@ -391,6 +382,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
cd ~/ cd ~/
git clone https://github.com/xdebug/vscode-php-debug.git git clone https://github.com/xdebug/vscode-php-debug.git
cd vscode-php-debug cd vscode-php-debug
git pull
npm install && npm run build npm install && npm run build
end &> $output end &> $output

45
lazy-lock.json Normal file
View File

@@ -0,0 +1,45 @@
{
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmp-git": { "branch": "main", "commit": "b24309c386c9666c549a1abaedd4956541676d06" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"diaglist.nvim": { "branch": "master", "commit": "8aba9fcf62cc60e1d5ce941faedecc399d9a1e8b" },
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
"flexoki": { "branch": "main", "commit": "079554c242a86be5d1a95598c7c6368d6eedd7a3" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
"jsctags": { "branch": "master", "commit": "22d3fb848c429d4704dc3a8946bc3a4423a8e4a4" },
"kommentary": { "branch": "main", "commit": "d5a111a3bc4109a8f913a5863c9092b3b3801482" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lsp-colors.nvim": { "branch": "main", "commit": "2bbe7541747fd339bdd8923fc45631a09bb4f1e5" },
"lspkind-nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
"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": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
"nvim-dap": { "branch": "master", "commit": "e47878dcf1ccc30136b30d19ab19fe76946d61cd" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-lint": { "branch": "master", "commit": "bcd1a44edbea8cd473af7e7582d3f7ffc60d8e81" },
"nvim-lspconfig": { "branch": "master", "commit": "3f58aeca0c6ece8a9fb8782ea3fcb6024f285be3" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "main", "commit": "4967fa48b0fe7a7f92cee546c76bb4bb61bb14d5" },
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
"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": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
"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": "c569b3620d0e53572efc95159f66ace5e7b06b48" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View File

@@ -1,44 +0,0 @@
{
"workspace.library": [
"/home/mirzaev/.config/nvim",
"/home/mirzaev/.local/share/nvim/site",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/bufferline.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/coq.artifacts",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/coq.thirdparty",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/coq_nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/diaglist.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/fidget.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/gitsigns.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/kommentary",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/lualine-lsp-progress",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/lualine.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/lush.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/neo-tree.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/nginx.vim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/nui.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-dap",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-lint",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/packer.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/phpctags",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/plenary.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/symbols-outline.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/tagbar",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/telescope.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/trouble.nvim",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-fish",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-fugitive",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-prettier",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-signify",
"/home/mirzaev/.local/share/nvim/site/pack/packer/start/vim-test",
"/home/mirzaev/.local/share/nvim/site/pack/packer/opt/nvim-lspconfig",
"/snap/nvim/2789/usr/share/nvim/runtime",
"/snap/nvim/2789/usr/share/nvim/runtime/pack/dist/opt/matchit",
"${3rd}/luassert/library",
"${3rd}/luv/library"
]
}

View File

@@ -1,10 +1,10 @@
vim.api.nvim_create_autocmd({'BufEnter','BufAdd','BufNew','BufNewFile','BufWinEnter'}, { vim.api.nvim_create_autocmd({ 'BufEnter', 'BufAdd', 'BufNew', 'BufNewFile', 'BufWinEnter' }, {
group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}), group = vim.api.nvim_create_augroup('TS_FOLD_WORKAROUND', {}),
callback = function() callback = function()
-- Folding code method -- Folding code method
-- vim.opt.foldmethod = 'expr' -- vim.opt.foldmethod = 'expr'
-- Expression for folding code -- Expression for folding code
-- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()' -- vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'
end end
}) })

View File

@@ -1,2 +1,2 @@
-- Quick compilation with GCC and running -- Quick compilation with GCC and running
vim.keymap.set('n', 'co', '<cmd>:!gcc -o test % && ./test', {noremap = true}) vim.keymap.set('n', '<leader>c', '<cmd>!gcc -o test % && ./test<cr>', { noremap = true })

View File

@@ -1,52 +1,3 @@
--[[ nvim-neo-tree/neo-tree ]]
-- Открыть интерфейс с древовидным отображением файлов
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f1>', '<cmd>Neotree toggle<cr>', { noremap = true })
-- [[ folke/trouble.nvim ]]
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f2>', '<cmd>Trouble diagnostics toggle focus=false filter.buf=0<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', 'v', 't' }, 'F', function() vim.lsp.buf.format { async = true } end, { noremap = true, silent = true, buffer = bufnr })
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
@@ -55,7 +6,7 @@ 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 (not (vim.diff(vim.inspect(vim.lsp.get_clients()), '{}') == '')) then
-- LSP-server clients is ready -- LSP-server clients is ready
vim.lsp.buf.format { async = true } vim.lsp.buf.format { async = true }
@@ -65,63 +16,46 @@ vim.keymap.set({ 'n', 'v', 't' }, 'F', function()
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() -- vim.keymap.set('n', ']c', function()
if vim.wo.diff then return ']c' end -- if vim.wo.diff then return ']c' end
vim.schedule(function() gs.next_hunk() end) -- vim.schedule(function() gs.next_hunk() end)
return '<Ignore>' -- return '<Ignore>'
end, { expr = true, buffer = bufnr }) -- end, { expr = true, buffer = bufnr })
--
-- Навигация -- -- Навигация
vim.keymap.set('n', '[c', function() -- vim.keymap.set('n', '[c', function()
if vim.wo.diff then return '[c' end -- if vim.wo.diff then return '[c' end
vim.schedule(function() gs.prev_hunk() end) -- vim.schedule(function() gs.prev_hunk() end)
return '<Ignore>' -- return '<Ignore>'
end, { expr = true, buffer = bufnr }) -- end, { expr = true, buffer = bufnr })
--
vim.keymap.set('n', '<leader>hs', '<cmd>Gitsigns stage_hunk<cr>', { 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('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('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('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>hS', gs.stage_buffer, { buffer = bufnr })
vim.keymap.set('n', '<leader>hu', gs.undo_stage_hunk, { 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>hR', gs.reset_buffer, { buffer = bufnr })
vim.keymap.set('n', '<leader>hp', gs.preview_hunk, { 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>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>tb', gs.toggle_current_line_blame, { buffer = bufnr })
vim.keymap.set('n', '<leader>hd', gs.diffthis, { 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>hD', function() gs.diffthis('~') end, { buffer = bufnr })
vim.keymap.set('n', '<leader>td', gs.toggle_deleted, { 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('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 }) -- vim.keymap.set('x', 'ih', '<cmd><c-U>Gitsigns select_hunk<cr>', { buffer = bufnr })
end -- 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 })
--[[ mfussenegger/nvim-dap ]] --[[ mfussenegger/nvim-dap ]]
vim.keymap.set('n', '<F5>', function() require('dap').continue() end) vim.keymap.set('n', '<F5>', function() require('dap').continue() end)
@@ -130,62 +64,21 @@ vim.keymap.set('n', '<F11>', function() require('dap').step_into() end)
vim.keymap.set('n', '<F12>', function() require('dap').step_out() end) vim.keymap.set('n', '<F12>', function() require('dap').step_out() end)
vim.keymap.set('n', '<Leader>b', function() require('dap').toggle_breakpoint() end) vim.keymap.set('n', '<Leader>b', function() require('dap').toggle_breakpoint() end)
vim.keymap.set('n', '<Leader>B', function() require('dap').set_breakpoint() end) 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>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', '<Leader>dr', function() require('dap').repl.open() end)
vim.keymap.set('n', '<Leader>dl', function() require('dap').run_last() end) vim.keymap.set('n', '<Leader>dl', function() require('dap').run_last() end)
vim.keymap.set({'n', 'v'}, '<Leader>dh', function() vim.keymap.set({ 'n', 'v' }, '<Leader>dh', function()
require('dap.ui.widgets').hover() require('dap.ui.widgets').hover()
end) end)
vim.keymap.set({'n', 'v'}, '<Leader>dp', function() vim.keymap.set({ 'n', 'v' }, '<Leader>dp', function()
require('dap.ui.widgets').preview() require('dap.ui.widgets').preview()
end) end)
vim.keymap.set('n', '<Leader>df', function() vim.keymap.set('n', '<Leader>df', function()
local widgets = require('dap.ui.widgets') local widgets = require('dap.ui.widgets')
widgets.centered_float(widgets.frames) widgets.centered_float(widgets.frames)
end) end)
vim.keymap.set('n', '<Leader>ds', function() vim.keymap.set('n', '<Leader>ds', function()
local widgets = require('dap.ui.widgets') local widgets = require('dap.ui.widgets')
widgets.centered_float(widgets.scopes) widgets.centered_float(widgets.scopes)
end) end)
--[[ 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 })

View File

@@ -1,24 +1,19 @@
-- Выход из режима "ВСТАВКА" (insert) -- Offset
vim.keymap.set('i', '<C-i>', '<escape>', {noremap = true, silent = true}) vim.keymap.set({ 'i' }, '<tab>', '<cmd>><cr>', { noremap = true, silent = true })
vim.keymap.set({ 'i' }, '<s-tab>', '<cmd><<cr>', { noremap = true, silent = true })
vim.keymap.set({ 'v', 't' }, '<tab>', '>', { noremap = true, silent = true })
vim.keymap.set({ 'v', 't' }, '<s-tab>', '<', { noremap = true, silent = true })
-- Быстрый сдвиг текста в режиме 'ВСТАВКА' (insert) -- Disabling arrows
-- (надо будет проработать в визуальном режиме на множество строк) vim.keymap.set({ 'n', 'i', 'v', 't' }, '<left>', '', { noremap = true, silent = true })
vim.keymap.set({'i', 'v', 't'}, '<tab>', '<cmd>><cr>', {noremap = true, silent = true}) vim.keymap.set({ 'n', 'i', 'v', 't' }, '<up>', '', { 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' }, '<right>', '', { noremap = true, silent = true })
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<down>', '', { noremap = true, silent = true })
-- Отключение стрелок vim.keymap.set({ 'n', 'i', 'v', 't' }, '<s-left>', '', { noremap = true, silent = true })
vim.keymap.set({'n', 'i', 'v', 't'}, '<left>', '', {noremap = true, silent = true}) vim.keymap.set({ 'n', 'i', 'v', 't' }, '<s-up>', '', { noremap = true, silent = true })
vim.keymap.set({'n', 'i', 'v', 't'}, '<up>', '', {noremap = true, silent = true}) vim.keymap.set({ 'n', 'i', 'v', 't' }, '<s-right>', '', { noremap = true, silent = true })
vim.keymap.set({'n', 'i', 'v', 't'}, '<right>', '', {noremap = true, silent = true}) vim.keymap.set({ 'n', 'i', 'v', 't' }, '<s-down>', '', { noremap = true, silent = true })
vim.keymap.set({'n', 'i', 'v', 't'}, '<down>', '', {noremap = true, silent = true}) vim.keymap.set({ 'n', 'i', 'v', 't' }, '<c-left>', '', { noremap = true, silent = true })
vim.keymap.set({'n', 'i', 'v', 't'}, '<s-left>', '', {noremap = true, silent = true}) vim.keymap.set({ 'n', 'i', 'v', 't' }, '<c-up>', '', { noremap = true, silent = true })
vim.keymap.set({'n', 'i', 'v', 't'}, '<s-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'}, '<s-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'}, '<s-down>', '', {noremap = true, silent = true})
vim.keymap.set({'n', 'i', 'v', 't'}, '<c-left>', '', {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-down>', '', {noremap = true, silent = true})
-- Быстрое форматирование всего документа
vim.keymap.set({'n', 'v', 't'}, '<space>F', '1GVG=<cr>', {noremap = true, silent = true})

View File

@@ -1,4 +1,12 @@
require('nvim-autopairs').setup({ -- A super powerful autopair plugin for Neovim that supports multiple characters
map_bs = false, return {
map_cr = false 'windwp/nvim-autopairs',
}) enabled = true,
lazy = true,
event = 'InsertEnter',
opts = {
-- map_bs = false,
-- map_cr = false
},
config = true
}

64
lua/plugins/blink.lua Normal file
View File

@@ -0,0 +1,64 @@
-- Performant, batteries-included completion plugin for Neovim
return {
'saghen/blink.cmp',
enabled = true,
lazy = false,
-- optional: provides snippets for the snippet source
dependencies = { 'rafamadriz/friendly-snippets' },
-- use a release tag to download pre-built binaries
version = '1.*',
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
-- 'super-tab' for mappings similar to vscode (tab to accept)
-- 'enter' for enter to accept
-- 'none' for no mappings
--
-- All presets have the following mappings:
-- C-space: Open menu or open docs if already open
-- C-n/C-p or Up/Down: Select next/previous item
-- C-e: Hide menu
-- C-k: Toggle signature help (if signature.enabled = true)
--
-- See :h blink-cmp-config-keymap for defining your own keymap
keymap = { preset = 'default' },
appearance = {
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- Adjusts spacing to ensure icons are aligned
nerd_font_variant = 'mono'
},
-- (Default) Only show the documentation popup when manually triggered
completion = { documentation = { auto_show = false } },
-- Default list of enabled providers defined so that you can extend it
-- elsewhere in your config, without redefining it, due to `opts_extend`
sources = {
default = { 'lazydev', 'lsp', 'path', 'snippets', 'buffer' },
providers = {
lazydev = {
name = 'LazyDev',
module = 'lazydev.integrations.blink',
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
}
},
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
-- You may use a lua implementation instead by using `implementation = 'lua'` or fallback to the lua implementation,
-- when the Rust fuzzy matcher is not available, by using `implementation = 'prefer_rust'`
--
-- See the fuzzy documentation for more information
fuzzy = { implementation = 'prefer_rust_with_warning' }
},
opts_extend = { 'sources.default' }
}

View File

@@ -1,2 +1,72 @@
require('bufferline').setup({ -- A snazzy 💅 buffer line (with tabpage integration) for Neovim built using lua
}) 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 },
{ '<c-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 = {
-- Provides Nerd Font icons (glyphs) for use by neovim plugins
'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',
}
}
}
}

View File

@@ -1,4 +0,0 @@
-- Настройка "ms-jpq/coq_nvim"
vim.g.coq_settings = {
auto_start = 'shut-up'
}

View File

@@ -1,37 +1,13 @@
require("nvim-dap-virtual-text").setup { -- Virtual text support to nvim-dap
enabled = true, -- enable this plugin (the default) return {
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination) 'theHamsta/nvim-dap-virtual-text',
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText enabled = true,
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables) lazy = true,
show_stop_reason = true, -- show stop reason when stopped for exceptions dependencies = {
commented = false, -- prefix virtual text with comment string -- Debug Adapter Protocol client implementation for Neovim
only_first_definition = true, -- only show virtual text at first definition (if there are multiple) { 'mfussenegger/nvim-dap' },
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping)
--- A callback that determines how a variable is displayed or whether it should be omitted -- Nvim Treesitter configurations and abstraction layer
--- @param variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable { 'nvim-treesitter/nvim-treesitter' }
--- @param buf number }
--- @param stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame
--- @param node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`)
--- @param options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text
--- @return string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed
display_callback = function(variable, buf, stackframe, node, options)
-- by default, strip out new line characters
if options.virt_text_pos == 'inline' then
return ' = ' .. variable.value:gsub("%s+", " ")
else
return variable.name .. ' = ' .. variable.value:gsub("%s+", " ")
end
end,
-- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
-- experimental features:
all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
virt_text_win_col = nil -- position the virtual text at a fixed window column (starting from the first text column) ,
-- e.g. 80 to position at column 80, see `:h nvim_buf_set_extmark()`
} }

32
lua/plugins/dap-ui.lua Normal file
View File

@@ -0,0 +1,32 @@
-- An 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
}

View File

@@ -1,23 +1,40 @@
-- Initialization -- Debug Adapter Protocol client implementation for Neovim
local dap = require('dap') return {
'mfussenegger/nvim-dap',
enabled = true,
lazy = true,
dependencies = {
-- An UI for nvim-dap
{ 'rcarriga/nvim-dap-ui' },
-- Installing C, Rust and C++ -- A library for asynchronous IO in Neovim
dap.configurations.cpp = { { 'nvim-neotest/nvim-nio' },
}
-- Initializing PHP adapter -- Virtual text support to nvim-dap
dap.adapters.php = { { 'theHamsta/nvim-dap-virtual-text' }
type = "executable", },
command = "node", config = function()
args = { os.getenv("HOME") .. "/vscode-php-debug/out/phpDebug.js" } local dap = require('dap')
} require('telescope').load_extension('dap')
-- Installing PHP -- Installing debuggers for C, Rust and C++
dap.configurations.php = { dap.configurations.cpp = {}
{
type = "php", -- Initializing PHP debugger adapter
request = "launch", dap.adapters.php = {
name = "Listen for Xdebug", type = 'executable',
port = 9003 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
} }

View File

@@ -1,19 +0,0 @@
require('dapui').setup()
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

View File

@@ -1,7 +1,15 @@
require('diaglist').init({ -- Live render workspace diagnostics in quickfix with
-- below are defaults -- current buf errors on top, buffer diagnostics in loclist
debug = false, -- @todo удалить и заменить на трабл
return {
-- increase for noisy servers 'onsails/diaglist.nvim',
debounce_ms = 150, enabled = false,
}) 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
}
}

View File

@@ -0,0 +1,175 @@
-- Quickstart configs for Nvim LSP
return {
'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' },
-- Fast as FUCK nvim completion
{ 'ms-jpq/coq_nvim', branch = 'coq' },
-- 9000+ Snippets
{ 'ms-jpq/coq.artifacts', branch = 'artifacts' },
-- Lua & third party sources. Need to **configure separately**
{ 'ms-jpq/coq.thirdparty', branch = '3p' }
},
init = function()
vim.g.coq_settings = {
auto_start = 'shut-up'
}
end,
config = function()
-- @todo навести порядок
-- Активация вещания готовых набросков
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- Инициализация 'ms-jpq/coq_nvim'
local coq = require('coq')
-- Инициализация LSP-серверов
-- Инициализация 'bmewburn/vscode-intelephense' (LSP-сервер для PHP)
vim.lsp.config(
'intelephense',
{
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
}
)
vim.lsp.enable('intelephense')
-- Инициализация 'hrsh7th/vscode-html-language-server' (LSP-сервер для HTML)
vim.lsp.config(
'html',
{
init_options = {
configurationSection = { 'html' },
embeddedLanguages = {
css = false,
javascript = false
},
provideFormatter = true,
},
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
}
)
vim.lsp.enable('html')
-- Инициализация 'aca/emmet-ls' (LSP-сервер для HTML)
vim.lsp.config(
'emmet_ls',
{
init_options = {
html = {
options = {
['bem.enabled'] = true,
},
},
},
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
})
vim.lsp.enable('emmet_ls')
-- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для CSS)
vim.lsp.config(
'cssls',
{
settings = {
css = {
validate = true
},
less = {
validate = true
},
scss = {
validate = true
}
},
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
})
vim.lsp.enable('cssls')
-- Инициализация 'antonk52/cssmodules-language-server' (LSP-сервер для JS, вспомогательный для CSS)
vim.lsp.config(
'cssmodules_ls',
{
init_options = {
camelCase = false,
},
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
})
vim.lsp.enable('cssmodules_ls')
-- Инициализация 'denoland/deno' (LSP-сервер для JavaScript и PostScript)
vim.lsp.config(
'denols',
{
init_options = {
enable = true,
unstable = false
},
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
})
vim.lsp.enable('denols')
-- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для JSON)
vim.lsp.config(
'jsonls',
{
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
})
vim.lsp.enable('jsonls')
-- Инициализация 'luals/lua-language-server' (LSP-сервер для Lua)
vim.lsp.config(
'lua_ls',
{
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = 'LuaJIT',
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { 'vim' },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file('', true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
on_attach = lspconfig_on_attach,
coq.lsp_ensure_capabilities(),
capabilities = capabilities
}
)
vim.lsp.enable('lua_ls')
end,
}

View File

@@ -0,0 +1,7 @@
--[[ -- Форматировщик Prettier
use {
'prettier/vim-prettier',
branch = 'master',
-- run = 'sudo npm i -g',
run = 'yarn install --frozen-lockfile --production'
} ]]

View File

@@ -1,95 +1,7 @@
require('fidget').setup({ -- 💫 Extensible UI for Neovim notifications and LSP progress messages
-- Options related to LSP progress subsystem return {
progress = { 'j-hui/fidget.nvim',
poll_rate = 0, -- How and when to poll for progress messages enabled = true,
suppress_on_insert = false, -- Suppress new messages while in insert mode lazy = true,
ignore_done_already = false, -- Ignore new tasks that are already complete opts = {}
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")),
}
})

View File

@@ -1,77 +1,84 @@
-- Initializing -- Inky color scheme
local flexoki = require('flexoki') -- 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,
-- Installing enable = {
flexoki.setup({ terminal = true,
variant = "auto", -- auto, moon, or dawn },
dim_inactive_windows = false,
extend_background_behind_borders = true,
enable = { styles = {
terminal = true, bold = true,
}, italic = false,
},
styles = { groups = {
bold = true, border = 'muted',
italic = false, link = 'purple_two',
}, panel = 'surface',
groups = { error = 'red_one',
border = "muted", hint = 'purple_one',
link = "purple_two", info = 'cyan_one',
panel = "surface", ok = 'green_one',
warn = 'orange_one',
note = 'blue_one',
todo = 'magenta_one',
error = "red_one", git_add = 'green_one',
hint = "purple_one", git_change = 'yellow_one',
info = "cyan_one", git_delete = 'red_one',
ok = "green_one", git_dirty = 'yellow_one',
warn = "orange_one", git_ignore = 'muted',
note = "blue_one", git_merge = 'purple_one',
todo = "magenta_one", git_rename = 'blue_one',
git_stage = 'purple_one',
git_text = 'magenta_one',
git_untracked = 'subtle',
git_add = "green_one", h1 = 'purple_two',
git_change = "yellow_one", h2 = 'cyan_two',
git_delete = "red_one", h3 = 'magenta_two',
git_dirty = "yellow_one", h4 = 'orange_two',
git_ignore = "muted", h5 = 'blue_two',
git_merge = "purple_one", h6 = 'cyan_two',
git_rename = "blue_one", },
git_stage = "purple_one",
git_text = "magenta_one",
git_untracked = "subtle",
h1 = "purple_two", palette = {
h2 = "cyan_two", -- Override the builtin palette per variant
h3 = "magenta_two", -- moon = {
h4 = "orange_two", -- base = '#100f0f',
h5 = "blue_two", -- overlay = '#1c1b1a',
h6 = "cyan_two", -- },
}, },
palette = { highlight_groups = {
-- Override the builtin palette per variant -- Comment = { fg = 'subtle' },
-- moon = { -- VertSplit = { fg = 'muted', bg = 'muted' },
-- base = '#100f0f', },
-- overlay = '#1c1b1a',
-- },
},
highlight_groups = { before_highlight = function(group, highlight, palette)
-- Comment = { fg = "subtle" }, -- Disable all undercurls
-- VertSplit = { fg = "muted", bg = "muted" }, -- if highlight.undercurl then
}, -- highlight.undercurl = false
-- end
before_highlight = function(group, highlight, palette) --
-- Disable all undercurls -- Change palette colour
-- if highlight.undercurl then -- if highlight.fg == palette.blue_two then
-- highlight.undercurl = false -- highlight.fg = palette.cyan_two
-- end -- end
-- end,
-- Change palette colour },
-- if highlight.fg == palette.blue_two then config = function()
-- highlight.fg = palette.cyan_two -- Activating
-- end vim.cmd('colorscheme flexoki')
end,}) end
}
-- Activating
vim.cmd("colorscheme flexoki-moon")

View File

@@ -1,43 +1,51 @@
require('gitsigns').setup { -- Git integration for buffers
on_attach = gitsigns_on_attach, -- todo навести порядок
signs = { return {
add = { text = '' }, 'lewis6991/gitsigns.nvim',
change = { text = '' }, enabled = true,
delete = { text = '_' }, lazy = true,
topdelete = { text = '' }, opts = {
changedelete = { text = '~' }, on_attach = gitsigns_on_attach,
untracked = { text = '' }, signs = {
}, add = { text = '' },
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` change = { text = '' },
numhl = false, -- Toggle with `:Gitsigns toggle_numhl` delete = { text = '_' },
linehl = false, -- Toggle with `:Gitsigns toggle_linehl` topdelete = { text = '' },
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` changedelete = { text = '~' },
watch_gitdir = { untracked = { text = '' },
interval = 1000, },
follow_files = true signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
}, numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
attach_to_untracked = true, linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
current_line_blame_opts = { watch_gitdir = {
virt_text = true, interval = 1000,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' follow_files = true
delay = 1000, },
ignore_whitespace = false, attach_to_untracked = true,
}, current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>', current_line_blame_opts = {
sign_priority = 6, virt_text = true,
update_debounce = 100, virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
status_formatter = nil, -- Use default delay = 1000,
max_file_length = 40000, -- Disable if file is longer than this (in lines) ignore_whitespace = false,
preview_config = { },
-- Options passed to nvim_open_win current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
border = 'single', sign_priority = 6,
style = 'minimal', update_debounce = 100,
relative = 'cursor', status_formatter = nil, -- Use default
row = 0, max_file_length = 40000, -- Disable if file is longer than this (in lines)
col = 1 preview_config = {
}, -- Options passed to nvim_open_win
yadm = { border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
--[[ yadm = {
enable = false enable = false
}, }, ]]
}
} }

View File

@@ -0,0 +1,14 @@
-- 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
}

13
lua/plugins/lazydev.lua Normal file
View File

@@ -0,0 +1,13 @@
-- Faster LuaLS setup for Neovim
return {
'folke/lazydev.nvim',
enabled = true,
lazy = false,
ft = 'lua',
opts = {
library = {
-- Load luvit types when the `vim.uv` word is found
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
},
}
}

View File

@@ -1,5 +1,14 @@
vim.api.nvim_create_autocmd({ 'BufWritePost' }, { -- An asynchronous linter plugin for Neovim complementary
callback = function() -- to the built-in Language Server Protocol support.
require('lint').try_lint() return {
end, 'mfussenegger/nvim-lint',
}) enabled = true,
lazy = true,
config = function()
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
callback = function()
require('lint').try_lint()
end
})
end
}

View File

@@ -1,120 +1,156 @@
-- Инициализация "neovim/nvim-lspconfig" -- Quickstart configs for Nvim LSP
local lspconfig = require('lspconfig') return {
'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' },
-- Активация вещания готовых набросков -- A completion plugin for neovim coded in Lua.
local capabilities = vim.lsp.protocol.make_client_capabilities() { 'hrsh7th/nvim-cmp' },
capabilities.textDocument.completion.completionItem.snippetSupport = true
-- Инициализация "ms-jpq/coq_nvim" -- 💫 Extensible UI for Neovim notifications and LSP progress messages
local coq = require('coq') { 'j-hui/fidget.nvim' }
},
init = function()
end,
config = function()
-- @todo навести порядок
-- Инициализация LSP-серверов -- Активация вещания готовых набросков
local capabilities = require('cmp_nvim_lsp').default_capabilities()
-- Инициализация LSP-серверов
-- Инициализация "bmewburn/vscode-intelephense" (LSP-сервер для PHP) -- Инициализация 'bmewburn/vscode-intelephense' (LSP-сервер для PHP)
lspconfig.intelephense.setup({ vim.lsp.config(
on_attach = lspconfig_on_attach, 'intelephense',
coq.lsp_ensure_capabilities(), {
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
}
)
vim.lsp.enable('intelephense')
-- Инициализация "hrsh7th/vscode-html-language-server" (LSP-сервер для HTML) -- Инициализация 'hrsh7th/vscode-html-language-server' (LSP-сервер для HTML)
lspconfig.html.setup({ vim.lsp.config(
init_options = { 'html',
configurationSection = { 'html' }, {
embeddedLanguages = { init_options = {
css = false, configurationSection = { 'html' },
javascript = false embeddedLanguages = {
}, css = false,
provideFormatter = true, javascript = false
}, },
on_attach = lspconfig_on_attach, provideFormatter = true,
coq.lsp_ensure_capabilities(), },
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
}
)
vim.lsp.enable('html')
-- Инициализация "aca/emmet-ls" (LSP-сервер для HTML) -- Инициализация 'aca/emmet-ls' (LSP-сервер для HTML)
lspconfig.emmet_ls.setup({ vim.lsp.config(
init_options = { 'emmet_ls',
html = { {
options = { init_options = {
["bem.enabled"] = true, html = {
}, options = {
}, ['bem.enabled'] = true,
}, },
on_attach = lspconfig_on_attach, },
coq.lsp_ensure_capabilities(), },
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
})
vim.lsp.enable('emmet_ls')
-- Инициализация "hrsh7th/vscode-langservers-extracted" (LSP-сервер для CSS) -- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для CSS)
lspconfig.cssls.setup({ vim.lsp.config(
settings = { 'cssls',
css = { {
validate = true settings = {
}, css = {
less = { validate = true
validate = true },
}, less = {
scss = { validate = true
validate = true },
} scss = {
}, validate = true
on_attach = lspconfig_on_attach, }
coq.lsp_ensure_capabilities(), },
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
})
vim.lsp.enable('cssls')
-- Инициализация "antonk52/cssmodules-language-server" (LSP-сервер для JS, вспомогательный для CSS) -- Инициализация 'antonk52/cssmodules-language-server' (LSP-сервер для JS, вспомогательный для CSS)
lspconfig.cssmodules_ls.setup({ vim.lsp.config(
init_options = { 'cssmodules_ls',
camelCase = false, {
}, init_options = {
on_attach = lspconfig_on_attach, camelCase = false,
coq.lsp_ensure_capabilities(), },
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
})
vim.lsp.enable('cssmodules_ls')
-- Инициализация "denoland/deno" (LSP-сервер для JavaScript и PostScript) -- Инициализация 'denoland/deno' (LSP-сервер для JavaScript и PostScript)
lspconfig.denols.setup({ vim.lsp.config(
init_options = { 'denols',
enable = true, {
unstable = false init_options = {
}, enable = true,
on_attach = lspconfig_on_attach, unstable = false
coq.lsp_ensure_capabilities(), },
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
})
vim.lsp.enable('denols')
-- Инициализация "hrsh7th/vscode-langservers-extracted" (LSP-сервер для JSON) -- Инициализация 'hrsh7th/vscode-langservers-extracted' (LSP-сервер для JSON)
lspconfig.jsonls.setup({ vim.lsp.config(
on_attach = lspconfig_on_attach, 'jsonls',
coq.lsp_ensure_capabilities(), {
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
})
vim.lsp.enable('jsonls')
-- Инициализация "luals/lua-language-server" (LSP-сервер для Lua) -- Инициализация 'luals/lua-language-server' (LSP-сервер для Lua)
lspconfig.lua_ls.setup({ vim.lsp.config(
settings = { 'lua_ls',
Lua = { {
runtime = { settings = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) Lua = {
version = 'LuaJIT', runtime = {
}, -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
diagnostics = { version = 'LuaJIT',
-- Get the language server to recognize the `vim` global },
globals = { 'vim' }, diagnostics = {
}, -- Get the language server to recognize the `vim` global
workspace = { globals = { 'vim' },
-- Make the server aware of Neovim runtime files },
library = vim.api.nvim_get_runtime_file("", true), workspace = {
}, -- Make the server aware of Neovim runtime files
-- Do not send telemetry data containing a randomized but unique identifier library = vim.api.nvim_get_runtime_file('', true),
telemetry = { },
enable = false, -- Do not send telemetry data containing a randomized but unique identifier
}, telemetry = {
}, enable = false,
}, },
on_attach = lspconfig_on_attach, },
coq.lsp_ensure_capabilities(), },
capabilities = capabilities on_attach = lspconfig_on_attach,
}) capabilities = capabilities
}
)
vim.lsp.enable('lua_ls')
end,
}

View File

@@ -1,44 +1,10 @@
require('lspkind').init({ -- VSCodestyle pictograms for Neovim completion items
-- defines how annotations are shown return {
-- default: symbol 'onsails/lspkind-nvim',
-- options: 'text', 'text_symbol', 'symbol_text', 'symbol' enabled = true,
mode = 'symbol_text', lazy = true,
opts = {
-- default symbol map mode = 'symbol',
-- can be either 'default' (requires nerd-fonts font) or preset = 'default',
-- '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 = ""
},
})

View File

@@ -1,72 +1,128 @@
require('lualine').setup { -- stylua: ignore
options = { local colors = {
icons_enabled = true, blue = '#80a0ff',
theme = 'auto', cyan = '#79dac8',
component_separators = { left = '', right = ''}, black = '#080808',
section_separators = { left = '', right = ''}, white = '#c6c6c6',
disabled_filetypes = { red = '#ff5189',
statusline = {}, violet = '#d183e8',
winbar = {}, grey = '#303030',
}, }
ignore_focus = {},
always_divide_middle = true, local bubbles_theme = {
always_show_tabline = true, normal = {
globalstatus = false, a = { fg = colors.black, bg = colors.violet },
refresh = { b = { fg = colors.white, bg = colors.grey },
statusline = 100, c = { fg = colors.white },
tabline = 100, },
winbar = 100,
} insert = { a = { fg = colors.black, bg = colors.blue } },
}, visual = { a = { fg = colors.black, bg = colors.cyan } },
sections = { replace = { a = { fg = colors.black, bg = colors.red } },
lualine_a = {
{ inactive = {
'mode', a = { fg = colors.white, bg = colors.black },
icons_enabled = true, b = { fg = colors.white, bg = colors.black },
icon = nil, c = { fg = colors.white },
separator = nil, },
cond = nil, }
color = nil,
--type = var(g:coc_status/bo:modifiable), -- A blazing fast and easy to configure
padding = 1, -- neovim statusline plugin written in pure lua
fmt = nil, -- @todo навести порядок
on_click = nil, return {
} 'nvim-lualine/lualine.nvim',
}, enabled = true,
lualine_b = { lazy = false,
'branch', priority = 80,
'diff', dependencies = {
{ -- Provides Nerd Font icons (glyphs) for use by neovim plugins
'diagnostics', { 'nvim-tree/nvim-web-devicons' },
sources = { 'coc' },
sections = { 'error', 'warn', 'info', 'hint' }, -- LSP Progress lualine componenet
diagnostics_color = { { 'arkav/lualine-lsp-progress' },
error = 'DiagnosticError',
warn = 'DiagnosticWarn', -- A Git wrapper so awesome, it should be illegal
info = 'DiagnosticInfo', { 'tpope/vim-fugitive' }
hint = 'DiagnosticHint', },
}, config = function()
symbols = {error = 'E', warn = 'W', info = 'I', hint = 'H'}, require('lualine').setup {
colored = true, options = {
update_in_insert = false, icons_enabled = true,
always_visible = false theme = 'auto',
} component_separators = { left = '', right = '' },
}, section_separators = { left = '', right = '' },
lualine_c = {'filename', 'lsp_progress'}, disabled_filetypes = {
lualine_x = {'encoding', 'fileformat', 'filetype'}, statusline = {},
lualine_y = {'progress'}, winbar = {},
lualine_z = {'location'} },
}, ignore_focus = {},
inactive_sections = { always_divide_middle = true,
lualine_a = {}, always_show_tabline = true,
lualine_b = {}, globalstatus = true,
lualine_c = {'filename'}, refresh = {
lualine_x = {'location'}, statusline = 1000,
lualine_y = {}, tabline = 1000,
lualine_z = {} winbar = 1000,
}, refresh_time = 16, -- ~60fps
tabline = {}, events = {
winbar = {}, 'WinEnter',
inactive_winbar = {}, 'BufEnter',
extensions = {'nvim-dap-ui', 'trouble', 'neo-tree'} 'BufWritePost',
'SessionLoadPost',
'FileChangedShellPost',
'VimResized',
'Filetype',
'CursorMoved',
'CursorMovedI',
'ModeChanged',
},
}
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff' },
lualine_c = { 'filename', 'lsp_progress' },
lualine_x = { 'encoding', 'fileformat', 'filetype' },
-- lualine_x = { FugitiveStatusline, 'encoding', 'fileformat', 'filetype'},
-- lualine_x = { FugitiveHead, 'encoding', 'fileformat', 'filetype'},
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { 'filename' },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
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 ]]
end
} }

View File

@@ -1,7 +1,9 @@
-- Инициализация плагина -- Create Neovim themes with real-time feedback, export anywhere
local lush = require('lush') return {
'rktjmp/lush.nvim',
-- Инициализация ссылки на палитру enabled = true,
local hsl = lush.hsl lazy = false,
priority = 100,
-- Тема будет разработана позднее - не до неё сейчас -- if you wish to use your own colorscheme:
-- { dir = '/absolute/path/to/colorscheme', lazy = true },
}

View File

@@ -1,48 +1,29 @@
local highlights = require("neo-tree.ui.highlights") -- Neovim plugin to manage the file system
-- and other tree like structures
return {
'nvim-neo-tree/neo-tree.nvim',
enabled = true,
lazy = true,
keys = {
{ '<f1>', '<cmd>Neotree toggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'NeoTree toggle', noremap = true, silent = true },
},
branch = 'v3.x',
dependencies = {
-- Lua functions
{ 'nvim-lua/plenary.nvim' },
require('neo-tree').setup({ -- Provides Nerd Font icons (glyphs) for use by neovim plugins
filesystem = { { 'nvim-tree/nvim-web-devicons' },
components = {
--[[
icon = function(config, node, state)
local icon = config.default or ' '
local padding = config.padding or ' '
local highlight = config.highlight or highlights.FILE_ICON
if node.type == 'directory' then -- UI Component Library for Neovim
highlight = highlights.DIRECTORY_ICON { 'MunifTanjim/nui.nvim' },
if node:is_expanded() then },
icon = config.folder_open or '-' opts = {
else close_if_last_window = true,
icon = config.folder_closed or '+' clipboard = {
end sync = "global"
elseif node.type == 'file' then },
local success, web_devicons = pcall(require, 'nvim-web-devicons') enable_git_status = true,
if success then enable_diagnostics = true
local devicon, hl = web_devicons.get_icon(node.name, node.ext) }
icon = devicon or icon }
highlight = hl or highlight
end
end
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,
}
}
}
})

6
lua/plugins/nginx.lua Normal file
View File

@@ -0,0 +1,6 @@
-- Improved nginx vim plugin (incl. syntax highlighting)
return {
'chr4/nginx.vim',
enabled = true,
lazy = true
}

View File

@@ -0,0 +1,15 @@
-- Git source for nvim-cmp
return {
'petertriho/cmp-git',
enabled = true,
lazy = true,
dependencies = {
-- A completion plugin for neovim coded in Lua.
{ 'hrsh7th/nvim-cmp' }
},
opts = {
},
init = function()
table.insert(require('cmp').get_config().sources, { name = 'git' })
end
}

View File

@@ -0,0 +1,14 @@
-- A completion plugin for neovim coded in Lua.
return {
'hrsh7th/cmp-nvim-lsp',
enabled = true,
lazy = true,
dependencies = {
-- A completion plugin for neovim coded in Lua.
{ 'hrsh7th/nvim-cmp' }
},
opts = {
},
init = function()
end
}

29
lua/plugins/nvim-cmp.lua Normal file
View File

@@ -0,0 +1,29 @@
-- A completion plugin for neovim coded in Lua.
return {
'hrsh7th/nvim-cmp',
enabled = true,
lazy = true,
dependencies = {
-- nvim-cmp source for neovim builtin LSP client
{ 'hrsh7th/cmp-nvim-lsp' },
-- Git source for nvim-cmp
{ 'petertriho/cmp-git' },
},
opts = function(_, opts)
opts.sources = opts.sources or {}
table.insert(opts.sources, {
name = 'lazydev',
group_index = 0, -- set group index to 0 to skip loading LuaLS completions
})
table.insert(opts.sources, {
name = 'nvim_lsp'
})
table.insert(opts.sources, {
name = 'git'
})
end,
}

View File

@@ -1,6 +1,12 @@
require('nvim-web-devicons').setup { -- Provides Nerd Font icons (glyphs) for use by neovim plugins
override = {}, return {
color_icons = true, 'nvim-tree/nvim-web-devicons',
default = true, enabled = true,
strict = true lazy = false,
priority = 110,
opts = {
color_icons = true,
default = true,
strict = true
}
} }

View File

@@ -1,219 +0,0 @@
-- Инициализация
vim.cmd('packadd packer.nvim')
return require('packer').startup(function(use)
-- Менеджер плагинов Packer (автообновление)
use 'wbthomason/packer.nvim'
-- Flexoki colorscheme
use {
'nuvic/flexoki-nvim',
config = function() require('plugins/flexoki') end
}
-- Быстрая настройка 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'
-- Автозавершение
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
}
-- Functions for Telescope
use 'nvim-lua/plenary.nvim'
-- DAP integration for Telescope
use 'nvim-telescope/telescope-dap.nvim'
-- Fuzzy finder over lists (find, filter, preview, pick)
use {
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
requires = {'nvim-lua/plenary.nvim'},
config = function() require('plugins/telescope') end
}
-- UI for Treesitter
use {
'nvim-treesitter/nvim-treesitter',
config = function() require('plugins/treesitter') end,
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
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',
branch = 'master',
-- run = 'sudo npm i -g',
run = 'yarn install --frozen-lockfile --production'
}
-- Debug Adapter Protocol client implementation --
use {
'mfussenegger/nvim-dap',
config = function() require('plugins/dap') end
}
-- Asynchronous IO --
use 'nvim-neotest/nvim-nio'
-- UI for DAP client implementation --
use {
'rcarriga/nvim-dap-ui',
requires = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"},
config = function() require('plugins/dapui') end
}
-- Virtual text support for DAP client implementation and Treesitter --
use {
'theHamsta/nvim-dap-virtual-text',
config = function() require('plugins/dap-text') end
}
end)

76
lua/plugins/reticle.lua Normal file
View File

@@ -0,0 +1,76 @@
-- Highlight only the screen line of the cursor
-- in the currently active window
return {
'tummetott/reticle.nvim',
enabled = true,
lazy = true,
event = 'VeryLazy',
opts = {
-- Enable/Disable the cursorline and/or cursorcolumn at startup
on_startup = {
cursorline = true,
cursorcolumn = false,
},
-- Disable the cursorline and cursorcolumn in insert mode
disable_in_insert = false,
-- Disable the cursorline and cursorcolumn in diff mode
disable_in_diff = false,
-- By default, nvim highlights the cursorline number only when the
-- cursorline setting is active. Enabling this setting ensures that the
-- cursorline number in every window is always highlighted, regardless of
-- the cursorline setting. See: ':h cursorlineopt'
always_highlight_number = false,
-- Cursorline and/or cursorcolumn are set to be displayed exclusively in
-- the active window, thus following your active window. This setting is
-- overruled by the following settings concerning special filetypes.
follow = {
cursorline = true,
cursorcolumn = true,
},
-- Specify filetypes where the cursorline and/or cursorcolumn are always
-- enabled, regardless of the global setting.
always = {
cursorline = {},
cursorcolumn = {},
},
-- Specify filetypes where the cursorline and/or cursorcolumn are always
-- enabled when the window is focused, regardless of the global setting.
on_focus = {
cursorline = {},
cursorcolumn = {},
},
-- Define filetypes which are ignored by the plugin
ignore = {
cursorline = {
'DressingInput',
'FTerm',
'NvimSeparator',
'NvimTree',
'neo-tree',
'TelescopePrompt',
'Trouble',
},
cursorcolumn = {
'neo-tree',
},
},
-- Specify filetypes where the cursorline and/or cursorcolumn should be
-- explicitly disabled. Typically, you would include these filetypes in
-- the 'ignored' table. However, there are situations where plugins enable
-- cursorline/cursorcolumn without offering a configuration option for
-- disabling them. By adding these filetypes to the 'never' table, you
-- can override the plugin's settings and turn off these features.
never = {
cursorline = {},
cursorcolumn = {},
}
}
}

View File

@@ -1,4 +0,0 @@
require('symbols-outline').setup({
--auto_preview = true,
--show_numbers = true
})

16
lua/plugins/tagbar.lua Normal file
View File

@@ -0,0 +1,16 @@
-- 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' }
}
}

View File

@@ -1,27 +1,32 @@
-- Initializing -- Find, Filter, Preview, Pick. All lua, all the time
local telescope = require('telescope'); -- Gaze deeply into unknown regions using the power of the moon
return {
'nvim-telescope/telescope.nvim',
enabled = true,
lazy = true,
keys = {
{ '<c-f>', '<cmd>Telescope find_files<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Search files', noremap = true, silent = true },
{ '<c-g>', '<cmd>Telescope live_grep<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Grep files', noremap = true, silent = true },
{ '<leader><tab>', '<cmd>Telescope buffers<cr>', mode = { 'n', 'v', 't' }, desc = 'Search buffers', noremap = true, silent = true },
{ '<leader>?', '<cmd>Telescope help_tags<cr>', mode = { 'n', 'v', 't' }, desc = 'Help', noremap = true, silent = true },
},
dependencies = {
-- Functions for Telescope
{ 'nvim-lua/plenary.nvim' },
-- Installing -- Integration for nvim-dap with telescope.nvim
telescope.setup { { 'nvim-telescope/telescope-dap.nvim' }
pickers = { },
-- Default configuration for builtin picikers goes here: opts = {
-- picker_name = { exteinsions = {
-- picker_configi_key = value, dap = {}
-- ... }
-- } },
-- Now the picker_config_key will be applied every time you call this config = function()
-- builtin picker -- Initializing telescope
}, local telescope = require('telescope')
exteinsiions = { -- Loading extensions
-- Your extensioni configuration goes here: telescope.load_extension('dap')
-- extension_name = { end
-- extension_config_key = value,
-- }
-- please take a look at the readme of the extension you want to configure
dap = {}
}
} }
-- Loading extensions
telescope.load_extension('dap')

View File

@@ -1,7 +1,14 @@
require('nvim-treesitter.configs').setup { -- Nvim Treesitter configurations and abstraction layer
highlight = { return {
enable = true, 'nvim-treesitter/nvim-treesitter',
-- additional_vim_regex_highlighting = false enabled = true,
additional_vim_regex_highlighting = true lazy = false,
}, priority = 40,
build = ':TSUpdate',
opts = {
highlight = {
enable = true,
additional_vim_regex_highlighting = true
}
}
} }

View File

@@ -1,65 +1,19 @@
require('trouble').setup({ -- 🚦 A pretty diagnostics, references, telescope results,
position = "bottom", -- position of the list can be: bottom, top, left, right -- quickfix and location list to help you solve
height = 10, -- height of the trouble list when position is top or bottom -- all the trouble your code is causing
width = 50, -- width of the list when position is left or right return {
icons = true, -- use devicons for filenames 'folke/trouble.nvim',
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist" enabled = true,
fold_open = "", -- icon used for open folds lazy = false,
fold_closed = "", -- icon used for closed folds cmd = 'Trouble',
group = true, -- group results by file keys = {
padding = true, -- add an extra new line on top of the list { '<f3>', '<cmd>Trouble diagnostics toggle<cr>', mode = { 'n', 'i', 'v', 't' }, desc = 'Diagnostics (Trouble)', noremap = true, silent = true },
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
}, },
indent_lines = true, -- add an indent guide below the fold icons dependencies = {
auto_open = false, -- automatically open the list when you have diagnostics -- Nvim Treesitter configurations and abstraction layer
auto_close = false, -- automatically close the list when you have no diagnostics { 'nvim-treesitter/nvim-treesitter' },
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
})
-- Initializing Telescope -- Provides Nerd Font icons (glyphs) for use by neovim plugins
local telescope = require("telescope") { 'nvim-tree/nvim-web-devicons' }
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 },
},
},
})

6
lua/plugins/vim-fish.lua Normal file
View File

@@ -0,0 +1,6 @@
-- Run your tests at the speed of thought
return {
'vim-test/vim-test',
enabled = true,
lazy = true
}

View File

@@ -0,0 +1,6 @@
-- A Git wrapper so awesome, it should be illegal
return {
'tpope/vim-fugitive',
enabled = true,
lazy = true
}

View File

@@ -0,0 +1,6 @@
-- Show a diff using Vim its sign column
return {
'mhinz/vim-signify',
enabled = true,
lazy = true
}

View File

@@ -0,0 +1,6 @@
-- Vim support for editing fish scripts
return {
'dag/vim-fish',
enabled = true,
lazy = true
}

15
lua/plugins/which-key.lua Normal file
View File

@@ -0,0 +1,15 @@
-- 💥 Create key bindings that stick. WhichKey helps you remember your Neovim keymaps,
-- by showing available keybindings in a popup as you type.
return {
'folke/which-key.nvim',
event = 'VeryLazy',
opts = {
preset = 'helix',
triggers = {
{ '<auto>', mode = { 'n', 'i', 'v', 't' } },
}
},
keys = {
-- { '<leader><leader>', function() require('which-key').show({ global = false }) end, mode = { 'n' }, desc = 'Buffer Local Keymaps (which-key)', noremap = true, silent = true },
},
}

40
lua/settings/lazy.lua Normal file
View File

@@ -0,0 +1,40 @@
-- 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
},
})

View File

@@ -1,3 +1,7 @@
-- Leader button
vim.g.mapleader = '`'
vim.g.maplocalleader = '\\'
-- Использовать системный буфер обмена -- Использовать системный буфер обмена
vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
@@ -28,9 +32,7 @@ vim.opt_local.cursorcolumn = true
-- Theme -- Theme
vim.opt.background = "dark" vim.opt.background = "dark"
-- Colorscheme -- Colorscheme @see plugin "flexoki"
-- vim.cmd.colorscheme('default')
-- vim.cmd.colorscheme('koehler')
vim.cmd.colorscheme('vim') vim.cmd.colorscheme('vim')
-- Добавление ru_RU (переключать через <c-^>) -- Добавление ru_RU (переключать через <c-^>)
@@ -46,5 +48,9 @@ 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')

55
lua/trouble.lua Normal file
View File

@@ -0,0 +1,55 @@
-- 🚦 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
}