diff --git a/README.md b/README.md index 4b525e1..e757c4a 100644 --- a/README.md +++ b/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++ * 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. -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 * Find symbol through Ctags * Spell checking depending on file context diff --git a/docs/language_servers.md b/docs/language_servers.md new file mode 100644 index 0000000..b7fbde6 --- /dev/null +++ b/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