Browse Source

Added instructions on how to use the pyright language server

merge-requests/413/head
eidheim 3 years ago
parent
commit
b8bda75048
  1. 25
      docs/language_servers.md

25
docs/language_servers.md

@ -60,6 +60,8 @@ cp /usr/local/bin/javascript-language-server /usr/local/bin/typescriptreact-lang
- Python3
- In juCi++ preferences, set `project.python_command` to `python3 -u`
### Python LSP Server
Install language server, and create symbolic link to enable server in juCi++:
```sh
@ -74,6 +76,29 @@ ln -s `which pylsp` /usr/local/bin/python-language-server
`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
### Pyright
- Prerequisite:
- Node.js
- Recommended:
- [YAPF](https://github.com/google/yapf) for style format (`pip3 install yapf`)
Install language server, and create executable to enable server in juCi++:
```sh
npm install -g pyright
# Usually as root:
echo '#!/bin/sh
pyright-langserver --stdio' > /usr/local/bin/python-language-server
chmod 755 /usr/local/bin/python-language-server
```
- Additional setup within a Python project:
- Add Pyright configuration file: `echo '{}' > pyrightconfig.json`
- Add style format file to enable format on save, for instance:
`printf '[style]\nCOLUMN_LIMIT = 120\n' > .style.yapf`
## Rust
- Prerequisites:

Loading…
Cancel
Save