mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
feat(just): treesitter support for Just (#401)
This commit is contained in:
parent
8d2a6c2ffa
commit
bb95e7fed7
5 changed files with 61 additions and 0 deletions
|
@ -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
4
queries/just/aerial.scm
Normal file
|
@ -0,0 +1,4 @@
|
|||
(recipe
|
||||
(recipe_header
|
||||
name: (identifier) @name)
|
||||
(#set! "kind" "Interface")) @symbol
|
|
@ -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",
|
||||
|
|
47
tests/symbols/just_test.json
Normal file
47
tests/symbols/just_test.json
Normal 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
|
||||
}
|
||||
}
|
||||
]
|
8
tests/treesitter/just_test.just
Normal file
8
tests/treesitter/just_test.just
Normal 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"
|
Loading…
Reference in a new issue