diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:55:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:55:41 +0800 |
commit | c63b2e404d8d2bb984afe3678a5ba2b2836380cc (patch) | |
tree | a70661effacc7a29caa8d49583673ac4be2faaf5 /script/method/completionItem | |
parent | 85c5a4210e4447422cd5677369ae740ed65725a0 (diff) | |
download | lua-language-server-c63b2e404d8d2bb984afe3678a5ba2b2836380cc.zip |
remove the old version
Diffstat (limited to 'script/method/completionItem')
-rw-r--r-- | script/method/completionItem/resolve.lua | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/script/method/completionItem/resolve.lua b/script/method/completionItem/resolve.lua deleted file mode 100644 index 0e55d311..00000000 --- a/script/method/completionItem/resolve.lua +++ /dev/null @@ -1,34 +0,0 @@ -local config = require 'config' - -return function (lsp, item) - local context = config.config.completion.displayContext - if context <= 0 then - return item - end - if not item.data then - return item - end - local offset = item.data.offset - local uri = item.data.uri - local _, lines, text = lsp:getVM(uri) - if not lines then - return item - end - local row = lines:rowcol(offset) - local firstRow = lines[row] - local lastRow = lines[math.min(row + context - 1, #lines)] - local snip = text:sub(firstRow.start, lastRow.finish) - local document = ([[ -%s - ------------- -```lua -%s -``` -]]):format(item.documentation and item.documentation.value or '', snip) - item.documentation = { - kind = 'markdown', - value = document, - } - return item -end |