aboutsummaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorla-ninpre <leobrekalini@gmail.com>2021-06-03 01:01:56 +0300
committerla-ninpre <leobrekalini@gmail.com>2021-06-03 01:01:56 +0300
commit38cc825547e579fbab261827be6d9ba32c107a62 (patch)
tree156089bdce4c83f9a16f797189d2e03c1dabac8c /.config
parent81a615b8119ea39927d2ac99de932fd2971e53c8 (diff)
downloaddotfiles-38cc825547e579fbab261827be6d9ba32c107a62.tar.gz
dotfiles-38cc825547e579fbab261827be6d9ba32c107a62.zip
nvim: small refactor and add little things
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/init.vim27
1 files changed, 14 insertions, 13 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index 4e02ede..bb476e4 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -23,9 +23,10 @@ set wildmenu
" more intuitive splits
set splitbelow splitright
-" don't highlight everything when search and move cursor to the searched word
-set nohlsearch incsearch
+" search options
+set nohlsearch incsearch ignorecase smartcase showmatch
+" ruler
set rulerformat=%35(%{strftime('%F\ %H:%M')}%=%l/%L%=%c%V%=%p%%\ %)
" expand tabs to spaces
@@ -70,6 +71,7 @@ Plug 'tpope/vim-surround'
Plug 'mbbill/undotree'
Plug 'dense-analysis/ale'
Plug 'cespare/vim-toml'
+Plug 'https://tildegit.org/sloum/gemini-vim-syntax'
call plug#end()
filetype plugin indent on
@@ -114,10 +116,8 @@ nnoremap <leader>vc :e ~/.config/nvim/init.vim<CR>
nnoremap <leader>sl :set list<CR>
nnoremap <leader>sn :set nolist<CR>
-" goyo and limelight
+" goyo
nnoremap <leader>go :Goyo<CR>
-autocmd! User GoyoEnter Limelight
-autocmd! User GoyoLeave Limelight!
" actually magick!
" this moves higlighted block up or down
@@ -127,18 +127,19 @@ vnoremap K :m '<-2<CR>gv=gv
" alias for capturing group in command mode (for use with regexps)
cmap ;( \(\)<Left><Left>
+"
+" autocommands
+"
+
+" limelight on when goyo
+autocmd! User GoyoEnter Limelight
+autocmd! User GoyoLeave Limelight!
+
" fix wrong nvim size when starting in alacritty
autocmd VimEnter * :silent exec "!kill -s SIGWINCH $PPID"
-" highlight yanked text
-" i consider this as transition from visually selecting stuff and yanking it
-" to just yank text object without selecting it
+" highlight yanked text (needs nvim 0.5.x)
augroup highlight_yank
autocmd!
autocmd TextYankPost * silent! lua require'vim.highlight'.on_yank({timeout = 40})
augroup END
-
-augroup xmobar_syntax
- autocmd!
- autocmd BufRead,BufNewFile xmobarrc* set syntax=haskell
-augroup END