aboutsummaryrefslogtreecommitdiff
path: root/test/functional/script/luacats_grammar_spec.lua
diff options
context:
space:
mode:
authorJames Trew <j.trew10@gmail.com>2024-05-02 23:33:22 -0400
committerLewis Russell <me@lewisr.dev>2024-05-07 14:33:14 +0100
commit93940af1d456ec52f39cb2912b5ffb8445d26c98 (patch)
tree3aa4f9394120760fd022fef1576d4f10c4e0045f /test/functional/script/luacats_grammar_spec.lua
parentc3c673cdeca25594454f8721e725e6ff1127e2a8 (diff)
downloadrneovim-93940af1d456ec52f39cb2912b5ffb8445d26c98.tar.gz
rneovim-93940af1d456ec52f39cb2912b5ffb8445d26c98.tar.bz2
rneovim-93940af1d456ec52f39cb2912b5ffb8445d26c98.zip
docs(luacats): support backtick captured generic type
Problem: While LuaCATS's generics system are still considered WIP by luals, they currently support type captured generics. See "Capture with Backtick" example: https://luals.github.io/wiki/annotations/#generic Solution: Add support for it in the LuaCATS grammar
Diffstat (limited to 'test/functional/script/luacats_grammar_spec.lua')
-rw-r--r--test/functional/script/luacats_grammar_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/script/luacats_grammar_spec.lua b/test/functional/script/luacats_grammar_spec.lua
index 2dd3ad8a78..6d444e1888 100644
--- a/test/functional/script/luacats_grammar_spec.lua
+++ b/test/functional/script/luacats_grammar_spec.lua
@@ -152,4 +152,11 @@ describe('luacats grammar', function()
name = '[1]',
type = 'integer',
})
+
+ test('@param type `T` this is a generic type', {
+ desc = 'this is a generic type',
+ kind = 'param',
+ name = 'type',
+ type = '`T`',
+ })
end)