liuchengxu / space-vim

:four_leaf_clover: Lean & mean spacemacs-ish Vim distribution
https://liuchengxu.github.io/space-vim/
MIT License
2.85k stars 255 forks source link

vim-lsp lsp keymappings #497

Closed rene-descartes2021 closed 2 years ago

rene-descartes2021 commented 2 years ago

Here are mappings for vim-lsp in the lsp layer. Makes use of #496.

Regarding the if get(b:, 'spacevim_lsp_engine', g:spacevim_lsp_engine) ==# 'vim_lsp': I'm thinking it could be possible to have the lsp engine depend on the buffer... maybe there is a good use-case for that. ~I've not tested that yet.~ Might be useful? I should probably simplify that to g:spacevim_lsp_engine ==# 'vim_lsp' for now. EDIT: b:spacevim_lsp_engine seems to work well in terms of keymappings. Though the lsp layer would need to be revised to load each engine, if say g:spacevim_lsp_engine is a list of engines. Much of core/autoload/spacevim/lang/util.vim would be moved into the lsp layer's config.vim. I think some people might be interested in using b:spacevim_lsp_engine per language. Anyway, probably best to put that feature in a different PR.

Contingent on: #496