diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-18 20:36:20 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-18 20:36:20 +0800 |
commit | a2075b5411c81ab4e7c3da79be1d0e6e56ea7f45 (patch) | |
tree | f318445077df15b94776314a650d83adf349a19c /script/brave | |
parent | fb1d31d354648445d975fe827c237351f036c562 (diff) | |
download | lua-language-server-a2075b5411c81ab4e7c3da79be1d0e6e56ea7f45.zip |
cleanup
Diffstat (limited to 'script/brave')
-rw-r--r-- | script/brave/work.lua | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/script/brave/work.lua b/script/brave/work.lua index e1c08a79..6307c777 100644 --- a/script/brave/work.lua +++ b/script/brave/work.lua @@ -24,43 +24,3 @@ brave.on('timer', function (time) brave.push('wakeup') end end) - -brave.on('compile', function (text) - local state, err = parser.compile(text, 'Lua', 'Lua 5.4') - if not state then - log.error(err) - return - end - local lines = parser.lines(text) - return { - root = state.root, - value = state.value, - errs = state.errs, - lines = lines, - } -end) - -brave.on('listDirectory', function (uri) - local path = fs.path(furi.decode(uri)) - local uris = {} - for child in fs.pairs(path) do - local childUri = furi.encode(child:string()) - uris[#uris+1] = childUri - end - return uris -end) - -brave.on('isDirectory', function (uri) - local path = fs.path(furi.decode(uri)) - return fs.is_directory(path) -end) - -brave.on('loadFile', function (uri) - local filename = furi.decode(uri) - return util.loadFile(filename) -end) - -brave.on('saveFile', function (params) - local filename = furi.decode(params.uri) - return util.saveFile(filename, params.text) -end) |