summaryrefslogtreecommitdiff
path: root/script/core/code-action.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-05 22:04:17 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-05 22:04:17 +0800
commit9c03601143094f6552a90b7e3f4975594bc00553 (patch)
tree14fb0c91af7796595d2159162c8021cb20b49512 /script/core/code-action.lua
parent19dd94e4af06254595a949a61c9bd05c5a911328 (diff)
downloadlua-language-server-9c03601143094f6552a90b7e3f4975594bc00553.zip
Revert "stash"
This reverts commit 19dd94e4af06254595a949a61c9bd05c5a911328.
Diffstat (limited to 'script/core/code-action.lua')
-rw-r--r--script/core/code-action.lua31
1 files changed, 0 insertions, 31 deletions
diff --git a/script/core/code-action.lua b/script/core/code-action.lua
index 13d5220d..3a7f7374 100644
--- a/script/core/code-action.lua
+++ b/script/core/code-action.lua
@@ -279,34 +279,6 @@ local function solveDiagnostic(uri, diag, results)
disableDiagnostic(uri, diag.code, results)
end
-local function checkSwapParams(results, uri, start, finish)
- local ast = files.getAst(uri)
- if not ast then
- return
- end
- local result = guide.eachSourceBetween(ast.ast, start, finish, function (source)
- if source.type == 'callargs' then
- return {
- node = source.parent.node,
- args = source,
- }
- end
- if source.type == 'funcargs' then
- return {
- node = source.parent,
- args = source,
- }
- end
- end)
- if not result then
- return
- end
-end
-
-local function checkExtractAsFunction(results, uri, start, finish)
-
-end
-
return function (uri, start, finish, diagnostics)
local ast = files.getAst(uri)
if not ast then
@@ -319,8 +291,5 @@ return function (uri, start, finish, diagnostics)
solveDiagnostic(uri, diag, results)
end
- checkSwapParams(results, uri, start, finish)
- checkExtractAsFunction(results, uri, start, finish)
-
return results
end