diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-24 15:25:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-24 15:25:33 +0800 |
commit | c4823a03b7d7ac6927a1c88859f204874b29a571 (patch) | |
tree | 8a71d126cd29ab793450017ae47762813d55e126 /script/core | |
parent | 29dc52e91c2d14903af4bf616e4e40a30e2a9024 (diff) | |
download | lua-language-server-c4823a03b7d7ac6927a1c88859f204874b29a571.zip |
completion: dont show uri of meta file
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/completion.lua | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua index ccbe401e..3add81e3 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -874,9 +874,6 @@ local function checkUri(ast, text, offset, results) if files.eq(myUri, uri) then goto CONTINUE end - if vm.isMetaFile(uri) then - --goto CONTINUE - end local path = workspace.getRelativePath(uri) local infos = rpath.getVisiblePath(path, config.config.runtime.path) for _, info in ipairs(infos) do @@ -890,11 +887,15 @@ local function checkUri(ast, text, offset, results) } } end - collect[info.expect][#collect[info.expect]+1] = ([=[* [%s](%s) %s]=]):format( - path, - uri, - lang.script('HOVER_USE_LUA_PATH', info.searcher) - ) + if vm.isMetaFile(uri) then + collect[info.expect][#collect[info.expect]+1] = ('* [[meta]](%s)'):format(uri) + else + collect[info.expect][#collect[info.expect]+1] = ([=[* [%s](%s) %s]=]):format( + path, + uri, + lang.script('HOVER_USE_LUA_PATH', info.searcher) + ) + end end end ::CONTINUE:: |