docs: add module prefix (#1847)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.actions.generate
|
---@tag telescope.actions.generate
|
||||||
|
---@config { ["module"] = "telescope.actions.generate" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Module for convenience to override defaults of corresponding |telescope.actions| at |telescope.setup()|.
|
--- Module for convenience to override defaults of corresponding |telescope.actions| at |telescope.setup()|.
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ local utils = require "telescope.utils"
|
|||||||
|
|
||||||
local uv = vim.loop
|
local uv = vim.loop
|
||||||
|
|
||||||
|
---@tag telescope.actions.history
|
||||||
|
---@config { ["module"] = "telescope.actions.history" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- A base implementation of a prompt history that provides a simple history
|
--- A base implementation of a prompt history that provides a simple history
|
||||||
--- and can be replaced with a custom implementation.
|
--- and can be replaced with a custom implementation.
|
||||||
@@ -22,7 +25,6 @@ local uv = vim.loop
|
|||||||
---
|
---
|
||||||
--- See github.com/nvim-telescope/telescope-smart-history.nvim
|
--- See github.com/nvim-telescope/telescope-smart-history.nvim
|
||||||
---@brief ]]
|
---@brief ]]
|
||||||
---@tag telescope.actions.history
|
|
||||||
|
|
||||||
-- TODO(conni2461): currently not present in plenary path only sync.
|
-- TODO(conni2461): currently not present in plenary path only sync.
|
||||||
-- But sync is just unnecessary here
|
-- But sync is just unnecessary here
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
---@tag telescope.actions
|
---@tag telescope.actions
|
||||||
|
---@config { ["module"] = "telescope.actions" }
|
||||||
-- TODO: Add @module to make it so we can have the prefix.
|
|
||||||
--@module telescope.actions
|
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Actions functions that are useful for people creating their own mappings.
|
--- Actions functions that are useful for people creating their own mappings.
|
||||||
@@ -12,41 +10,39 @@
|
|||||||
--- (1) The `prompt_bufnr` of a normal function denotes the identifier of your
|
--- (1) The `prompt_bufnr` of a normal function denotes the identifier of your
|
||||||
--- picker which can be used to access the picker state. In practice, users
|
--- picker which can be used to access the picker state. In practice, users
|
||||||
--- most commonly access from both picker and global state via the following:
|
--- most commonly access from both picker and global state via the following:
|
||||||
---
|
|
||||||
--- <code>
|
--- <code>
|
||||||
--- -- for utility functions
|
--- -- for utility functions
|
||||||
--- local action_state = require "telescope.actions.state"
|
--- local action_state = require "telescope.actions.state"
|
||||||
---
|
---
|
||||||
--- local actions = {}
|
--- local actions = {}
|
||||||
--- actions.do_stuff = function(prompt_bufnr)
|
--- actions.do_stuff = function(prompt_bufnr)
|
||||||
--- local current_picker = action_state.get_current_picker(prompt_bufnr) -- picker state
|
--- local current_picker = action_state.get_current_picker(prompt_bufnr) -- picker state
|
||||||
--- local entry = action_state.get_selected_entry()
|
--- local entry = action_state.get_selected_entry()
|
||||||
--- end
|
--- end
|
||||||
--- </code>
|
--- </code>
|
||||||
---
|
---
|
||||||
--- See |telescope.actions.state| for more information.
|
--- See |telescope.actions.state| for more information.
|
||||||
---
|
---
|
||||||
--- (2) To transform a module of functions into a module of "action"s, you need
|
--- (2) To transform a module of functions into a module of "action"s, you need
|
||||||
--- to do the following:
|
--- to do the following:
|
||||||
---
|
|
||||||
--- <code>
|
--- <code>
|
||||||
--- local transform_mod = require("telescope.actions.mt").transform_mod
|
--- local transform_mod = require("telescope.actions.mt").transform_mod
|
||||||
---
|
---
|
||||||
--- local mod = {}
|
--- local mod = {}
|
||||||
--- mod.a1 = function(prompt_bufnr)
|
--- mod.a1 = function(prompt_bufnr)
|
||||||
--- -- your code goes here
|
--- -- your code goes here
|
||||||
--- -- You can access the picker/global state as described above in (1).
|
--- -- You can access the picker/global state as described above in (1).
|
||||||
--- end
|
--- end
|
||||||
---
|
---
|
||||||
--- mod.a2 = function(prompt_bufnr)
|
--- mod.a2 = function(prompt_bufnr)
|
||||||
--- -- your code goes here
|
--- -- your code goes here
|
||||||
--- end
|
--- end
|
||||||
--- mod = transform_mod(mod)
|
--- mod = transform_mod(mod)
|
||||||
---
|
---
|
||||||
--- -- Now the following is possible. This means that actions a2 will be executed
|
--- -- Now the following is possible. This means that actions a2 will be executed
|
||||||
--- -- after action a1. You can chain as many actions as you want.
|
--- -- after action a1. You can chain as many actions as you want.
|
||||||
--- local action = mod.a1 + mod.a2
|
--- local action = mod.a1 + mod.a2
|
||||||
--- action(bufnr)
|
--- action(bufnr)
|
||||||
--- </code>
|
--- </code>
|
||||||
---
|
---
|
||||||
--- Another interesing thing to do is that these actions now have functions you
|
--- Another interesing thing to do is that these actions now have functions you
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.actions.layout
|
---@tag telescope.actions.layout
|
||||||
|
---@config { ["module"] = "telescope.actions.layout" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- The layout actions are actions to be used to change the layout of a picker.
|
--- The layout actions are actions to be used to change the layout of a picker.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.actions.set
|
---@tag telescope.actions.set
|
||||||
|
---@config { ["module"] = "telescope.actions.set" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Telescope action sets are used to provide an interface for managing
|
--- Telescope action sets are used to provide an interface for managing
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.actions.state
|
---@tag telescope.actions.state
|
||||||
|
---@config { ["module"] = "telescope.actions.state" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Functions to be used to determine the current state of telescope.
|
--- Functions to be used to determine the current state of telescope.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.actions.utils
|
---@tag telescope.actions.utils
|
||||||
|
---@config { ["module"] = "telescope.actions.utils" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Utilities to wrap functions around picker selections and entries.
|
--- Utilities to wrap functions around picker selections and entries.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---@tag telescope.builtin
|
---@tag telescope.builtin
|
||||||
|
|
||||||
---@config { ['field_heading'] = "Options" }
|
---@config { ['field_heading'] = "Options", ["module"] = "telescope.builtin" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Telescope Builtins is a collection of community maintained pickers to support common workflows. It can be used as
|
--- Telescope Builtins is a collection of community maintained pickers to support common workflows. It can be used as
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.command
|
---@tag telescope.command
|
||||||
|
---@config { ["module"] = "telescope.command" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.resolve
|
---@tag telescope.resolve
|
||||||
|
---@config { ["module"] = "telescope.resolve" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Provides "resolver functions" to allow more customisable inputs for options.
|
--- Provides "resolver functions" to allow more customisable inputs for options.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.layout
|
---@tag telescope.layout
|
||||||
|
---@config { ["module"] = "telescope.layout" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- The layout of telescope pickers can be adjusted using the
|
--- The layout of telescope pickers can be adjusted using the
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---@tag telescope.previewers
|
---@tag telescope.previewers
|
||||||
|
---@config { ["module"] = "telescope.previewers" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Provides a Previewer table that has to be implemented by each previewer.
|
--- Provides a Previewer table that has to be implemented by each previewer.
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
-- local opts = themes.get_dropdown { winblend = 3 }
|
-- local opts = themes.get_dropdown { winblend = 3 }
|
||||||
|
|
||||||
---@tag telescope.themes
|
---@tag telescope.themes
|
||||||
|
---@config { ["module"] = "telescope.themes" }
|
||||||
|
|
||||||
---@brief [[
|
---@brief [[
|
||||||
--- Themes are ways to combine several elements of styling together.
|
--- Themes are ways to combine several elements of styling together.
|
||||||
|
|||||||
Reference in New Issue
Block a user