aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim')
-rw-r--r--.config/nvim/init.vim29
1 files changed, 25 insertions, 4 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index dac1f01..d702226 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -19,6 +19,7 @@ set linebreak " set wrap but don't wrap inside words
set viminfo+='1000,n~/.local/nvim/viminfo
set guifont=JetBrainsMono\ Nerd\ Font:h9:#e-subpixelantialias:#h-slight
set linespace=5
+set tabpagemax=999
let g:sneak#label = 1
let g:which_key_map = {}
let g:airline_powerline_fonts = 1
@@ -26,6 +27,7 @@ let g:minimap_highlight='Visual'
let g:python3_host_prog='/usr/bin/python3'
let g:vimtex_quickfix_open_on_warning = 0
let g:vimtex_imaps_enabled = 0
+let g:DiffColors = 0
if exists("g:neovide")
nmap <silent> <C-=> :lua vim.g.neovide_scale_factor = vim.g.neovide_scale_factor + 0.1<CR>
@@ -63,6 +65,7 @@ Plug 'wellle/targets.vim'
Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' }
Plug 'dkarter/bullets.vim'
Plug 'editorconfig/editorconfig-vim'
+Plug 'rickhowe/diffunitsyntax'
" language plugins
Plug 'lervag/vimtex'
@@ -88,16 +91,17 @@ Plug 'arzg/vim-colors-xcode'
Plug 'romgrk/github-light.vim'
Plug 'vv9k/vim-github-dark'
Plug 'rose-pine/neovim'
+
+Plug '~/.config/nvim/local/coc-markdown-links'
call plug#end()
" keybinds
tnoremap <Esc> <C-\><C-n>
nnoremap tt :tabnew<CR>
-
-nmap <CR> o<Esc>
-nmap <leader>qf <Plug>(coc-fix-current)
-
+nnoremap <CR> o<Esc>
+nnoremap <leader>qf <Plug>(coc-fix-current)
+nnoremap <silent> * yiw:let @/='\<<C-R>=expand("<cword>")<CR>\>'<CR>:set hls<CR>
nnoremap <silent> <A-j> :m +1<CR>
nnoremap <silent> <A-k> :m -2<CR>
@@ -187,10 +191,20 @@ let g:which_key_map['.'] = {
map <silent> <leader>u :UndotreeToggle<cr>
let g:which_key_map.u = 'toggle undo tree'
+nnoremap <silent> <leader>e 0f!xC<c-r>=system(@-)<cr><esc>dd
+let g:which_key_map.e = 'read and execute after !'
+
" cmd maps
cnoreabbrev W w
cnoreabbrev sudow w !sudo tee %
+" emacs bindings in vim command-line
+cnoremap <A-b> <S-Left>
+cnoremap <A-f> <S-Right>
+cnoremap <C-a> <Home>
+cnoremap <C-e> <End>
+cnoremap <A-backspace> <C-w>
+
" hexokinase
let g:Hexokinase_termDisabled = 1
let g:Hexokinase_optOutPatterns = [ 'colour_names' ]
@@ -348,6 +362,13 @@ augroup Binary
au BufWritePost *.bin set noeol
augroup END
+" highlight Zephyr .overlay files as devicetree source (dts)
+augroup devicetree_ft
+ au!
+ au BufRead,BufNewFile *.overlay set syntax=dts
+ au BufRead,BufNewFile *.dtsi set syntax=dts
+augroup END
+
" sneak
let g:sneak#use_ic_scs = 0