Skip to content

Commit

Permalink
docs: remove test modes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 27, 2024
1 parent 3e8b227 commit e5d258d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ Modes:

- **diagnostics**: diagnostics
- **diagnostics_buffer**: buffer diagnostics
- **fs**:
- **loclist**: Location List
- **lsp**: LSP definitions, references, implementations, type definitions, and declarations
- **lsp_declarations**: declarations
Expand All @@ -291,7 +290,6 @@ Modes:
- **quickfix**: Quickfix List
- **symbols**: document symbols
- **telescope**: Telescope results previously opened with `require('trouble.sources.telescope').open()`.
- **todo**:

<!-- modes:end -->

Expand Down
7 changes: 5 additions & 2 deletions lua/trouble/docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ function M.modes()
---@type string[]
local lines = {}

local exclude = { "fs", "todo" }
local modes = Config.modes()
for _, mode in ipairs(modes) do
local m = Config.get(mode)
lines[#lines + 1] = ("- **%s**: %s"):format(mode, m.desc or "")
if not vim.tbl_contains(exclude, mode) then
local m = Config.get(mode)
lines[#lines + 1] = ("- **%s**: %s"):format(mode, m.desc or "")
end
end

return { content = table.concat(lines, "\n") }
Expand Down

0 comments on commit e5d258d

Please sign in to comment.