diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-08 21:11:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-08 21:11:14 +0800 |
commit | 0be605ef1eab73a662540ae2f02766aee47149eb (patch) | |
tree | 49f9a881656ad4241bf198dcbb36d8026b92543d /script/provider | |
parent | 242d5ed3ff9b84ffa2ceae33df5641fd0a611519 (diff) | |
download | lua-language-server-0be605ef1eab73a662540ae2f02766aee47149eb.zip |
code-action: convert JSON to Lua
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/capability.lua | 1 | ||||
-rw-r--r-- | script/provider/provider.lua | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/script/provider/capability.lua b/script/provider/capability.lua index 08b4779a..a9338713 100644 --- a/script/provider/capability.lua +++ b/script/provider/capability.lua @@ -79,6 +79,7 @@ function m.getIniter() commands = { 'lua.removeSpace:' .. sp:get_id(), 'lua.solve:' .. sp:get_id(), + 'lua.jsonToLua:' .. sp:get_id(), }, }, foldingRangeProvider = true, diff --git a/script/provider/provider.lua b/script/provider/provider.lua index fd304c97..10b5fc8b 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -678,6 +678,9 @@ proto.on('workspace/executeCommand', function (params) elseif command == 'lua.solve' then local core = require 'core.command.solve' return core(params.arguments[1]) + elseif command == 'lua.jsonToLua' then + local core = require 'core.command.jsonToLua' + return core(params.arguments[1]) end end) |