summaryrefslogtreecommitdiff
path: root/test/diagnostics
diff options
context:
space:
mode:
authorNeOzay <colpaert.benoit@gmail.com>2024-07-12 20:42:02 +0200
committerNeOzay <colpaert.benoit@gmail.com>2024-07-12 20:42:02 +0200
commit41316bc8a5731a90c1dd5d9d05ee8a0b96cd6449 (patch)
tree0b9de38dc7a83346259bbda8a99a8b5ef930d50a /test/diagnostics
parent46707395df3255808682fdac883f7d86c1ac9a78 (diff)
downloadlua-language-server-41316bc8a5731a90c1dd5d9d05ee8a0b96cd6449.zip
added lua regular expression support for Lua.doc.<scope>Name
Diffstat (limited to 'test/diagnostics')
-rw-r--r--test/diagnostics/invisible.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/diagnostics/invisible.lua b/test/diagnostics/invisible.lua
index 2fc6791e..ed67df7e 100644
--- a/test/diagnostics/invisible.lua
+++ b/test/diagnostics/invisible.lua
@@ -104,6 +104,28 @@ print(t2._id)
]]
config.set(nil, 'Lua.doc.protectedName', nil)
+config.set(nil, 'Lua.doc.regengine', 'lua' )
+config.set(nil, 'Lua.doc.privateName', { '^_[%w_]*%w$' })
+config.set(nil, 'Lua.doc.protectedName', { '^_[%w_]*_$' })
+TEST [[
+---@class A
+---@field _id_ number
+---@field _user number
+
+---@type A
+local t
+print(t.<!_id_!>)
+print(t.<!_user!>)
+
+---@class B: A
+local t2
+print(t2._id_)
+print(t2.<!_user!>)
+]]
+config.set(nil, 'Lua.doc.privateName', nil)
+config.set(nil, 'Lua.doc.protectedName', nil)
+config.set(nil, 'Lua.doc.regengine', nil )
+
TEST [[
---@class A
---@field private x number