summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/codeAction.lua
blob: ac1bad61185d5e951eb754e1d0c383e386b5d086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
local core = require 'core'

return function (lsp, params)
    local uri = params.textDocument.uri
    local diagnostics = params.context.diagnostics

    local results = core.codeAction(lsp, uri, diagnostics)

    if #results == 0 then
        return nil
    end

    return results
end