set autoindent expandtab tabstop=4 shiftwidth=4 set hidden let g:python3_host_prog = '/usr/local/vitol/pyenv/versions/3.11.4/bin/python' " When editing a file, always jump to the last known cursor position. autocmd BufReadPost * \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' \ | exe "normal! g`\"" \ | endif nnoremap :w nnoremap :bn nnoremap :bp inoremap :wi let mapleader=" " nnoremap w :w:bw nnoremap W :bw nnoremap v :e ~/.config/nvim/init.lua nnoremap m :e ~/.config/nvim/vimrc.vim nnoremap s :source ~/.config/nvim/init.lua nnoremap q :xa nnoremap f Telescope find_files nnoremap g Telescope live_grep nnoremap b Telescope buffers nnoremap h Telescope help_tags nnoremap l Lazy nmap j (coc-diagnostic-prev) nmap d (coc-diagnostic-next) function! s:c_cycle(count) abort let qf_info = getqflist({ 'idx': 0, 'size': 0 }) let size = qf_info->get('size') if size == 0 return endif let idx = qf_info->get('idx') let num = (idx + size + a:count) % size if num == 0 let num = size endif execute num .. 'cc' endfunction command! -nargs=1 CCycle call s:c_cycle() nnoremap [n 'CCycle -' .. v:count1 .. '' nnoremap ]n 'CCycle ' .. v:count1 .. '' vnoremap :m '<-2gv=gv vnoremap :m '>+1gv=gv nnoremap :m -2 nnoremap :m +1 augroup tokyonight-night autocmd! autocmd ColorScheme * highlight Normal guibg=NONE ctermbg=NONE autocmd ColorScheme * highlight NonText guibg=NONE ctermbg=NONE augroup END colorscheme tokyonight-night set background=dark let g:LanguageClient_useVirtualText = 0 " disable inline errors set undodir=~/.config/nvim/undodir set undofile set number relativenumber