Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144colorscheme nord
set breakindentset cinoptions=l1,:0,g0,E-s,N-s,t0,(s,J1,j1set colorcolumn=+1set completeopt=menu,menuone,popup,noinsert,fuzzyset confirmset cpoptions-=_set cursorlineset cursorlineopt=numberset exrcset foldlevelstart=99set foldtext=set ignorecaseset jumpoptions=viewset linebreakset listset listchars+=precedes:<,extends:>set numberset pumborder=roundedset pumheight=10set scrolloff=2set shada='100,<50,s10,:100,/100,h,r/tmp/,r/private/set showcmdloc=statuslineset sidescrolloff=5set smartcaseset smoothscrollset splitrightset statuscolumn=%s%=%l%{%&nu\|\|&rnu?'%#WinSeparator#│':''%}set statusline=%{%v:lua.require'statusline'.statusline()%}set tabline=%!v:lua.require'statusline'.tabline()set tagcase=matchset titleset undofileset updatetime=250set wildignore+=*.pyc,__pycache__,.DS_Store,*~,#*#,*.oset wildignorecaseset wildmode=longest:full,fullset winborder=rounded
if executable('rg') set grepprg=rg\ --vimgrep\ --smart-caseendif
inoremap <C-Space> <C-X><C-O>
nnoremap <expr> j (v:count == 0 ? 'gj' : 'j')nnoremap <expr> k (v:count == 0 ? 'gk' : 'k')nnoremap / ms/nnoremap ? ms?nnoremap <Space>w <Cmd>update<CR>nnoremap <Space>b :ls<CR>:b<Space>nnoremap <Space>ee :e %:p:h/<Tab>nnoremap <Space>es :sp %:p:h/<Tab>nnoremap <Space>ev :vs %:p:h/<Tab>nnoremap <Space>Y "+y$nnoremap <Space>y "+yxnoremap <Space>y "+y
" Search in visual selection with //cnoremap <expr> / (getcmdtype() =~ '[/?]' && getcmdline() == '') ? "\<C-C>\<Esc>/\\%V" : '/'
" Use gK for keywordprg, since K gets mapped to 'hover' in LSP buffersnnoremap gK K
" Format whole buffer with formatprg without changing cursor positionnnoremap gq<CR> mzgggqG`znnoremap gq? <Cmd>set formatprg? formatexpr?<CR>
" Unimpaired style mappingsnnoremap <expr> [e '<Cmd>.move --' . v:count1 . '<CR>'nnoremap <expr> ]e '<Cmd>.move +' . v:count1 . '<CR>'xnoremap <expr> [e ':move --' . v:count1 . '<CR>gv'xnoremap <expr> ]e ":move '>+" . v:count1 . '<CR>gv'
function! Sort(type, ...) abort '[,']sort call setpos('.', getpos("''"))endfunctionnnoremap gs m'<Cmd>set operatorfunc=Sort<CR>g@xnoremap gs :sort<CR>
cnoremap <expr> <C-P> wildmenumode() ? '<C-P>' : '<Up>'cnoremap <expr> <C-N> wildmenumode() ? '<C-N>' : '<Down>'cnoremap <expr> <C-J> pumvisible() ? '<Down><Tab>' : '<C-J>'cnoremap <expr> <C-K> pumvisible() ? '<Up><Tab>' : '<C-K>'inoremap <expr> <C-C> pumvisible() ? '<C-E>' : '<C-C>'inoremap <expr> <CR> pumvisible() ? '<C-Y>' : '<CR>'
" Readline-style bindings in command and insert modesinoremap <C-B> <Left>inoremap <C-F> <Right>cnoremap <C-A> <Home>cnoremap <C-B> <Left>cnoremap <expr> <C-F> getcmdpos() == (len(getcmdline()) + 1) ? '<C-F>' : '<Right>'cnoremap <C-X><C-A> <C-A>cnoremap <C-X><C-F> <C-F>
" Don't use fish for 'shell', but if it exists use it as the default shell in" terminal buffersnnoremap <expr> `<CR> '<Cmd>bo term' .. (executable('fish') ? ' fish' : '') .. '<CR>'nnoremap <expr> `<Space> ':bo te '
" Use <Esc> to exit Terminal mode in terminal bufferstnoremap <Esc> <C-\><C-N>
augroup init autocmd!
" Close preview and command windows with q autocmd BufWinEnter * if &previewwindow | nnoremap <buffer> q <C-W>q | endif autocmd CmdWinEnter * nnoremap <buffer> q <C-W>q
" Highlight yanked text autocmd TextYankPost * silent! lua vim.hl.hl_op({ higroup="Visual" }) autocmd TextPutPost * silent! lua vim.hl.hl_op({ higroup="Visual" })
" Hide cursorline when the current window doesn't have focus autocmd WinLeave,FocusLost * if !&diff && !&cursorbind | setlocal nocursorline | endif autocmd WinEnter,FocusGained * setlocal cursorline
" Create missing parent directories automatically autocmd BufNewFile * autocmd BufWritePre <buffer> ++once call mkdir(expand('%:h'), 'p')
" Disable listchars and fix <C-W> in prompt buffers autocmd OptionSet buftype if &buftype ==# 'prompt' | \ setlocal nolist | \ inoremap <buffer> <C-W> <S-C-W> | \ endif
" Don't show trailing spaces in insert mode autocmd InsertEnter * setlocal listchars-=trail:- autocmd InsertLeave * setlocal listchars<
" For some filetypes, completion based on syntax is better than nothing autocmd FileType cmake setlocal omnifunc=syntaxcomplete#Complete
" Automatically enter terminal mode when a :terminal opens autocmd TermOpen term://* startinsert autocmd TermClose term://* stopinsertaugroup END
packadd! nvim.undotree