summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
Diffstat (limited to 'script')
-rw-r--r--script/core/hover/init.lua1
-rw-r--r--script/core/searcher.lua2
-rw-r--r--script/provider/provider.lua9
3 files changed, 1 insertions, 11 deletions
diff --git a/script/core/hover/init.lua b/script/core/hover/init.lua
index 51dacada..41616bc9 100644
--- a/script/core/hover/init.lua
+++ b/script/core/hover/init.lua
@@ -155,7 +155,6 @@ local function getHoverByUri(uri, offset)
if not source then
return nil
end
- vm.getAllDefs(source)
local hover = getHover(source)
if SHOWSOURCE then
hover.description = ('%s\n---\n\n```lua\n%s\n```'):format(
diff --git a/script/core/searcher.lua b/script/core/searcher.lua
index 2da811b0..3055a5f4 100644
--- a/script/core/searcher.lua
+++ b/script/core/searcher.lua
@@ -200,7 +200,7 @@ local function crossSearch(status, uri, expect, mode, sourceUri)
end
local function checkCache(status, uri, expect, mode)
- local cache = vm.getCache('search:' .. mode, true)
+ local cache = vm.getCache('search:' .. mode)
local fileCache = cache[uri]
if not fileCache then
fileCache = {}
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 57126bff..5b1200cc 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -82,9 +82,6 @@ local function updateConfig()
workspace.reload()
semantic.refresh()
end
- if not util.equal(oldConfig.intelliSense, newConfig.intelliSense) then
- files.flushCache()
- end
if newConfig.completion.enable then
completion.enable()
@@ -304,7 +301,6 @@ proto.on('textDocument/hover', function (params)
if not files.exists(uri) then
return nil
end
- vm.flushCache()
local offset = files.offsetOfWord(uri, params.position)
local hover = core.byUri(uri, offset)
if not hover then
@@ -331,7 +327,6 @@ proto.on('textDocument/definition', function (params)
if not files.exists(uri) then
return nil
end
- vm.flushCache()
local offset = files.offsetOfWord(uri, params.position)
local result = core(uri, offset)
if not result then
@@ -361,7 +356,6 @@ proto.on('textDocument/references', function (params)
if not files.exists(uri) then
return nil
end
- vm.flushCache()
local offset = files.offsetOfWord(uri, params.position)
local result = core(uri, offset)
if not result then
@@ -383,7 +377,6 @@ proto.on('textDocument/documentHighlight', function (params)
if not files.exists(uri) then
return nil
end
- vm.flushCache()
local offset = files.offsetOfWord(uri, params.position)
local result = core(uri, offset)
if not result then
@@ -407,7 +400,6 @@ proto.on('textDocument/rename', function (params)
if not files.exists(uri) then
return nil
end
- vm.flushCache()
local offset = files.offsetOfWord(uri, params.position)
local result = core.rename(uri, offset, params.newName)
if not result then
@@ -433,7 +425,6 @@ proto.on('textDocument/prepareRename', function (params)
if not files.exists(uri) then
return nil
end
- vm.flushCache()
local offset = files.offsetOfWord(uri, params.position)
local result = core.prepareRename(uri, offset)
if not result then