mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
docs: add note for FrecencyOpts (#208)
* docs: add lacked help tags * docs: add FrecencyOpts and its explanation
This commit is contained in:
parent
8783a062f7
commit
14cb823ec2
@ -166,6 +166,7 @@ or to map to a key:
|
|||||||
Filter tags are applied by typing the `:tag:` name (adding surrounding colons)
|
Filter tags are applied by typing the `:tag:` name (adding surrounding colons)
|
||||||
in the finder query. Entering `:<Tab>` will trigger omni completion |compl-omni|.
|
in the finder query. Entering `:<Tab>` will trigger omni completion |compl-omni|.
|
||||||
|
|
||||||
|
*telescope-frecency-usage-dealing-with-uppercase-letters*
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
Dealing with upper case letters
|
Dealing with upper case letters
|
||||||
|
|
||||||
@ -228,6 +229,24 @@ You can call `setup()` with these configuration settings below.
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
<
|
||||||
|
*telescope-frecency-configuration-frecencyopts*
|
||||||
|
*FrecencyOpts*
|
||||||
|
`FrecencyOpts` is a convenient type to use your own configuration. With using
|
||||||
|
this in the type annotation, you can complete items by LSP in writing.
|
||||||
|
|
||||||
|
NOTE: You need a properly configured Language Server for this feature such as
|
||||||
|
lua-ls. https://github.com/LuaLS/lua-language-server
|
||||||
|
>lua
|
||||||
|
require("telescope").setup {
|
||||||
|
extensions = {
|
||||||
|
---@type FrecencyOpts
|
||||||
|
frecency = {
|
||||||
|
auto_validate = false,
|
||||||
|
-- …… other configs
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
<
|
<
|
||||||
*telescope-frecency-configuration-auto_validate*
|
*telescope-frecency-configuration-auto_validate*
|
||||||
auto_validate ~
|
auto_validate ~
|
||||||
|
|||||||
@ -1,5 +1,27 @@
|
|||||||
local os_util = require "frecency.os_util"
|
local os_util = require "frecency.os_util"
|
||||||
|
|
||||||
|
---Type to use when users write their own config.
|
||||||
|
---@class FrecencyOpts
|
||||||
|
---@field recency_values? { age: integer, value: integer }[] default: see lua/frecency/config.lua
|
||||||
|
---@field auto_validate? boolean default: true
|
||||||
|
---@field db_root? string default: vim.fn.stdpath "state"
|
||||||
|
---@field db_safe_mode? boolean default: true
|
||||||
|
---@field db_validate_threshold? integer default: 10
|
||||||
|
---@field default_workspace? string default: nil
|
||||||
|
---@field disable_devicons? boolean default: false
|
||||||
|
---@field filter_delimiter? string default: ":"
|
||||||
|
---@field hide_current_buffer? boolean default: false
|
||||||
|
---@field ignore_patterns? string[] default: { "*.git/*", "*/tmp/*", "term://*" }
|
||||||
|
---@field matcher? "default"|"fuzzy" default: "default"
|
||||||
|
---@field scoring_function? fun(recency: integer, fzy_score: number): number default: see lua/frecency/config.lua
|
||||||
|
---@field max_timestamps? integer default: 10
|
||||||
|
---@field path_display? table default: nil
|
||||||
|
---@field show_filter_column? boolean|string[] default: true
|
||||||
|
---@field show_scores? boolean default: false
|
||||||
|
---@field show_unindexed? boolean default: true
|
||||||
|
---@field workspace_scan_cmd? "LUA"|string[] default: nil
|
||||||
|
---@field workspaces? table<string, string> default: {}
|
||||||
|
|
||||||
---@class FrecencyConfig: FrecencyRawConfig
|
---@class FrecencyConfig: FrecencyRawConfig
|
||||||
---@field ext_config FrecencyRawConfig
|
---@field ext_config FrecencyRawConfig
|
||||||
---@field private values FrecencyRawConfig
|
---@field private values FrecencyRawConfig
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user