Skip to content

Commit

Permalink
doc: hide setup function from API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Aug 7, 2024
1 parent 0b7ded4 commit a508430
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 64 deletions.
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,26 +256,6 @@ for just the quickfix window.

<!-- API -->

### setup(opts)

`setup(opts)`

| Param | Type | Desc | |
| ----- | --------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| opts | `nil\|quicker.SetupOptions` | | |
| | on_qf | `nil\|fun(bufnr: number)` | Callback function to run any custom logic or keymaps for the quickfix buffer |
| | constrain_cursor | `nil\|boolean` | Keep the cursor to the right of the filename and lnum columns |
| | opts | `nil\|table<string, any>` | Local options to set for quickfix |
| | keys | `nil\|quicker.Keymap[]` | Keymaps to set for the quickfix buffer |
| | use_default_opts | `nil\|boolean` | Set to false to disable the default options in `opts` |
| | highlight | `nil\|quicker.SetupHighlightConfig` | Configure syntax highlighting |
| | edit | `nil\|quicker.SetupEditConfig` | |
| | type_icons | `nil\|table<string, string>` | Map of quickfix item type to icon |
| | borders | `nil\|quicker.SetupBorders` | Characters used for drawing the borders |
| | trim_leading_whitespace | `nil\|boolean` | Trim the leading whitespace from results |
| | max_filename_width | `nil\|fun(): integer` | Maximum width of the filename column |
| | header_length | `nil\|fun(type: "hard"\|"soft", start_col: integer): integer` | How far the header should extend to the right |

### expand(opts)

`expand(opts)` \
Expand Down
43 changes: 0 additions & 43 deletions doc/quicker.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,49 +81,6 @@ OPTIONS *quicker-option
--------------------------------------------------------------------------------
API *quicker-api*

setup({opts}) *quicker.setup*

Parameters:
{opts} `nil|quicker.SetupOptions`
{on_qf} `nil|fun(bufnr: number)` Callback function to run
any custom logic or keymaps for the quickfix buffer
{constrain_cursor} `nil|boolean` Keep the cursor to the right of the
filename and lnum columns
{opts} `nil|table<string, any>` Local options to set for
quickfix
{keys} `nil|quicker.Keymap[]` Keymaps to set for the
quickfix buffer
{use_default_opts} `nil|boolean` Set to false to disable the default
options in `opts`
{highlight} `nil|quicker.SetupHighlightConfig` Configure syntax
highlighting
{treesitter} `nil|boolean` Enable treesitter syntax highlighting
{lsp} `nil|boolean` Use LSP semantic token highlighting
{load_buffers} `nil|boolean` Load the referenced buffers to apply
more accurate highlights (may be slow)
{edit} `nil|quicker.SetupEditConfig`
{enabled} `nil|boolean`
{autosave} `nil|boolean|"unmodified"`
{type_icons} `nil|table<string, string>` Map of quickfix item
type to icon
{borders} `nil|quicker.SetupBorders` Characters used for
drawing the borders
{vert} `nil|string`
{strong_header} `nil|string` Strong headers separate results from
different files
{strong_cross} `nil|string`
{strong_end} `nil|string`
{soft_header} `nil|string` Soft headers separate results within
the same file
{soft_cross} `nil|string`
{soft_end} `nil|string`
{trim_leading_whitespace} `nil|boolean` Trim the leading whitespace
from results
{max_filename_width} `nil|fun(): integer` Maximum width of the
filename column
{header_length} `nil|fun(type: "hard"|"soft", start_col: integer): integer`
How far the header should extend to the right

expand({opts}) *quicker.expand*
Expand the context around the quickfix results.

Expand Down
4 changes: 3 additions & 1 deletion lua/quicker/init.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local M = {}

---@param opts? quicker.SetupOptions
M.setup = function(opts)
local function setup(opts)
local config = require("quicker.config")
config.setup(opts)

Expand Down Expand Up @@ -49,6 +49,8 @@ M.setup = function(opts)
vim.o.quickfixtextfunc = "v:lua.require'quicker.display'.quickfixtextfunc"
end

M.setup = setup

---Expand the context around the quickfix results.
---@param opts? quicker.ExpandOpts
---@note
Expand Down

0 comments on commit a508430

Please sign in to comment.