Skip to content

Commit

Permalink
docs: fixed action comments
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 27, 2024
1 parent 89b0427 commit 0a8746b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lua/trouble/docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,15 @@ function M.api()
desc = action.desc or desc
action = action.action
end
desc = table.concat(
vim.tbl_map(function(line)
return ("--- %s"):format(line)
end, vim.split(desc, "\n")),
"\n"
)
if type(action) == "function" and not vim.tbl_contains(exclude, k) then
funcs[#funcs + 1] = ([[
--- %s
%s
---@param opts? trouble.Mode | { new? : boolean } | string
---@return trouble.View
require("trouble").%s(opts)]]):format(desc, k)
Expand Down

0 comments on commit 0a8746b

Please sign in to comment.