diff --git a/SUPPORTED_LANGUAGES.md b/SUPPORTED_LANGUAGES.md index 361585ab2..10b7c76d6 100644 --- a/SUPPORTED_LANGUAGES.md +++ b/SUPPORTED_LANGUAGES.md @@ -228,6 +228,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | | @steelsojka [purescript](https://github.com/postsolar/tree-sitter-purescript) | unstable | `H  JL` | | @postsolar [pymanifest](https://github.com/tree-sitter-grammars/tree-sitter-pymanifest) | unstable | `H  J ` | | @ObserverOfTime [python](https://github.com/tree-sitter/tree-sitter-python) | unstable | `HFIJL` | | @stsewd, @theHamsta +[qf](https://github.com/OXY2DEV/tree-sitter-qf)[^qf] | unstable | `H  J ` | | @OXY2DEV [ql](https://github.com/tree-sitter/tree-sitter-ql) | unstable | `HFIJL` | | @pwntester [qmldir](https://github.com/tree-sitter-grammars/tree-sitter-qmldir) | unstable | `H  J ` | | @amaanq [qmljs](https://github.com/yuja/tree-sitter-qmljs) | unstable | `HF J ` | | @Decodetalkers @@ -356,6 +357,7 @@ jsx (queries only)[^jsx] | unstable | `HFIJ ` | | @steelsojka [^php_only]: PHP without embedded HTML [^poe_filter]: Path of Exile item filter [^properties]: Java properties files +[^qf]: Vim quickfix list [^query]: Tree-sitter query language [^sflog]: Salesforce debug log [^slang]: Shader Slang diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 16d575512..a0743862c 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1778,6 +1778,15 @@ return { maintainers = { '@stsewd', '@theHamsta' }, tier = 2, }, + qf = { + install_info = { + revision = '6a9d1deb934749720aa3bc525f1506f7d2ae4d0a', + url = 'https://github.com/OXY2DEV/tree-sitter-qf', + }, + maintainers = { '@OXY2DEV' }, + tier = 2, + readme_note = 'Vim quickfix list', + }, ql = { install_info = { revision = '1fd627a4e8bff8c24c11987474bd33112bead857', diff --git a/runtime/queries/qf/highlights.scm b/runtime/queries/qf/highlights.scm new file mode 100644 index 000000000..5f0b31e95 --- /dev/null +++ b/runtime/queries/qf/highlights.scm @@ -0,0 +1,38 @@ +[ + "|" + "-" +] @punctuation.delimiter + +(filename) @string.special.path + +(row + [ + (value) + (from) + (to) + ] @number) + +"col" @keyword + +(col + [ + (value) + (from) + (to) + ] @number) + +((item_type) @comment.error + (#eq? @comment.error "error")) + +((item_type) @comment.warning + (#eq? @comment.warning "warning")) + +((item_type) @comment.note + (#eq? @comment.note "note")) + +((code_block) @markup.raw.block + (#set! priority 90)) + +(code_block + (language_delimiter) @markup.raw.block + (#set! conceal "")) diff --git a/runtime/queries/qf/injections.scm b/runtime/queries/qf/injections.scm new file mode 100644 index 000000000..15e65f77a --- /dev/null +++ b/runtime/queries/qf/injections.scm @@ -0,0 +1,8 @@ +; Automatic language(slightly inaccurate). +; filename.lua | 10 col 5 | local value = 10; +(quickfix_item + (filename) @injection.filename + (range) + (code_block + . + (content) @injection.content .))