1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 20:10:05 +08:00

Add lsp support for crystal (#3108)

This commit is contained in:
Wang Shidong 2019-10-02 22:06:11 +08:00 committed by GitHub
parent d7e6828166
commit eefa2f0b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View File

@ -40,5 +40,14 @@ function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','s', 's'],
\ 'call SpaceVim#plugins#repl#send("selection")',
\ 'send selection and keep code buffer focused', 1)
if SpaceVim#layers#lsp#check_filetype('crystal')
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'd'],
\ 'call SpaceVim#lsp#show_doc()', 'show_document', 1)
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'e'],
\ 'call SpaceVim#lsp#rename()', 'rename symbol', 1)
endif
endfunction

View File

@ -119,6 +119,7 @@ let s:lsp_servers = {
\ 'php' : ['php', g:spacevim_plugin_bundle_dir . 'repos/github.com/felixfbecker/php-language-server/bin/php-language-server.php'],
\ 'purescript' : ['purescript-language-server', '--stdio'],
\ 'python' : ['pyls'],
\ 'crystal' : ['scry'],
\ 'rust' : ['rustup', 'run', 'nightly', 'rls'],
\ 'scala' : ['metals-vim'],
\ 'sh' : ['bash-language-server', 'start'],

View File

@ -131,6 +131,7 @@ gem install solargraph
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `c` | `['clangd']` |
| `cpp` | `['clangd']` |
| `crystal` | `['scry']` |
| `css` | `['css-languageserver', '--stdio']` |
| `dart` | `['dart_language_server']` |
| `go` | `['go-langserver', '-mode', 'stdio']` |

View File

@ -144,6 +144,7 @@ default language server commands:
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `c` | `['clangd']` |
| `cpp` | `['clangd']` |
| `crystal` | `['scry']` |
| `css` | `['css-languageserver', '--stdio']` |
| `dart` | `['dart_language_server']` |
| `go` | `['go-langserver', '-mode', 'stdio']` |