diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-07-05 15:57:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-07-05 15:57:09 +0800 |
commit | 3ea9e2b4ca40998ac14d56e0f09b33c6b7cb3ad0 (patch) | |
tree | 2c1b298bf9690149a0b75b3671f64fc55cc2df74 /server/src/method | |
parent | b73c30b3bec7c56e9b46021ccf9824df3d0a529b (diff) | |
download | lua-language-server-3ea9e2b4ca40998ac14d56e0f09b33c6b7cb3ad0.zip |
codeAction进行过滤
Diffstat (limited to 'server/src/method')
-rw-r--r-- | server/src/method/textDocument/codeAction.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/src/method/textDocument/codeAction.lua b/server/src/method/textDocument/codeAction.lua index ac1bad61..3c6e8d49 100644 --- a/server/src/method/textDocument/codeAction.lua +++ b/server/src/method/textDocument/codeAction.lua @@ -2,9 +2,18 @@ local core = require 'core' return function (lsp, params) local uri = params.textDocument.uri + local vm, lines = lsp:getVM(uri) + if not vm then + return + end local diagnostics = params.context.diagnostics + local range = params.range - local results = core.codeAction(lsp, uri, diagnostics) + local results = core.codeAction(lsp + , uri + , diagnostics + , range + ) if #results == 0 then return nil |