Name | helios-language-server JSON |
Version |
0.3.1
JSON |
| download |
home_page | None |
Summary | Language server for Helios, a non-Haskell Cardano smart contract DSL. |
upload_time | 2024-09-14 14:15:34 |
maintainer | None |
docs_url | None |
author | et |
requires_python | <3.12,>=3.7 |
license | MIT |
keywords |
cardano
helios
neovim
lsp
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# helios-language-server
[![image-version](https://img.shields.io/pypi/v/helios-language-server.svg)](https://python.org/pypi/helios-language-server)
[![image-python-versions](https://img.shields.io/badge/python->=3.7-blue)](https://python.org/pypi/helios-language-server)
Language server for <a href="https://github.com/Hyperion-BT/Helios">Helios</a>, a non-Haskell Cardano smart contract language.
Uses the <a href="https://github.com/openlawlibrary/pygls">pygls</a> lsp framework and <a href="https://github.com/tree-sitter/tree-sitter">tree-sitter</a> for syntax tree generation.
![auto-complete](./img/auto-complete.gif)
## Requirements
* `Python >=3.7`
* `python3-pip` (Ubuntu/Debian)
* `python3-venv` (Ubuntu/Debian)
## Installation
### coc.nvim
1. Easy way via npm package <a href="https://github.com/et9797/coc-helios">coc-helios</a>:
`:CocInstall coc-helios`
2. Alternatively, if you know how to set up Python virtual environments:
`python3 -m venv .venv` <br>
`source .venv/bin/activate` <br>
`pip install helios-language-server`
Put this in your `coc-settings.json` file (`:CocConfig`):
```json
{
"languageserver": {
"helios": {
"command": "helios-language-server",
"args": ["--stdio"],
"filetypes": ["*.hl", "hl"]
}
}
```
The language server should now activate whenever you open `.hl` files, provided you have `filetype.nvim` plugin installed.
### VSCode
  See <a href="https://github.com/Et9797/vscode-helios">vscode-helios</a>.
## Capabilities
- [x] Auto-completions
- [x] Hover
- [x] Signature help
- [x] Syntax errors
- [ ] Go to definition
## Comments
Currently only supports builtin types and methods up until **Helios v0.9.2** (apart from import statements).
While in general the tree-sitter parser works okay, there are several shortcomings as it is not always error tolerant.
Meaning that if there are syntax errors present in the source code, the parser can sometimes generate error nodes spanning the entire document.
This may lead to no/unexpected auto-completions. Unfortunately, not too much can be done about the parser's error recovery ability at this stage,
as this is still also an open <a href="https://github.com/tree-sitter/tree-sitter/issues/1870#issuecomment-1248659929">issue</a> with tree-sitter.
I have tried to address some commonly occuring parsing errors.
## To-dos
- Parser improvements
- Advanced diagnostics
- Semantic highlighting
- Imports
- Go to definition
- Support newer Helios versions
- Tree-sitter syntax highlighting (nvim)
- Type checking
Raw data
{
"_id": null,
"home_page": null,
"name": "helios-language-server",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12,>=3.7",
"maintainer_email": null,
"keywords": "cardano, helios, neovim, lsp",
"author": "et",
"author_email": "etet1997@hotmail.com",
"download_url": "https://files.pythonhosted.org/packages/ef/2c/37cba3378005406bf88162ed54b8c75979e8087d973762600166e1035004/helios_language_server-0.3.1.tar.gz",
"platform": null,
"description": "# helios-language-server\n\n[![image-version](https://img.shields.io/pypi/v/helios-language-server.svg)](https://python.org/pypi/helios-language-server)\n[![image-python-versions](https://img.shields.io/badge/python->=3.7-blue)](https://python.org/pypi/helios-language-server)\n\nLanguage server for <a href=\"https://github.com/Hyperion-BT/Helios\">Helios</a>, a non-Haskell Cardano smart contract language.\nUses the <a href=\"https://github.com/openlawlibrary/pygls\">pygls</a> lsp framework and <a href=\"https://github.com/tree-sitter/tree-sitter\">tree-sitter</a> for syntax tree generation.\n\n![auto-complete](./img/auto-complete.gif)\n\n## Requirements\n\n* `Python >=3.7`\n* `python3-pip` (Ubuntu/Debian)\n* `python3-venv` (Ubuntu/Debian)\n\n## Installation\n\n### coc.nvim\n1. Easy way via npm package <a href=\"https://github.com/et9797/coc-helios\">coc-helios</a>:\n\n `:CocInstall coc-helios`\n\n2. Alternatively, if you know how to set up Python virtual environments:\n\n `python3 -m venv .venv` <br>\n `source .venv/bin/activate` <br>\n `pip install helios-language-server`\n \n Put this in your `coc-settings.json` file (`:CocConfig`):\n \n ```json\n {\n \"languageserver\": {\n \"helios\": {\n \"command\": \"helios-language-server\",\n \"args\": [\"--stdio\"],\n \"filetypes\": [\"*.hl\", \"hl\"]\n }\n }\n ```\n The language server should now activate whenever you open `.hl` files, provided you have `filetype.nvim` plugin installed. \n\n### VSCode\n  See <a href=\"https://github.com/Et9797/vscode-helios\">vscode-helios</a>.\n\n## Capabilities\n- [x] Auto-completions\n- [x] Hover\n- [x] Signature help\n- [x] Syntax errors\n- [ ] Go to definition\n\n## Comments\nCurrently only supports builtin types and methods up until **Helios v0.9.2** (apart from import statements).\n\nWhile in general the tree-sitter parser works okay, there are several shortcomings as it is not always error tolerant. \nMeaning that if there are syntax errors present in the source code, the parser can sometimes generate error nodes spanning the entire document. \nThis may lead to no/unexpected auto-completions. Unfortunately, not too much can be done about the parser's error recovery ability at this stage, \nas this is still also an open <a href=\"https://github.com/tree-sitter/tree-sitter/issues/1870#issuecomment-1248659929\">issue</a> with tree-sitter. \nI have tried to address some commonly occuring parsing errors.\n\n## To-dos\n- Parser improvements\n- Advanced diagnostics\n- Semantic highlighting\n- Imports\n- Go to definition\n- Support newer Helios versions\n- Tree-sitter syntax highlighting (nvim)\n- Type checking\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Language server for Helios, a non-Haskell Cardano smart contract DSL.",
"version": "0.3.1",
"project_urls": null,
"split_keywords": [
"cardano",
" helios",
" neovim",
" lsp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3edf344d4fe49202ac53e82cf776461c7495262f093eedf9ed64ade0c5fb3d13",
"md5": "ba97d3e50485756e4544ef9598af874e",
"sha256": "f13c443b767e3f01e6fa04d6899cc9c87a72bdca2f5ca61f90a5fec6f7b21b3a"
},
"downloads": -1,
"filename": "helios_language_server-0.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ba97d3e50485756e4544ef9598af874e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.7",
"size": 44720,
"upload_time": "2024-09-14T14:15:33",
"upload_time_iso_8601": "2024-09-14T14:15:33.093714Z",
"url": "https://files.pythonhosted.org/packages/3e/df/344d4fe49202ac53e82cf776461c7495262f093eedf9ed64ade0c5fb3d13/helios_language_server-0.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ef2c37cba3378005406bf88162ed54b8c75979e8087d973762600166e1035004",
"md5": "6f1fed83bc334522c4f1f06eb4c03843",
"sha256": "d853b920a73de42cc716e46dc17c2bb3562cabafb9a8e3b7d80cc30fd31332d2"
},
"downloads": -1,
"filename": "helios_language_server-0.3.1.tar.gz",
"has_sig": false,
"md5_digest": "6f1fed83bc334522c4f1f06eb4c03843",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.7",
"size": 42957,
"upload_time": "2024-09-14T14:15:34",
"upload_time_iso_8601": "2024-09-14T14:15:34.309705Z",
"url": "https://files.pythonhosted.org/packages/ef/2c/37cba3378005406bf88162ed54b8c75979e8087d973762600166e1035004/helios_language_server-0.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-14 14:15:34",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "helios-language-server"
}