mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 02:30:03 +08:00
1.6 KiB
1.6 KiB
title | description |
---|---|
SpaceVim language server protocol layer | This layers provides language server protocol for vim and neovim |
SpaceVim Layers: lsp
Description
This layers adds extensive support for language-server-protocol
Features
Install
To use this configuration layer, add call SpaceVim#layers#load('lsp')
to your custom configuration file.
Configuration
To enable lsp support for a specified filetype, you may need to load this layer with filtypes
option, for example:
call SpaceVim#layers#load('lsp',
\ {
\ 'filetypes' : ['rust',
\ 'typescript',
\ 'javascript',
\ ],
\ }
default language server commands:
language | server command |
---|---|
javascript |
['javascript-typescript-stdio'] |
haskell |
['hie', '--lsp'] |
To override the server command, you may need to use override_cmd
option:
call SpaceVim#layers#load('lsp',
\ {
\ 'override_cmd' : {
\ 'rust' : ['rustup', 'run', 'nightly', 'rls'],
\ }
\ }
Key bindings
Key Binding | Description |
---|---|
K / SPC l d |
show document |
SPC l e |
rename symbol |