add vim-lsp and replace sytanx plugins with vim-polyglot
This commit is contained in:
parent
d2fc9fb53e
commit
c74ea2f46a
@ -15,7 +15,6 @@ endif
|
||||
"{{{
|
||||
if has('win32')
|
||||
let &runtimepath.=",$HOME/.vim"
|
||||
set shell=pwsh
|
||||
endif
|
||||
|
||||
if has("gui_running")
|
||||
@ -142,38 +141,40 @@ endif
|
||||
|
||||
call plug#begin(pluginDir)
|
||||
Plug 'junegunn/vim-plug'
|
||||
|
||||
" quality of life
|
||||
Plug 'tpope/vim-surround'
|
||||
"normal mode keybinds
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'tpope/vim-unimpaired'
|
||||
"command mode keybinds
|
||||
Plug 'tpope/vim-rsi'
|
||||
Plug 'tpope/vim-eunuch'
|
||||
Plug 'tpope/vim-repeat'
|
||||
"git
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" syntax and colorscheme packs
|
||||
Plug 'flazz/vim-colorschemes'
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
|
||||
" linting and lsp
|
||||
Plug 'w0rp/ale'
|
||||
Plug 'prabirshrestha/vim-lsp'
|
||||
Plug 'mattn/vim-lsp-settings'
|
||||
|
||||
" extra language plugins
|
||||
"go
|
||||
Plug 'fatih/vim-go'
|
||||
"html
|
||||
Plug 'mattn/emmet-vim'
|
||||
|
||||
" other useful things
|
||||
"editorconfig
|
||||
Plug 'editorconfig/editorconfig-vim'
|
||||
"browser/url opener
|
||||
Plug 'tyru/open-browser.vim'
|
||||
"git
|
||||
Plug 'tpope/vim-fugitive'
|
||||
"visual
|
||||
"Plug 'flazz/vim-colorschemes'
|
||||
"linting
|
||||
Plug 'w0rp/ale'
|
||||
|
||||
"javascript/css/html
|
||||
Plug 'pangloss/vim-javascript'
|
||||
Plug 'mattn/emmet-vim'
|
||||
"gdscript
|
||||
Plug 'calviken/vim-gdscript3'
|
||||
"powershell
|
||||
Plug 'PProvost/vim-ps1'
|
||||
"go
|
||||
Plug 'fatih/vim-go'
|
||||
"md
|
||||
"tables
|
||||
Plug 'godlygeek/tabular'
|
||||
Plug 'plasticboy/vim-markdown'
|
||||
"toml
|
||||
Plug 'cespare/vim-toml'
|
||||
call plug#end()
|
||||
"}}}
|
||||
|
||||
@ -232,7 +233,7 @@ runtime macros/matchit.vim
|
||||
" {{{
|
||||
" colorscheme 1989
|
||||
" colorscheme PaperColor
|
||||
" colorscheme gruvbox
|
||||
colorscheme gruvbox
|
||||
" colorscheme jellybeans
|
||||
" colorscheme molokai
|
||||
" colorscheme Benokai
|
||||
@ -245,6 +246,17 @@ runtime macros/matchit.vim
|
||||
" colorscheme monokai-phoenix
|
||||
" }}}
|
||||
|
||||
"custom commands
|
||||
"{{{
|
||||
"common typos and abbreviations
|
||||
cnoremap w!! w !sudo tee % > /dev/null
|
||||
command! W w !sudo tee % > /dev/null
|
||||
command! Trim %s/\s\+$//
|
||||
command! Q q
|
||||
command! WQ wq
|
||||
command! Q1 q!
|
||||
"}}}
|
||||
|
||||
"keybinds
|
||||
"{{{
|
||||
"leader key
|
||||
@ -267,29 +279,42 @@ nnoremap <leader>dt :r !date<CR>
|
||||
nnoremap <leader>rc :vsplit $MYVIMRC<CR>
|
||||
nnoremap <leader>so :source $MYVIMRC<CR>
|
||||
|
||||
"insert mode
|
||||
inoreabbrev <expr> #!! "#!/usr/bin/env"
|
||||
|
||||
"formatting tools
|
||||
nnoremap =j :%!python -m json.tool<CR>
|
||||
"}}}
|
||||
|
||||
"plugin keybinds
|
||||
"{{{
|
||||
"netrw
|
||||
nnoremap <silent><leader>e :call ToggleNetrw()<CR>
|
||||
|
||||
"openbrowser
|
||||
nmap gx <Plug>(openbrowser-smart-search)
|
||||
vmap gx <Plug>(openbrowser-smart-search)
|
||||
|
||||
"ale
|
||||
nnoremap <leader>at :ALEToggle<CR>
|
||||
nmap <leader>af <Plug>(ale_fix)
|
||||
|
||||
"insert mode
|
||||
inoreabbrev <expr> #!! "#!/usr/bin/env"
|
||||
"}}}
|
||||
"lsp
|
||||
function! s:on_lsp_buffer_enabled() abort
|
||||
setlocal omnifunc=lsp#complete
|
||||
setlocal signcolumn=yes
|
||||
if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif
|
||||
nmap <buffer> gd <plug>(lsp-definition)
|
||||
nmap <buffer> gr <plug>(lsp-references)
|
||||
nmap <buffer> gi <plug>(lsp-implementation)
|
||||
nmap <buffer> gt <plug>(lsp-type-definition)
|
||||
nmap <buffer> rn <plug>(lsp-rename)
|
||||
nmap <buffer> [g <Plug>(lsp-previous-diagnostic)
|
||||
nmap <buffer> ]g <Plug>(lsp-next-diagnostic)
|
||||
nmap <buffer> K <plug>(lsp-hover)
|
||||
nmap <buffer> <leader>lf <plug>(lsp-document-format)
|
||||
endfunction
|
||||
|
||||
"custom commands
|
||||
"{{{
|
||||
"common typos and abbreviations
|
||||
cnoremap w!! w !sudo tee % > /dev/null
|
||||
command! W w !sudo tee % > /dev/null
|
||||
command! Trim %s/\s\+$//
|
||||
command! Q q
|
||||
command! WQ wq
|
||||
command! Q1 q!
|
||||
"}}}
|
||||
|
||||
"toggle functions
|
||||
@ -404,5 +429,10 @@ if has("autocmd")
|
||||
augroup filetype_halftab
|
||||
autocmd! FileType html,javascript,css,json,yaml,sh call HalftabSettings()
|
||||
augroup END
|
||||
|
||||
augroup lsp_install
|
||||
autocmd!
|
||||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||
augroup END
|
||||
endif
|
||||
"}}}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user