Browse Source

Added additional instructions for setting up language servers

merge-requests/389/head
eidheim 7 years ago
parent
commit
577099d3f9
  1. 2
      README.md
  2. 51
      docs/language_servers.md

2
README.md

@ -33,7 +33,7 @@ towards libclang with speed, stability, and ease of use in mind.
* OpenCL and CUDA files are supported and parsed as C++ * OpenCL and CUDA files are supported and parsed as C++
* Other file types: * Other file types:
* Language server protocol support is enabled if `[language identifier]-language-server` executable is found. This executable can be a symbolic link to one of your installed language server binaries. * Language server protocol support is enabled if `[language identifier]-language-server` executable is found. This executable can be a symbolic link to one of your installed language server binaries.
See [language-server-protocol/specification.md](https://github.com/Microsoft/language-server-protocol/blob/gh-pages/specification.md) for the currently defined language identifiers. * For additional instructions, see: [setup of tested language servers](docs/language_servers.md)
* otherwise, only keyword and buffer completion supported * otherwise, only keyword and buffer completion supported
* Find symbol through Ctags * Find symbol through Ctags
* Spell checking depending on file context * Spell checking depending on file context

51
docs/language_servers.md

@ -0,0 +1,51 @@
# Setup of tested language servers
## JavaScript with Flow static type checker
* Prerequisites:
* Node.js
* Recommended:
* [Prettier](https://github.com/prettier/prettier)
Install language server, and create executable to enable server in juCi++:
```sh
npm install -g flow-language-server
echo '#!/bin/bash
flow-language-server --stdio' > /usr/local/bin/javascript-language-server
chmod 755 /usr/local/bin/javascript-language-server
```
* Additional setup within a JavaScript project:
* Add a `.prettierrc` file to enable style format on save
## Python3
* Prerequisites:
* Python3
* In juCi++ preferences, set `project.python_command` to `PYTHONUNBUFFERED=1 python3`
Install language server, and create symbolic link to enable server in juCi++:
```sh
pip3 install python-language-server
ln -s pyls /usr/local/bin/python-language-server
```
* Additional setup within a Python project:
* Add a setup file, for instance: `printf '[pycodestyle]\nmax-line-length = 120\n\n[yapf]\nCOLUMN_LIMIT = 120\n' > setup.cfg`
* Add an empty `.python-format` file to enable style format on save
## Rust
* Prerequisites:
* Rust
Install language server, and create symbolic link to enable server in juCi++:
```sh
rustup update
rustup component add rls-preview rust-analysis rust-src
ln -s `rustc --print sysroot`/bin/rls /usr/local/bin/rust-language-server
```
* Additional setup within a Rust project:
* Add an empty `.rust-format` file to enable style format on save
Loading…
Cancel
Save