Compare commits

...

12 Commits

5 changed files with 95 additions and 29 deletions

View File

@ -1,3 +1,26 @@
# nvim
# NVIM by MIRZAEV
My settings, keymaps and plugins for NeoVim 😼<br>
<small><i>The installer only works with [fish](https://fishshell.com/) and [ubuntu](https://ubuntu.com/)</i></small>
My settings, keymaps and plugins for NeoVim
# Install
### Send these commands
1. `cd ~/.config`
2. `git clone https://git.svoboda.works/mirzaev/nvim`
3. `cd nvim`
4. `./install.sh -u`
### Open nvim and then
1. `:PackerSync`
2. `:PackerSync` (yeah, again)
3. `:TSInstall fish php html css javascript` (add your languages here)
4. `:COQdeps`
<small><b>Have fun!</b></small>
# Installer screenshots
![help.png](/examples/help.png)
![help.png](/examples/process.png)
# NVIM screenshots
later

BIN
examples/help.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
examples/process.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -4,6 +4,11 @@
set -l options (fish_opt -s v -l verbose)
set options $options (fish_opt -s f -l force)
set options $options (fish_opt -s u -l update)
set options $options (fish_opt -s h -l help)
# Initializing settings
set NODEJS_VERSION 23
set NVIM_WIKI_INSTALLATION "https://github.com/neovim/neovim/wiki/Installing-Neovim/921fe8c40c34dd1f3fb35d5b48c484db1b8ae94b"
# Reading the flags
argparse $options -- $argv
@ -11,25 +16,15 @@ argparse $options -- $argv
# Initializing the buffer of output
set -l output (if set -q _flag_verbose; echo '/dev/tty'; else; echo '/dev/null'; end)
if set -q _flag_update
begin
# need to rewrite in future (бляяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяя)
sudo apt install -y npm python3.10-venv ruby-dev pkg-config
python3 -m pip install --upgrade pip
fish_add_path ~/.local/bin
pip3 install --upgrade pynvim
sudo gem install neovim
# Install NeoVim module for NPM
sudo npm i -g neovim
end &> $output
end
# Инициализация текста сообщений в зависимости от установленного языка в оболочке
if test (string match -ri "ru" "$LANG")
function print -a TYPE PARAM1 PARAM2 -d "Текст сообщений"
switch $TYPE
case PACKER_INSTALL
function print -a TYPE PARAM1 PARAM2 -d "Текст сообщений"
switch $TYPE
case HELP
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
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) ";
@ -83,7 +78,11 @@ if test (string match -ri "ru" "$LANG")
end
else
function print -a TYPE PARAM1 PARAM2 -d "Messages text"
switch $TYPE
switch $TYPE
case HELP
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
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
@ -105,7 +104,7 @@ else
case LSP_CSSMODULES_INSTALL
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for CSS (formatter)? (\"antonk52/cssmodules-language-server\") (y/N) ";
case LSP_CSSMODULES_INSTALLED
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Install the LSP-server for CSS (formatter) (\"antonk52/cssmodules-language-server\")";
set_color yellow; echo -n "[mirzaev/nvim] "; set_color green; echo -n "[WORK] "; set_color white; echo "Installed the LSP-server for CSS (formatter) (\"antonk52/cssmodules-language-server\")";
case LSP_DENO_INSTALL
set_color yellow; echo -n "[mirzaev/nvim] "; set_color blue; echo -n "[TASK] "; set_color white; echo "Install the LSP-server for JavaScript and PostScript? (\"denoland/deno\") (y/N) ";
case LSP_DENO_INSTALLED
@ -138,6 +137,49 @@ else
end
end
if set -q _flag_help
# Sending the message
print HELP
# Exit (success)
return 0
end
if not type -q nvim
# Sending the message
print NVIM_NOT_INSTALLED
echo $NVIM_WIKI_INSTALLATION
# Exit (fail)
return 1
end
if set -q _flag_update
begin
# Downloading and installing fnm (for NodeJS)
curl -o- https://fnm.vercel.app/install | bash
# Initializing fnm
source /home/mirzaev/.config/fish/conf.d/fnm.fish
# Downloadind and installing Node.js:
fnm install $NODEJS_VERSION
# need to rewrite in future (бляяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяяя)
sudo apt install -y npm python3-venv python3-pip rubygems ruby-dev pkg-config
python3 -m ~/.local/bin/pip install --upgrade pip
fish_add_path ~/.local/bin
~/.local/bin/pip install --upgrade pynvim
sudo gem install neovim
# Install NeoVim module for NPM
npm i -g neovim
end &> $output
end
# Initializing the virtual environment for Python packages
python3 -m venv ~/.local --system-site-packages
if not set -q _flag_force
# Installation request
set RESPONSE (read -n 1 -p "print PACKER_INSTALL")
@ -192,7 +234,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
begin
# Установка
sudo npm i -g intelephense
npm i -g intelephense
end &> $output
print LSP_INTELEPHENSE_INSTALLED
@ -209,7 +251,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
begin
# Установка
sudo npm i -g vscode-langservers-extracted
npm i -g vscode-langservers-extracted
end &> $output
print LSP_VSCODE-LANGSERVERS_INSTALLED
@ -226,7 +268,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
begin
# Установка
sudo npm i -g emmet-ls
npm i -g emmet-ls
end &> $output
print LSP_EMMET_INSTALLED
@ -243,7 +285,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
begin
# Установка
sudo npm i -g cssmodules-language-server
npm i -g cssmodules-language-server
end &> $output
print LSP_CSSMODULES_INSTALLED
@ -287,7 +329,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
rm -rf lua-language-server
git clone https://github.com/LuaLS/lua-language-server
cd lua-language-server
fish ./make.sh
bash ./make.sh
fish_add_path $HOME/lua-language-server/bin
end &> $output
@ -305,7 +347,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
begin
# Установка
sudo npm i -g nginxbeautifier
npm i -g nginxbeautifier
end &> $output
print FORMATTER_NGINX_INSTALLED
@ -322,7 +364,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
begin
npm i prettier
sudo npm i -g prettier
npm i -g prettier
end &> $output
print FORMATTER_PRETTIER_INSTALLED
@ -345,6 +387,7 @@ if set -q _flag_force; or test (string match -ri 'y' "$RESPONSE")
wget "https://github.com/ryanoasis/nerd-fonts/releases/download/v3.1.1/FiraCode.zip"
unzip -o FiraCode.zip
rm FiraCode.zip
sudo apt install fontconfig
fc-cache -f -v
end &> $output

View File

@ -1,6 +1,6 @@
--[[ nvim-neo-tree/neo-tree ]]
-- Открыть интерфейс с древовидным отображением файлов
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f1>', '<cmd>NeoTreeRevealToggle<cr>', { noremap = true })
vim.keymap.set({ 'n', 'i', 'v', 't' }, '<f1>', '<cmd>Neotree toggle<cr>', { noremap = true })
-- [[ folke/trouble.nvim ]]