summaryrefslogtreecommitdiff
path: root/script-beta/provider/provider.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/provider/provider.lua')
-rw-r--r--script-beta/provider/provider.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/script-beta/provider/provider.lua b/script-beta/provider/provider.lua
index 57ae637e..70c5fb50 100644
--- a/script-beta/provider/provider.lua
+++ b/script-beta/provider/provider.lua
@@ -523,3 +523,17 @@ proto.on('textDocument/documentSymbol', function (params)
return symbols
end)
+
+proto.on('textDocument/codeAction', function (params)
+ local core = require 'core.code-action'
+ local uri = params.textDocument.uri
+ local range = params.range
+ local diagnostics = params.context.diagnostics
+ local results = core(uri, range, diagnostics)
+
+ if not results or #results == 0 then
+ return nil
+ end
+
+ return results
+end)