-
Notifications
You must be signed in to change notification settings - Fork 84
Language Servers
Cauryl edited this page Jan 14, 2020
·
19 revisions
The Dart and Flutter SDK ships with an analysis server with a --lsp
flag. Install the vim-lsc-dart
plugin to configure this client automatically.
- bash setup
git clone https://github.com/cquery-project/cquery.git --recursive
cd cquery && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local \
-DCMAKE_EXPORT_COMPILE_COMMANDS=YES
make -j8 && make install
- vimrc
let g:lsc_server_commands = {
\ 'c': 'cquery --init="{\"cacheDirectory\": \"/tmp/cquery_cache\"}"',
\ 'cpp': 'cquery --init="{\"cacheDirectory\": \"/tmp/cquery_cache\"}"',
\ }
- bash setup
pip install 'python-language-server[all]'
- vimrc
let g:lsc_server_commands = { 'python' : 'pyls'}
First, clone ElixirLS into a directory of your choosing:
git clone https://github.com/JakeBecker/elixir-ls.git
Then run:
mix compile; mix elixir_ls.release -o <output_directory>
Make sure <output_directory>/language_server.sh
is executable.
Add the following to your .bash_profile
:
- bash_profile
function elixir-language-server() {
(<output_directory>/language_server.sh $*)
}
- vimrc
let g:lsc_server_commands = {
\ 'elixir': 'elixir-language-server'
\ }
You can find instructions on how to bootstrap Metals for vim-lsc
here on the Metals website
You'll want to make sure that you correctly have the --java-opt -Dmetals.client=vim-lsc
set correctly to vim-lsc
. Then you you can include the following in your .vimrc
.
let g:lsc_server_commands = {
\ 'scala': 'metals-vim'
\ }
npm install -g typescript typescript-language-server
- vimrc
let g:lsc_server_commands = {
\ 'javascript': 'typescript-language-server --stdio'
\ }
npm install -g intelephense
- vimrc
let g:lsc_server_commands = {
\ 'php': {
\ 'command': 'intelephense --stdio',
\ 'message_hooks': {
\ 'initialize': {
\ 'initializationOptions': {'storagePath': '/tmp/intelephense'},
\ },
\ },
\ },
\}