diff options
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/hint.lua | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/script/core/hint.lua b/script/core/hint.lua index 90182c39..e58758a3 100644 --- a/script/core/hint.lua +++ b/script/core/hint.lua @@ -1,6 +1,7 @@ -local files = require 'files' -local guide = require 'parser.guide' -local vm = require 'vm' +local files = require 'files' +local guide = require 'parser.guide' +local vm = require 'vm' +local config = require 'config' local function typeHint(uri, start, finish) local ast = files.getAst(uri) @@ -24,6 +25,15 @@ local function typeHint(uri, start, finish) if source.value and (source.value.type == 'function' or source.value.type == 'table') then return end + if source.parent.type == 'funcargs' then + if not config.config.hint.paramType then + return + end + else + if not config.config.hint.setType then + return + end + end local infer = vm.getInferType(source, 0) local src = source if source.type == 'tablefield' then |