deoplete and lsp
This commit is contained in:
@@ -27,12 +27,13 @@ if(g:have_plug)
|
||||
endif
|
||||
Plug 'tacahiroy/ctrlp-funky' " Fuzzy in-buffer search
|
||||
Plug 'tommcdo/vim-lion' " Align stuff
|
||||
Plug 'tpope/vim-abolish' " Case Convert and other stuff
|
||||
Plug 'tpope/vim-commentary' " Commenting
|
||||
Plug 'tpope/vim-fugitive' " Work with git repos
|
||||
Plug 'tpope/vim-surround' " Surround with quotes
|
||||
Plug 'vim-airline/vim-airline' " Status bar
|
||||
Plug 'vim-airline/vim-airline-themes' " Status bar themes
|
||||
Plug 'vimwiki/vimwiki' " http://vimwiki.github.io/
|
||||
" Plug 'vimwiki/vimwiki' " http://vimwiki.github.io/
|
||||
Plug 'w0ng/vim-hybrid' " Hybrid colorscheme
|
||||
|
||||
" Language
|
||||
@@ -51,13 +52,23 @@ if(g:have_plug)
|
||||
" Quality of life
|
||||
Plug 'edkolev/tmuxline.vim'
|
||||
Plug 'jez/vim-superman' " Man page viewer
|
||||
Plug 'mhinz/vim-signify' " Gutter signs, git, et al.
|
||||
|
||||
" Plug 'sotte/presenting.vim' " Slides
|
||||
|
||||
if v:version >= 800
|
||||
Plug 'w0rp/ale' " Asynchronous Linting
|
||||
Plug 'sbdchd/neoformat' " Automatic code formatting
|
||||
|
||||
Plug 'prabirshrestha/async.vim' " vim8/neovim async normalizer
|
||||
Plug 'prabirshrestha/vim-lsp' " Language Server Protocol support
|
||||
Plug 'autozimu/LanguageClient-neovim', {
|
||||
\ 'branch': 'next',
|
||||
\ 'do': 'bash install.sh',
|
||||
\ } " Lanugage Server Support
|
||||
Plug 'junegunn/fzf' " Multi-entry selection UI for LanguageClient
|
||||
|
||||
Plug 'Shougo/deoplete.nvim' " Autocomplete Support
|
||||
Plug 'roxma/nvim-yarp' " nvim plugin support
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
|
||||
Plug 'ruanyl/coverage.vim' " Code Coverage Support
|
||||
endif
|
||||
@@ -82,14 +93,27 @@ let g:airline#extensions#ale#enabled = 1
|
||||
let g:ale_sign_column_always = 1
|
||||
let g:ale_sign_error = ''
|
||||
let g:ale_sign_warning = ''
|
||||
let g:ale_linters = {
|
||||
\ 'html': [ 'tsserver' ],
|
||||
\ }
|
||||
let g:ale_fixers = {
|
||||
\ 'javascript': [ 'eslint' ],
|
||||
\ }
|
||||
let g:ale_linter_aliases = { 'html': ['ts'] }
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
" let g:lsp_log_verbose = 1
|
||||
" let g:lsp_log_file = expand('~/vim-lsp.log')
|
||||
" let g:ale_completion_enabled = 1
|
||||
|
||||
let g:coverage_json_report_path = 'coverage/coverage-final.json'
|
||||
let g:coverage_sign_covered = ''
|
||||
let g:coverage_sign_uncovered = ''
|
||||
|
||||
let g:signify_vcs_list = [ 'git' ]
|
||||
|
||||
let g:LanguageClient_serverCommands = {
|
||||
\ 'typescript': ['typescript-language-server', '--stdio'],
|
||||
\ 'javascript': ['javascript-typescript-stdio'],
|
||||
\ 'javascript.jsx': ['javascript-typescript-stdio'],
|
||||
\ 'dockerfile': ['docker-langserver', '--stdio'],
|
||||
\ }
|
||||
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
|
||||
@@ -4,8 +4,8 @@ noremap <silent><leader>w :update<cr>
|
||||
inoremap <silent><leader>w <Esc>:update<cr>a
|
||||
cmap w!! w !sudo tee % >/dev/null
|
||||
|
||||
cmap eh e %:h/
|
||||
cmap wh w %:h/
|
||||
" cmap eh e %:h/
|
||||
" cmap wh w %:h/
|
||||
|
||||
"Remove search highlight when <Esc> is pressed
|
||||
nnoremap <silent> <Esc><Esc> <Esc>:nohlsearch<CR><Esc>
|
||||
@@ -25,13 +25,12 @@ noremap <leader>d :bd<cr>
|
||||
nmap <leader>e[ <Plug>(ale_previous_wrap)
|
||||
nmap <leader>e] <Plug>(ale_next_wrap)
|
||||
|
||||
" let g:tsuquyomi_javascript_support = 1
|
||||
" noremap <leader>p :echo tsuquyomi#hint()<cr>
|
||||
|
||||
noremap <leader>p :LspHover<cr>
|
||||
noremap <leader>D :LspDefinition<cr>
|
||||
noremap <leader>U :LspReferences<cr>
|
||||
nmap <leader>p <Plug>(ale_hover)
|
||||
nmap <leader>D <Plug>(ale_go_to_definition)
|
||||
nmap <leader>U <Plug>(ale_find_references)
|
||||
|
||||
let g:ctrlp_funky_syntax_highlight = 1
|
||||
nnoremap <leader>f :CtrlPFunky<CR>
|
||||
|
||||
nnoremap <F5> :call LanguageClient_contextMenu()<CR>
|
||||
nnoremap <F12> :call LanguageClient_textDocument_codeAction()<CR>
|
||||
|
||||
@@ -60,16 +60,8 @@
|
||||
\ }
|
||||
augroup END
|
||||
|
||||
augroup lsp
|
||||
au!
|
||||
if executable('typescript-language-server')
|
||||
au User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'typescript-language-server',
|
||||
\ 'cmd': { server_info->[&shell, &shellcmdflag, 'typescript-language-server --stdio']},
|
||||
\ 'root_uri': { server_info->lsp#utils#path_to_uri(lsp#utils#find_nearest_parent_directory(lsp#utils#get_buffer_path(), '.git/..'))},
|
||||
\ 'whitelist': ['typescript', 'javascript', 'javascript.jsx']
|
||||
\ })
|
||||
endif
|
||||
|
||||
augroup Dockerfile
|
||||
au!
|
||||
au BufNewFile,BufRead *.dockerfile setf dockerfile
|
||||
augroup END
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user