feat(just): treesitter support for Just (#401)

This commit is contained in:
Qiu Yu 2024-08-21 16:48:39 -07:00 committed by GitHub
parent 8d2a6c2ffa
commit bb95e7fed7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 61 additions and 0 deletions

View file

@ -151,6 +151,7 @@ In addition, you will need to have either Treesitter or a working LSP client. Yo
- javascript
- json
- julia
- just
- latex
- lua
- make

4
queries/just/aerial.scm Normal file
View file

@ -0,0 +1,4 @@
(recipe
(recipe_header
name: (identifier) @name)
(#set! "kind" "Interface")) @symbol

View file

@ -5,6 +5,7 @@ vim.bo.swapfile = false
vim.filetype.add({
-- Neovim doesn't have built-in filetype detection for these filetypes
extension = {
just = "just",
norg = "norg",
objdump = "objdump",
usd = "usd",

View file

@ -0,0 +1,47 @@
[
{
"col": 0,
"end_col": 0,
"end_lnum": 4,
"kind": "Interface",
"level": 0,
"lnum": 1,
"name": "build",
"selection_range": {
"col": 0,
"end_col": 5,
"end_lnum": 1,
"lnum": 1
}
},
{
"col": 0,
"end_col": 0,
"end_lnum": 7,
"kind": "Interface",
"level": 0,
"lnum": 4,
"name": "test",
"selection_range": {
"col": 0,
"end_col": 4,
"end_lnum": 4,
"lnum": 4
}
},
{
"col": 0,
"end_col": 0,
"end_lnum": 9,
"kind": "Interface",
"level": 0,
"lnum": 7,
"name": "sloc",
"selection_range": {
"col": 0,
"end_col": 4,
"end_lnum": 7,
"lnum": 7
}
}
]

View file

@ -0,0 +1,8 @@
build:
cc main.c foo.c bar.c -o main
test: build
./test
sloc:
@echo "`wc -l *.c` lines of code"