" NERDTree remap let g:NERDTreeDirArrowExpandable = '▸' let g:NERDTreeDirArrowCollapsible = '▾' nnoremap :NERDTreeToggle " open builtin terminal function OpenTerm() vsplit terminal endfunction nnoremap :call OpenTerm() " open new files right/below set splitright set splitbelow set clipboard+=unnamedplus " Autoformat on save augroup FormatAutogroup autocmd! autocmd BufWritePost * FormatWrite augroup END " Update Plugins and Treesitter languages autocmd VimLeave * mksession! ~/.config/nvim/lastSession.vi " set spellcheck according to Filetype autocmd VimEnter * set spell spelllang=en_us function Litde() set spell spelllang=de_de endfunction function Liten() set spell spelllang=en_us endfunction nnoremap :call Liten() nnoremap :call Litde() " Theme nnoremap :colo morning nnoremap :colo ron " Fuzzy finder nnoremap :Lines " Save using strg+s nnoremap :w " autosave for Markdown and Latex set updatetime=800 autocmd CursorHold *.md w function RestoreSession() if @% == "" source ~/.config/nvim/lastSession.vim endif endfunction " Git-Blame configuration let g:gitblame_message_template = ' => ' let g:gitblame_date_format = '%r' if executable('vhdl-tool') au User lsp_setup call lsp#register_server({ \ 'name': 'vhdl-tool', \ 'cmd': {server_info->['vhdl-tool', 'lsp']}, \ 'whitelist': ['vhdl'], \ 'root_uri':{server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_file_directory(lsp#utils#get_buffer_path(), 'vhdltool-config.yaml'))}, \ }) endif autocmd FileType vhdl setlocal omnifunc=lsp#complete nnoremap BufferNext " update function and call function Update_Sys() PackerSync TSUpdate MasonUpdate endfunction nnoremap :call Update_Sys()