{"id":13410801,"url":"https://github.com/IndianBoy42/tree-sitter-just","last_synced_at":"2025-03-14T16:33:03.412Z","repository":{"id":46358749,"uuid":"382652723","full_name":"IndianBoy42/tree-sitter-just","owner":"IndianBoy42","description":"Treesitter grammar for Justfiles (casey/just)","archived":false,"fork":false,"pushed_at":"2025-01-05T22:56:06.000Z","size":1081,"stargazers_count":155,"open_issues_count":3,"forks_count":27,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-06T00:12:37.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Just","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IndianBoy42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-03T15:47:19.000Z","updated_at":"2025-02-25T01:52:27.000Z","dependencies_parsed_at":"2024-01-24T15:28:34.519Z","dependency_job_id":"885a83b1-25de-48a0-a023-dcb96849c525","html_url":"https://github.com/IndianBoy42/tree-sitter-just","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndianBoy42%2Ftree-sitter-just","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndianBoy42%2Ftree-sitter-just/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndianBoy42%2Ftree-sitter-just/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IndianBoy42%2Ftree-sitter-just/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IndianBoy42","download_url":"https://codeload.github.com/IndianBoy42/tree-sitter-just/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610473,"owners_count":20318968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T20:01:09.326Z","updated_at":"2025-03-14T16:33:03.036Z","avatar_url":"https://github.com/IndianBoy42.png","language":"Just","funding_links":[],"categories":["Syntax"],"sub_categories":["Markdown and LaTeX","Assembly"],"readme":"# tree-sitter-just\n\nTree-sitter grammar for Justfiles ([casey/just](https://github.com/casey/just))\n\n## Usage\n\n### Neovim\n\nJust queries are now part of `nvim-treesitter`! Please follow installation\ninstructions at \u003chttps://github.com/nvim-treesitter/nvim-treesitter\u003e.\n\n### Helix\n\nJust queries are also part of [Helix](https://github.com/helix-editor/helix)!\nThey should be installed by default.\n\n### Manual Installation (Neovim)\n\nThis grammar can also be used locally, as a plugin with Plug, Packer, or a\nmanual clone. This also requires a simple `ftdetect` plugin for detecting\njustfiles.\n\nPacker:\n\n```lua\nuse \"IndianBoy42/tree-sitter-just\"\n```\n\nPlug\n\n```vimscript\nPlug 'IndianBoy42/tree-sitter-just'\n```\n\nManual\n\n```\ngit clone https://github.com/IndianBoy42/tree-sitter-just \\\n  ~/.local/share/nvim/site/pack/tree-sitter-queries/start/tree-sitter-just\n```\n\nYou can then do `require('tree-sitter-just').setup({})` to register the parser\nwith tree-sitter. You can then do `TSInstall`/`TSUpdate` as usual to install\nthe parser\n\nYou can also add the parser manually using (This is similar to what is done in\n`require\"tree-sitter-just\".setup({})`)\n\n```lua\nrequire(\"nvim-treesitter.parsers\").get_parser_configs().just = {\n  install_info = {\n    url = \"https://github.com/IndianBoy42/tree-sitter-just\", -- local path or git repo\n    files = { \"src/parser.c\", \"src/scanner.c\" },\n    branch = \"main\",\n    -- use_makefile = true -- this may be necessary on MacOS (try if you see compiler errors)\n  },\n  maintainers = { \"@IndianBoy42\" },\n}\n```\n\nDon't forget to `:TSInstall` after adding this. With this method you do not\nhave to add this repo as a plugin.\n\nPlease note that the nightly version of `nvim-treesitter`, at least since\n`5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5` (2024-01-19) is required.\n\n### Manual Installation (Helix)\n\nTo use the latest version of this repository with Helix, you just need to\nupdate the `languages.toml` file, often at `~/.config/helix/languages.toml`:\n\n```toml\n[[grammar]]\nname = \"just\"\n# Use this line to use a local dependency\nsource = { path = \"/path/toa/tree-sitter-just\" }\n# Use this line to use a git dependency\n# source = { git = \"https://github.com/IndianBoy42/tree-sitter-just\", rev = \"7ad370abd9eb80e9e5266ea04a1e77d5b1692321\" }\n\n[[language]]\nname = \"just\"\nscope = \"scope.just\"\nfile-types = [\"justfile\", \"JUSTFILE\", \"just\"]\n```\n\nAfter updating `languages.toml`, run `hx --grammar build` to update.\n\nTo get syntax highlighting and other query-based features you will need to\nplace the queries in a `queries/just` directory within your runtime folder.\nTo link to a cloned repository, the following should work:\n\n```sh\n# Change the second path to your runtime directory if not at `~/.config/helix/runtime`\nln -s $(realpath queries-flavored/helix/) ~/.config/helix/runtime/queries/just\n```\n\n## Contributing\n\nThe easiest way to get started is, fittingly, with\n[`just`](https://github.com/casey/just).\n\n```sh\n# Make sure dependencies are available\njust setup\n\n# Create autogenerated files and run tests\njust test\n\n# Create autogenerated files without testing\njust gen\n\n# Check linting rules\njust lint\n\n# Apply formatting\njust fmt\n```\n\nNote that `just lint` and `just fmt` must pass for all changes. You can verify\nthese automatically before committing by running `just pre-commit-install`.\n\nAll our queries are in `queries-src`. This directory is what gets tested by\ntree-sitter, and should be usable by helix. To generate queries for NeoVim,\nrun `./build-flavored-queries.py` (this is run as part of `npm run gen`).\n\nYou can use the [`:InspectTree`](https://neovim.io/doc/user/treesitter.html#%3AInspectTree)\ncommand to explore the resulting parse tree, and\n[`:Inspect`](https://neovim.io/doc/user/lua.html#%3AInspect) to view highlight\ngroups.\n\n## Quirks of Just\n\nJust currently doesn't seem to support comments between attributes or within if\nstatements, so we do not either.\n\n```just\n[private]\n# hello!\n[no-cd]\nfoo:\n```\n\n```just\nfoo := if true {\n  # nope!\n  \"abcd\"\n}\n```\n\n## Test Information\n\nThe tests directory contains \"corpus\" tests that are checked for syntax, as\nwell as \"highlight\" tests that check the result. The \"highlight\" test directory\nincludes some test files generated by the fuzzer that aren't always human\nreadable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIndianBoy42%2Ftree-sitter-just","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FIndianBoy42%2Ftree-sitter-just","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FIndianBoy42%2Ftree-sitter-just/lists"}