diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-19 17:43:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-19 17:43:34 +0800 |
commit | 71244c2644abc5b4ecc9d3296f9bed99d4bee888 (patch) | |
tree | c2dc97ae119f014dc0e65c33213672b5b63c4858 /script/provider/capability.lua | |
parent | bed0c4911969b521fa3c15158df273c7e6106882 (diff) | |
download | lua-language-server-71244c2644abc5b4ecc9d3296f9bed99d4bee888.zip |
close #384 completion supports interface
Diffstat (limited to 'script/provider/capability.lua')
-rw-r--r-- | script/provider/capability.lua | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/script/provider/capability.lua b/script/provider/capability.lua index 79261129..a87dea20 100644 --- a/script/provider/capability.lua +++ b/script/provider/capability.lua @@ -1,19 +1,11 @@ -local sp = require 'bee.subprocess' -local nonil = require 'without-check-nil' -local client = require 'provider.client' -local platform = require 'bee.platform' +local sp = require 'bee.subprocess' +local nonil = require 'without-check-nil' +local client = require 'provider.client' +local platform = require 'bee.platform' +local completion = require 'provider.completion' local m = {} -local function allWords() - local str = [[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.:('"[,#*@|=- ]] - local list = {} - for c in str:gmatch '.' do - list[#list+1] = c - end - return list -end - local function testFileEvents(initer) initer.fileOperations = { didCreate = { @@ -102,7 +94,7 @@ function m.getIniter() if not client.info.capabilities.textDocument.completion.dynamicRegistration then initer.completionProvider = { resolveProvider = true, - triggerCharacters = allWords(), + triggerCharacters = completion.allWords(), } end nonil.disable() |