diff options
author | Lewis Russell <lewis6991@gmail.com> | 2025-03-01 15:51:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-01 15:51:09 +0000 |
commit | ec8922978eb14fe62671628bb25215743712eac0 (patch) | |
tree | d47554beaef78ec4f0ca988adc48f3e2336f38c2 /test/functional/treesitter/language_spec.lua | |
parent | 48e6147e64b819d2a4130697bb348dcd368a4391 (diff) | |
download | rneovim-ec8922978eb14fe62671628bb25215743712eac0.tar.gz rneovim-ec8922978eb14fe62671628bb25215743712eac0.tar.bz2 rneovim-ec8922978eb14fe62671628bb25215743712eac0.zip |
feat(treesitter): add more metadata to `language.inspect()` (#32657)
Problem: No way to check the version of a treesitter parser.
Solution: Add version metadata (ABI 15 parsers only) as well as parser state count and supertype information (ABI 15) in `vim.treesitter.language.inspect()`. Also graduate the `abi_version` field, as this is now the official upstream name.
---------
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Diffstat (limited to 'test/functional/treesitter/language_spec.lua')
-rw-r--r-- | test/functional/treesitter/language_spec.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/functional/treesitter/language_spec.lua b/test/functional/treesitter/language_spec.lua index a93b1063a1..e009d97210 100644 --- a/test/functional/treesitter/language_spec.lua +++ b/test/functional/treesitter/language_spec.lua @@ -63,7 +63,14 @@ describe('treesitter language API', function() return { keys, lang.fields, lang.symbols } end)) - eq({ fields = true, symbols = true, _abi_version = true, _wasm = false }, keys) + eq({ + abi_version = true, + fields = true, + symbols = true, + state_count = true, + supertypes = true, + _wasm = false, + }, keys) local fset = {} for _, f in pairs(fields) do |