diff options
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r-- | server/src/method/textDocument/completion.lua | 4 | ||||
-rw-r--r-- | server/src/method/textDocument/definition.lua | 6 | ||||
-rw-r--r-- | server/src/method/textDocument/documentSymbol.lua | 4 | ||||
-rw-r--r-- | server/src/method/textDocument/hover.lua | 6 | ||||
-rw-r--r-- | server/src/method/textDocument/implementation.lua | 6 | ||||
-rw-r--r-- | server/src/method/textDocument/publishDiagnostics.lua | 4 | ||||
-rw-r--r-- | server/src/method/textDocument/references.lua | 4 | ||||
-rw-r--r-- | server/src/method/textDocument/rename.lua | 4 | ||||
-rw-r--r-- | server/src/method/textDocument/signatureHelp.lua | 4 |
9 files changed, 21 insertions, 21 deletions
diff --git a/server/src/method/textDocument/completion.lua b/server/src/method/textDocument/completion.lua index 9c3b00ac..a5df0276 100644 --- a/server/src/method/textDocument/completion.lua +++ b/server/src/method/textDocument/completion.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' local function posToRange(lines, start, finish) local start_row, start_col = lines:rowcol(start) @@ -23,7 +23,7 @@ return function (lsp, params) end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local items = matcher.completion(vm, position) + local items = core.completion(vm, position) if not items then return nil end diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua index 0df5c522..60e6bb1e 100644 --- a/server/src/method/textDocument/definition.lua +++ b/server/src/method/textDocument/definition.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' local function checkWorkSpaceComplete(lsp, result) if result.type ~= 'field' and result.type ~= 'local' then @@ -24,14 +24,14 @@ return function (lsp, params) end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local result = matcher.findResult(vm, position) + local result = core.findResult(vm, position) if not result then return nil end checkWorkSpaceComplete(lsp, result) - local positions = matcher.definition(vm, result) + local positions = core.definition(vm, result) if not positions then return nil end diff --git a/server/src/method/textDocument/documentSymbol.lua b/server/src/method/textDocument/documentSymbol.lua index 49006f3b..fdfe832a 100644 --- a/server/src/method/textDocument/documentSymbol.lua +++ b/server/src/method/textDocument/documentSymbol.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' local function posToRange(lines, start, finish) local start_row, start_col = lines:rowcol(start) @@ -33,7 +33,7 @@ return function (lsp, params) return nil end - local symbols = matcher.documentSymbol(vm) + local symbols = core.documentSymbol(vm) for _, symbol in ipairs(symbols) do convertRange(lines, symbol) diff --git a/server/src/method/textDocument/hover.lua b/server/src/method/textDocument/hover.lua index ca894797..9c98b8f0 100644 --- a/server/src/method/textDocument/hover.lua +++ b/server/src/method/textDocument/hover.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' return function (lsp, params) local uri = params.textDocument.uri @@ -9,12 +9,12 @@ return function (lsp, params) -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local result, source = matcher.findResult(vm, position) + local result, source = core.findResult(vm, position) if not result then return nil end - local hover = matcher.hover(result, source, lsp) + local hover = core.hover(result, source, lsp) if not hover then return nil end diff --git a/server/src/method/textDocument/implementation.lua b/server/src/method/textDocument/implementation.lua index c92a8c56..4c7dfb3a 100644 --- a/server/src/method/textDocument/implementation.lua +++ b/server/src/method/textDocument/implementation.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' local function checkWorkSpaceComplete(lsp, result) if result.value then @@ -21,14 +21,14 @@ return function (lsp, params) end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local result = matcher.findResult(vm, position) + local result = core.findResult(vm, position) if not result then return nil end checkWorkSpaceComplete(lsp, result) - local positions = matcher.implementation(vm, result) + local positions = core.implementation(vm, result) if not positions then return nil end diff --git a/server/src/method/textDocument/publishDiagnostics.lua b/server/src/method/textDocument/publishDiagnostics.lua index 362851ed..e5c8b2ff 100644 --- a/server/src/method/textDocument/publishDiagnostics.lua +++ b/server/src/method/textDocument/publishDiagnostics.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' local lang = require 'language' local DiagnosticSeverity = { @@ -110,7 +110,7 @@ return function (lsp, params) local diagnostics = {} if vm then - local datas = matcher.diagnostics(vm, lines, uri) + local datas = core.diagnostics(vm, lines, uri) for _, data in ipairs(datas) do diagnostics[#diagnostics+1] = createInfo(data, lines) end diff --git a/server/src/method/textDocument/references.lua b/server/src/method/textDocument/references.lua index f9df13ed..555808ca 100644 --- a/server/src/method/textDocument/references.lua +++ b/server/src/method/textDocument/references.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' return function (lsp, params) local uri = params.textDocument.uri @@ -9,7 +9,7 @@ return function (lsp, params) end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local positions = matcher.references(vm, position, declarat) + local positions = core.references(vm, position, declarat) if not positions then return {} end diff --git a/server/src/method/textDocument/rename.lua b/server/src/method/textDocument/rename.lua index 43f0f7cb..fcbdfef7 100644 --- a/server/src/method/textDocument/rename.lua +++ b/server/src/method/textDocument/rename.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' return function (lsp, params) local uri = params.textDocument.uri @@ -9,7 +9,7 @@ return function (lsp, params) end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local positions = matcher.rename(vm, position, newName) + local positions = core.rename(vm, position, newName) if not positions then return {} end diff --git a/server/src/method/textDocument/signatureHelp.lua b/server/src/method/textDocument/signatureHelp.lua index 7620b542..ce72dbc7 100644 --- a/server/src/method/textDocument/signatureHelp.lua +++ b/server/src/method/textDocument/signatureHelp.lua @@ -1,4 +1,4 @@ -local matcher = require 'matcher' +local core = require 'core' return function (lsp, params) local uri = params.textDocument.uri @@ -8,7 +8,7 @@ return function (lsp, params) end -- lua是从1开始的,因此都要+1 local position = lines:position(params.position.line + 1, params.position.character + 1) - local hovers = matcher.signature(vm, position) + local hovers = core.signature(vm, position) if not hovers then return end |