|
m.register 'textDocument/completion' { |
|
---@async |
|
function (params) |
|
local uri = files.getRealUri(params.textDocument.uri) |
|
if not workspace.isReady(uri) then |
|
return nil |
|
end |
Before checking whether the workspace is ready, I think as a first step the config value of 'Lua.completion.enable' should be checked.
Compare 'textDocument/hover' as a reference:
|
m.register 'textDocument/hover' { |
|
capability = { |
|
hoverProvider = true, |
|
}, |
|
abortByFileUpdate = true, |
|
---@async |
|
function (params) |
|
local doc = params.textDocument |
|
local uri = files.getRealUri(doc.uri) |
|
if not config.get(uri, 'Lua.hover.enable') then |
|
return |
|
end |
|
if not workspace.isReady(uri) then |
lua-language-server/script/provider/provider.lua
Lines 617 to 623 in 802e13c
Before checking whether the workspace is ready, I think as a first step the config value of '
Lua.completion.enable' should be checked.Compare
'textDocument/hover'as a reference:lua-language-server/script/provider/provider.lua
Lines 340 to 352 in 802e13c