diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 18:19:30 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 18:19:30 +0800 |
commit | b7782be38cb8f9d3f94b615976cdfed00e4c183f (patch) | |
tree | 34a963d3aa899e297702ed08de06a8a3eca20acf /server/test | |
parent | f8390c046278c3b34076d4e250e247a66ecae923 (diff) | |
download | lua-language-server-b7782be38cb8f9d3f94b615976cdfed00e4c183f.zip |
提示require的候选目标
Diffstat (limited to 'server/test')
-rw-r--r-- | server/test/crossfile/completion.lua | 20 | ||||
-rw-r--r-- | server/test/crossfile/init.lua | 2 |
2 files changed, 20 insertions, 2 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua index d98de0cc..37f1f5d7 100644 --- a/server/test/crossfile/completion.lua +++ b/server/test/crossfile/completion.lua @@ -1,4 +1,4 @@ -local service = require 'service' +local service = require 'server' local workspace = require 'workspace' local fs = require 'bee.filesystem' local matcher = require 'matcher' @@ -129,3 +129,21 @@ TEST { }, } } + +TEST { + { + path = 'abc.lua', + content = '', + }, + { + path = 'test.lua', + content = 'require "A@"', + main = true, + }, + completion = { + { + label = 'abc', + kind = CompletionItemKind.Module, + }, + } +} diff --git a/server/test/crossfile/init.lua b/server/test/crossfile/init.lua index 488635c6..b74514af 100644 --- a/server/test/crossfile/init.lua +++ b/server/test/crossfile/init.lua @@ -1,3 +1,3 @@ require 'crossfile.definition' require 'crossfile.hover' ---require 'crossfile.completion' +require 'crossfile.completion' |