casey/tree-sitter-just là dự án mã nguồn mở trên GitHub, viết chủ yếu bằng Just, với 195 sao. Treesitter grammar for Justfiles (casey/just)
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Just queries are now part of nvim-treesitter! Please follow installation
instructions at https://github.com/nvim-treesitter/nvim-treesitter.
Helix
Just queries are also part of Helix!
They should be installed by default.
Manual Installation (Neovim)
This grammar can also be used locally, as a plugin with Plug, Packer, or a
manual clone. This also requires a simple ftdetect plugin for detecting
justfiles.
You can then do require('tree-sitter-just').setup({}) to register the parser
with tree-sitter. You can then do TSInstall/TSUpdate as usual to install
the parser
You can also add the parser manually using (This is similar to what is done in
require"tree-sitter-just".setup({}))
require("nvim-treesitter.parsers").get_parser_configs().just = {
install_info = {
url = "https://github.com/casey/tree-sitter-just", -- local path or git repo
files = { "src/parser.c", "src/scanner.c" },
branch = "main",
-- use_makefile = true -- this may be necessary on MacOS (try if you see compiler errors)
},
maintainers = { "casey/tree-sitter-just maintainers" },
}
Don't forget to :TSInstall after adding this. With this method you do not
have to add this repo as a plugin.
Please note that the nightly version of nvim-treesitter, at least since
5b90ea2abaa4303b9205b5c9002a8cdd0acd11a5 (2024-01-19) is required.
Manual Installation (Helix)
To use the latest version of this repository with Helix, you just need to
update the languages.toml file, often at ~/.config/helix/languages.toml:
[[grammar]]
name = "just"
# Use this line to use a local dependency
source = { path = "/path/toa/tree-sitter-just" }
# Use this line to use a git dependency
# source = { git = "https://github.com/casey/tree-sitter-just", rev = "d9da862c156020c1a83d3c6ccdda32be6d8a5d4a" }
[[language]]
name = "just"
scope = "scope.just"
file-types = ["justfile", "JUSTFILE", "just"]
After updating languages.toml, run hx --grammar build to update.
To get syntax highlighting and other query-based features you will need to
place the queries in a queries/just directory within your runtime folder.
To link to a cloned repository, the following should work:
# Change the second path to your runtime directory if not at `~/.config/helix/runtime`
ln -s $(realpath queries-flavored/helix/) ~/.config/helix/runtime/queries/just
Contributing
The easiest way to get started is, fittingly, with
just.
# Make sure dependencies are available
just setup
# Create autogenerated files and run tests
just test
# Create autogenerated files without testing
just gen
# Check linting rules
just lint
# Apply formatting
just fmt
Note that just lint and just fmt must pass for all changes. You can verify
these automatically before committing by running just pre-commit-install.
All our queries are in queries-src. This directory is what gets tested by
tree-sitter, and should be usable by helix. To generate queries for NeoVim,
run ./build-flavored-queries.py (this is run as part of npm run gen).
You can use the :InspectTree
command to explore the resulting parse tree, and
:Inspect to view highlight
groups.
Quirks of Just
Just currently doesn't seem to support comments between attributes or within if
statements, so we do not either.
[private]
# hello!
[no-cd]
foo:
foo := if true {
# nope!
"abcd"
}
Test Information
The tests directory contains "corpus" tests that are checked for syntax, as
well as "highlight" tests that check the result. The "highlight" test directory
includes some test files generated by the fuzzer that aren't always human
readable.
casey/tree-sitter-just có 195 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/casey/tree-sitter-just. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
casey/tree-sitter-just có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho casey/tree-sitter-just. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
casey/tree-sitter-just còn đang phát triển không?
Commit gần nhất trên casey/tree-sitter-just là 4 tháng trước (theo timestamp GitHub). Repo có 41 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
casey/tree-sitter-just viết bằng ngôn ngữ gì?
casey/tree-sitter-just chủ yếu viết bằng Just. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về casey/tree-sitter-just ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/casey/tree-sitter-just là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về tree-sitter-just?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về tree-sitter-just.