Commit d18ea12f authored by gagbo's avatar gagbo

LSP : try to use vim-lsc, focused on being a client

parent ac7854a3
nnoremap gD call g:ClangGotoDeclaration()
setlocal keywordprg=cppman
......@@ -8,9 +8,12 @@ if exists('*minpac#init')
" Plugins list {{{2
" Completion / Linters {{{3
call minpac#add('w0rp/ale')
call minpac#add('editorconfig/editorconfig-vim')
call minpac#add('gagbo/clang_complete', { 'branch': 'out-of-source-compile_commands' })
call minpac#add('rhysd/vim-clang-format')
call minpac#add('natebosch/vim-lsc')
call minpac#add('octol/vim-cpp-enhanced-highlight')
call minpac#add('rhysd/vim-clang-format')
if has('nvim')
call minpac#add('Shougo/deoplete.nvim', { 'type': 'opt', 'do': 'UpdateRemotePlugins' })
call minpac#add('Shougo/neco-vim', { 'type': 'opt' })
......@@ -20,7 +23,6 @@ if exists('*minpac#init')
call minpac#add('lifepillar/vim-mucomplete', { 'type': 'opt' })
call minpac#add('davidhalter/jedi-vim')
endif
call minpac#add('editorconfig/editorconfig-vim')
" New mappings on top of basic vim functions {{{3
" aka "Tpope's land"
......
......@@ -11,16 +11,17 @@ let g:ale_completion_enabled = 1
" ALE linters {{{2
let g:ale_linters = {
\ 'python': ['flake8', 'pyls'],
\ 'cpp': ['ccls', 'clangcheck', 'clangtidy'],
\ 'python': ['flake8'],
\ 'cpp': ['clangcheck', 'clangtidy'],
\ 'c': ['gcc'],
\ 'rust': ['rls', 'cargo'],
\ 'rust': ['cargo'],
\ }
let g:ale_fixers = {
\ 'python': ['autopep8', 'isort', 'black'],
\ 'cpp': ['clang-format'],
\ 'c': ['clang-format'],
\ 'rust': ['rustfmt'],
\ 'haskell': ['stylish-haskell'],
\ }
let g:ale_python_pylint_executable = 'pylint-3'
let g:ale_cpp_cpplint_options = '--filter=-legal/copyright,-build/include_order'
......@@ -31,7 +32,6 @@ let g:ale_c_clangtidy_checks = ['*',
\ ]
let g:ale_cpp_clangtidy_checks = g:ale_c_clangtidy_checks
let g:ale_cpp_ccls_executable = '/etc/soft/ccls/Release/ccls'
let g:ale_cpp_ccls_init_options = {
\ 'cacheDirectory': '/home/gagbo/.cache/ccls',
\ 'cacheFormat': 'msgpack',
......
let g:lsc_server_commands = {
\ 'python': 'pyls',
\ 'cpp': {
\ 'name': 'ccls',
\ 'command': '/etc/soft/ccls/Release/ccls',
\ 'message_hooks': {
\ 'initialize': {
\ 'initializationOptions': {
\ 'cacheDirectory': '.ccls-cache',
\ 'cacheFormat': 'msgpack',
\ },
\ },
\ },
\ },
\ 'rust': 'rls',
\ }
" \ 'command': '/home/gagbo/projects/playground/logged/ccls_logged.sh',
let g:lsc_auto_map = {
\ 'GoToDefinition': 'gt',
\ 'FindReferences': 'gr',
\ 'NextReference': '<C-n>',
\ 'PreviousReference': '<C-p>',
\ 'FindImplementations': 'gI',
\ 'FindCodeActions': 'ga',
\ 'DocumentSymbol': 'go',
\ 'WorkspaceSymbol': 'gS',
\ 'Rename': 'gR',
\ 'ShowHover': v:true,
\ 'SignatureHelp': '<C-m>',
\ 'Completion': 'completefunc',
\}
augroup LSCcompletesplitbelow
autocmd!
autocmd User LSCAutocomplete setlocal splitbelow
autocmd CompleteDone * setlocal nosplitbelow
augroup END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment