Expose state for debugging purposes
This should hopefully make it easier to debug and for users to figure
out what's going on by exposing the state of the plugin.
It is a Lua table, and can be seen via `:lua print(require("gitlab").state)`
The easiest way to print out a Lua table is with some sort of utility
function like this:
```
function printTable(...)
local objects = {}
for i = 1, select("#", ...) do
local v = select(i, ...)
table.insert(objects, vim.inspect(v))
end
print(table.concat(objects, "\n"))
return ...
end
```
This commit is contained in:
@@ -17,6 +17,7 @@ M.list_discussions = discussions.list_discussions
|
||||
M.edit_comment = comment.edit_comment
|
||||
M.delete_comment = comment.delete_comment
|
||||
M.reply = discussions.reply
|
||||
M.state = state
|
||||
|
||||
-- Builds the binary (if not built); starts the Go server; calls the /info endpoint,
|
||||
-- which sets the Gitlab project's information in gitlab.nvim's INFO module
|
||||
|
||||
Reference in New Issue
Block a user