From 059c27813ef52a3486000ab908f9af47f3d098f1 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Fri, 5 Feb 2021 01:38:23 -0700 Subject: Add new features to vim, fix problems with new workspaces --- .config/nvim/init.vim | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) (limited to '.config/nvim/init.vim') diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 5b3c98f..3b2e552 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -45,6 +45,17 @@ set showcmd "Auto completion Plug 'Valloric/YouCompleteMe' let g:ycm_autoclose_preview_window_after_completion=1 + if !has_key( g:, 'ycm_language_server' ) + let g:ycm_language_server = [] + endif + let g:ycm_language_server += [ + \ { + \ 'name': 'godot', + \ 'filetypes': [ 'gdscript' ], + \ 'project_root_files': [ 'project.godot' ], + \ 'port': 6008 + \ } + \ ] " TeX Plug 'lervag/vimtex' @@ -86,6 +97,15 @@ set showcmd "" let g:syntastic_tex_lacheck_quiet_messages = {'regex': '\Vpossible unwanted space at'} " let g:syntastic_tex_chktex_quiet_messages = {'level': 'warnings'} + " JavaScript + Plug 'yuezk/vim-js' + Plug 'maxmellon/vim-jsx-pretty' + + Plug 'alvan/vim-closetag' + let g:closetag_filenames = '*.html,*.xhtml,*.phtml,*.xml,*.wsdl,*.wsd' + + Plug 'habamax/vim-godot' + call plug#end() "" Commands for plug. " PlugInstall [name ...] [#threads] Install plugins @@ -132,24 +152,34 @@ set showcmd \ set expandtab | \ set textwidth=79 | \ set fileformat=unix - au BufAdd,BufEnter,BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/ - " Some filetypes that require 4 spaces for tabs. - au BufAdd,BufEnter,BufNewFile,BufRead *.java + au BufEnter,BufNewFile,BufRead *.java \ set tabstop=4 | \ set softtabstop=0 | \ set shiftwidth=4 | \ set noexpandtab | \ set fileformat=unix + " Similar to python, but for js. + " au BufEnter,BufNewFile,BufRead *.js + " \ set tabstop=4 | + " \ set softtabstop=4 | + " \ set shiftwidth=4 | + " \ set expandtab=4 | + " \ set fileformat=unix + " Some filetypes that require 2 spaces for tabs. - au BufAdd,BufEnter,BufNewFile,BufRead *.xml,*.html,*.jsp + au BufEnter,BufNewFile,BufRead *.xml,*.html,*.jsp,*.wsdl,*.xsd \ set tabstop=2 | \ set softtabstop=2 | \ set shiftwidth=2 | \ set expandtab | \ set fileformat=unix + " Show bad whitespaces on some files. + au BufAdd,BufEnter,BufRead,BufNewFile *.py,*.pyw,*.c,*.h,*.js,*.java,*.xml,*.html,*.jsp match BadWhitespace /\s\+$/ + + " Listchars set showbreak=↪\ set listchars=eol:↲,nbsp:␣,tab:»\ ,trail:•,precedes:⟨,extends:⟩ -- cgit v1.2.3-54-g00ecf