# Tree-sitter ORCA
A [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for [ORCA](https://www.faccts.de/orca/) quantum chemistry input files.
ORCA is a quantum chemistry package for electronic structure calculations.
This grammar parses ORCA input files (`.inp`) including simple command lines, input blocks, geometry specifications as well as complex workflows using compound scripts.
In addition, it provides queries to support syntax highlighting, proper indentation and code folding.
## Demo
<img width="690" height="729" alt="SCR-20250808-ufgv" src="https://github.com/user-attachments/assets/a4dbca4a-0545-4cb6-bdcb-a1a989b401ac" />
## Installation
### PyPI
```bash
pip install tree-sitter-orca
```
### Neovim with nvim-treesitter
#### Enable Parser
Add to your `init.lua`:
```lua
-- Define ORCA '*.inp' extension
vim.filetype.add({
extension = {
inp = "inp",
},
})
-- Enable custom tree-sitter parser
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.orca = {
install_info = {
url = "https://github.com/kszenes/tree-sitter-orca",
files = { "src/parser.c" },
branch = "main",
},
filetype = "inp",
}
```
Install the parser in Neovim using
```
:TSUpdate orca
```
You should now be able to inspect the abstract syntax tree from within Neovim using `:TSInspect`
#### Syntax Highlighting
Create syntax highlighting:
```bash
mkdir -p ~/.config/nvim/queries/orca
ln -s /path/to/tree-sitter-orca/queries/highlights.scm ~/.config/nvim/queries/orca/highlights.scm
```
Raw data
{
"_id": null,
"home_page": null,
"name": "tree-sitter-orca",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "incremental, parsing, tree-sitter, orca",
"author": null,
"author_email": "Kalman Szenes <szenes.kalman@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/92/e1/0b29a41addcb6058b7ccc351975a9567d1d65917fe10b1c958789d4be914/tree_sitter_orca-0.2.2.tar.gz",
"platform": null,
"description": "# Tree-sitter ORCA\n\nA [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) grammar for [ORCA](https://www.faccts.de/orca/) quantum chemistry input files.\n\nORCA is a quantum chemistry package for electronic structure calculations.\nThis grammar parses ORCA input files (`.inp`) including simple command lines, input blocks, geometry specifications as well as complex workflows using compound scripts.\nIn addition, it provides queries to support syntax highlighting, proper indentation and code folding.\n\n## Demo\n\n<img width=\"690\" height=\"729\" alt=\"SCR-20250808-ufgv\" src=\"https://github.com/user-attachments/assets/a4dbca4a-0545-4cb6-bdcb-a1a989b401ac\" />\n\n## Installation\n\n### PyPI\n\n```bash\npip install tree-sitter-orca\n```\n\n### Neovim with nvim-treesitter\n\n#### Enable Parser\n\nAdd to your `init.lua`:\n\n```lua\n-- Define ORCA '*.inp' extension\nvim.filetype.add({\n\textension = {\n\t\tinp = \"inp\",\n\t},\n})\n-- Enable custom tree-sitter parser\nlocal parser_config = require \"nvim-treesitter.parsers\".get_parser_configs()\nparser_config.orca = {\n install_info = {\n url = \"https://github.com/kszenes/tree-sitter-orca\",\n files = { \"src/parser.c\" },\n branch = \"main\",\n },\n filetype = \"inp\",\n}\n```\n\nInstall the parser in Neovim using\n\n```\n:TSUpdate orca\n```\n\nYou should now be able to inspect the abstract syntax tree from within Neovim using `:TSInspect`\n\n#### Syntax Highlighting\n\nCreate syntax highlighting:\n\n```bash\nmkdir -p ~/.config/nvim/queries/orca\nln -s /path/to/tree-sitter-orca/queries/highlights.scm ~/.config/nvim/queries/orca/highlights.scm\n```\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Parser for input file for the Orca quantum chemistry package",
"version": "0.2.2",
"project_urls": {
"Homepage": "https://github.com/kszenes/tree-sitter-orca"
},
"split_keywords": [
"incremental",
" parsing",
" tree-sitter",
" orca"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "43d0347d713e40dba3258df236dc4e26604a15e857f27d5497b33f5e5717c875",
"md5": "b58bfe9a15a4fd3c69c5953fd716dca7",
"sha256": "b509c43aba561a7216694dcac43c8c1759f862cd770396061ea028cd39049e05"
},
"downloads": -1,
"filename": "tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "b58bfe9a15a4fd3c69c5953fd716dca7",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 25195,
"upload_time": "2025-08-10T09:26:29",
"upload_time_iso_8601": "2025-08-10T09:26:29.904488Z",
"url": "https://files.pythonhosted.org/packages/43/d0/347d713e40dba3258df236dc4e26604a15e857f27d5497b33f5e5717c875/tree_sitter_orca-0.2.2-cp310-abi3-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "92e10b29a41addcb6058b7ccc351975a9567d1d65917fe10b1c958789d4be914",
"md5": "8852b774f4f9f40b06aa3fc89841f98e",
"sha256": "a4b53a682543bbf2ee5f4711ac136f68c0632629714397c973ecba35251902e1"
},
"downloads": -1,
"filename": "tree_sitter_orca-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "8852b774f4f9f40b06aa3fc89841f98e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 41921,
"upload_time": "2025-08-10T09:26:31",
"upload_time_iso_8601": "2025-08-10T09:26:31.317327Z",
"url": "https://files.pythonhosted.org/packages/92/e1/0b29a41addcb6058b7ccc351975a9567d1d65917fe10b1c958789d4be914/tree_sitter_orca-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 09:26:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kszenes",
"github_project": "tree-sitter-orca",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tree-sitter-orca"
}