summaryrefslogtreecommitdiff
path: root/server/src/method/workspace/didChangeWorkspaceFolders.lua
blob: dc8bb4a11e79181b05667949a3b89ce8a28db66d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local rpc = require 'rpc'
local lang = require 'language'

return function ()
    -- 暂不支持多个工作目录,因此当工作目录切换时,暴力结束服务,让前端重启服务
    rpc:requestWait('window/showMessageRequest', {
        type = 3,
        message = lang.script('MWS_NOT_SUPPORT', '[Lua]'),
        actions = {
            {
                title = lang.script.MWS_RESTART,
            }
        }
    }, function ()
        os.exit(true)
    end)
end