summaryrefslogtreecommitdiff
path: root/script-beta
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta')
-rw-r--r--script-beta/config.lua7
-rw-r--r--script-beta/core/definition.lua3
-rw-r--r--script-beta/vm/getLinks.lua10
3 files changed, 17 insertions, 3 deletions
diff --git a/script-beta/config.lua b/script-beta/config.lua
index 1f5a2eb0..7ce0cbd7 100644
--- a/script-beta/config.lua
+++ b/script-beta/config.lua
@@ -124,9 +124,10 @@ local ConfigTemplate = {
)}
},
completion = {
- enable = {true, Boolean},
- callSnippet = {'Both', String},
- keywordSnippet = {'Both', String},
+ enable = {true, Boolean},
+ callSnippet = {'Disable', String},
+ keywordSnippet = {'Replace', String},
+ displayContext = {6, Integer},
},
signatureHelp = {
enable = {true, Boolean},
diff --git a/script-beta/core/definition.lua b/script-beta/core/definition.lua
index e51d12aa..0259536f 100644
--- a/script-beta/core/definition.lua
+++ b/script-beta/core/definition.lua
@@ -73,6 +73,9 @@ local function checkRequire(source, offset)
end
local function convertIndex(source)
+ if not source then
+ return
+ end
if source.type == 'string'
or source.type == 'boolean'
or source.type == 'number' then
diff --git a/script-beta/vm/getLinks.lua b/script-beta/vm/getLinks.lua
index 8032f55a..b034fd24 100644
--- a/script-beta/vm/getLinks.lua
+++ b/script-beta/vm/getLinks.lua
@@ -19,3 +19,13 @@ function vm.getLinksTo(uri)
vm.getCache('getLinksTo')[uri] = cache
return cache
end
+
+function vm.getFileLinks(uri)
+ local cache = vm.getCache('getFileLinks')[uri]
+ if cache ~= nil then
+ return cache
+ end
+ cache = getFileLinks(uri)
+ vm.getCache('getFileLinks')[uri] = cache
+ return cache
+end