Vim configuration

Recently, I switched back from NeoVim to Vim9. To use this configuration, install the moonfly colorscheme and lsp support plugin for vim9.

mkdir -p ~/.vim/pack/{colors/start,plugins/opt}
git clone https://github.com/bluz71/vim-moonfly-colors ~/.vim/pack/colors/start/moonfly
git clone https://github.com/yegappan/lsp ~/.vim/pack/plugins/opt/lsp

.vimrc

set nocompatible
syntax on
set termguicolors
colorscheme moonfly
set nu
set ts=4
set sw=4
set ai
set keymap=russian-jcukenwin
set iminsert=0
set imsearch=0
set spelllang=en_us,ru_ru
set mouse=a

noremap <leader>gf :hide e <cfile><cr>
noremap <leader><space> ciw[.md]<esc>3hP
source ~/.vim/lsp.vim

~/.vim/lsp.vim

packadd lsp
call LspAddServer([#{
    \    name: 'clangd',
    \    filetype: ['c', 'cpp'],
    \    path: '/usr/bin/clangd',
    \    args: ['--background-index']
    \  }])
call LspAddServer([#{
    \    name: 'golang',
    \    filetype: ['go', 'gomod'],
    \    path: '/usr/bin/gopls',
    \    args: ['serve'],
    \    syncInit: v:true
    \  }])
call LspAddServer([#{
    \   name:'pylsp',
    \   filetype: 'python',
    \   path:'/usr/bin/pylsp',
    \   args: []
    \ }])