Skip to content

Commit

Permalink
update vim lsp setting
Browse files Browse the repository at this point in the history
Signed-off-by: tracyone <[email protected]>
  • Loading branch information
tracyone committed Dec 17, 2021
1 parent d26cf83 commit 9818f64
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
14 changes: 14 additions & 0 deletions autoload/te/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,17 @@ function! te#lsp#goto_type_def() abort
return -1
endif
endfunction

function! te#lsp#show_diagnostics(current_buffer)
if te#lsp#is_server_running() == 1
if exists(":LspDocumentDiagnostics") == 2
if a:current_buffer == 1
:LspDocumentDiagnostics --buffers=*
else
:LspDocumentDiagnostics
endif
endif
else
:botright lopen
endif
endfunction
2 changes: 1 addition & 1 deletion rc/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ EOF
else
Plug 'prabirshrestha/vim-lsp'
Plug 'mattn/vim-lsp-settings',{'on': []}
nnoremap <silent><leader>ql :LspDocumentDiagnostics<cr>
nnoremap <silent><leader>ql :call te#lsp#show_diagnostics(0)<cr>
call te#feat#register_vim_enter_setting2([0], ['vim-lsp-settings'])
endif
"lsp setting
Expand Down
1 change: 0 additions & 1 deletion rc/mappings.vim
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ nnoremap <silent><leader>vc :call te#feat#edit_config()<cr>
"open quickfix windows
nnoremap <silent><leader>qf :botright copen<cr>
"open location windows
nnoremap <silent><leader>ql :botright lopen<cr>
nnoremap <silent><leader>qc q:
nnoremap <silent><leader>q/ q/
Expand Down

0 comments on commit 9818f64

Please sign in to comment.