diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5cdd48d..a7f0f7e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,6 +24,8 @@ jobs: os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4 + with: + submodules: true - uses: actions/setup-node@v4 with: node-version: 18 @@ -41,6 +43,8 @@ jobs: echo '::warning::Generated files are out of date!' echo '::warning::run `npm run gen` and commit the changes' fi + - name: Configure tree-sitter CLI + - run: npm test - name: Check C files with args shell: bash diff --git a/.gitmodules b/.gitmodules index 559e114..b9fbcec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,23 @@ -[submodule "test-submodules/tree-sitter-bash"] +[submodule "submodules/tree-sitter-bash"] path = submodules/tree-sitter-bash - url = https://github.com/tree-sitter/tree-sitter-bash.git + url = https://github.com/tgross35/tree-sitter-bash.git + branch = patch-1 + shallow = true +[submodule "submodules/tree-sitter-PowerShell"] + path = submodules/tree-sitter-PowerShell + url = https://github.com/tgross35/tree-sitter-PowerShell.git + branch = add-ts-package-config + shallow = true +[submodule "submodules/tree-sitter-perl"] + path = submodules/tree-sitter-perl + url = https://github.com/tgross35/tree-sitter-perl.git + branch = patch-1 + shallow = true +[submodule "submodules/tree-sitter-python"] + path = submodules/tree-sitter-python + url = https://github.com/tree-sitter/tree-sitter-python.git + shallow = true +[submodule "submodules/tree-sitter-regex"] + path = submodules/tree-sitter-regex + url = https://github.com/tree-sitter/tree-sitter-regex.git shallow = true diff --git a/queries/just/injections.scm b/queries/just/injections.scm index 84d9d21..ab179c5 100644 --- a/queries/just/injections.scm +++ b/queries/just/injections.scm @@ -37,27 +37,23 @@ (recipe_line (text) @injection.content))))) -; TODO reenable -; ; NVIM-DISABLE-START -; (recipe_body -; (shebang) @injection.shebang -; (recipe_line -; (text) @injection.content)) -; ; NVIM-DISABLE-END -; (recipe_line -; (text) @injection.content -; (#set! injection.language "bash")) -; ; NVIM-ENABLE (recipe_body -; ; NVIM-ENABLE (shebang) @injection.language -; ; NVIM-ENABLE (recipe_line -; ; NVIM-ENABLE (text) @injection.content) -; ; NVIM-ENABLE (#gsub! injection.language "/#!%*[\/ ](%S+)/" "%1")) -; (external_command -; (command_body) @injection.content -; (#set! injection.language "bash")) + +(recipe_line + (text) @injection.content + (#set! injection.language "bash")) + + (recipe_body ; NVIM-ENABLE + (shebang) @injection.language ; NVIM-ENABLE + (recipe_line ; NVIM-ENABLE + (text) @injection.content) ; NVIM-ENABLE + (#gsub! injection.language "/#!%*[\/ ](%S+)/" "%1")) ; NVIM-ENABLE + +(external_command + (command_body) @injection.content + (#set! injection.language "bash")) ((regex_literal [ diff --git a/submodules/tree-sitter-PowerShell b/submodules/tree-sitter-PowerShell new file mode 160000 index 0000000..9564531 --- /dev/null +++ b/submodules/tree-sitter-PowerShell @@ -0,0 +1 @@ +Subproject commit 956453126b634be53a1dadba70449000fc7a609b diff --git a/submodules/tree-sitter-perl b/submodules/tree-sitter-perl new file mode 160000 index 0000000..f2effa6 --- /dev/null +++ b/submodules/tree-sitter-perl @@ -0,0 +1 @@ +Subproject commit f2effa6c4a5f88e600d316f08a02666a396bcc3a diff --git a/submodules/tree-sitter-python b/submodules/tree-sitter-python new file mode 160000 index 0000000..4bfdd90 --- /dev/null +++ b/submodules/tree-sitter-python @@ -0,0 +1 @@ +Subproject commit 4bfdd9033a2225cc95032ce77066b7aeca9e2efc diff --git a/submodules/tree-sitter-regex b/submodules/tree-sitter-regex new file mode 160000 index 0000000..2354482 --- /dev/null +++ b/submodules/tree-sitter-regex @@ -0,0 +1 @@ +Subproject commit 2354482d7e2e8f8ff33c1ef6c8aa5690410fbc96