docs: add module names to fix gO (#2064)

This commit is contained in:
Simon Hauser
2022-07-12 09:46:30 +02:00
committed by GitHub
parent 10a3310546
commit 361482c599
7 changed files with 37 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
---@tag telescope.actions.generate
---@config { ["module"] = "telescope.actions.generate" }
---@config { ["module"] = "telescope.actions.generate", ["name"] = "ACTIONS_GENERATE" }
---@brief [[
--- Module for convenience to override defaults of corresponding |telescope.actions| at |telescope.setup()|.

View File

@@ -1,5 +1,5 @@
---@tag telescope.actions.layout
---@config { ["module"] = "telescope.actions.layout" }
---@config { ["module"] = "telescope.actions.layout", ["name"] = "ACTIONS_LAYOUT" }
---@brief [[
--- The layout actions are actions to be used to change the layout of a picker.

View File

@@ -1,5 +1,5 @@
---@tag telescope.actions.set
---@config { ["module"] = "telescope.actions.set" }
---@config { ["module"] = "telescope.actions.set", ["name"] = "ACTIONS_SET" }
---@brief [[
--- Telescope action sets are used to provide an interface for managing

View File

@@ -1,5 +1,5 @@
---@tag telescope.actions.state
---@config { ["module"] = "telescope.actions.state" }
---@config { ["module"] = "telescope.actions.state", ["name"] = "ACTIONS_STATE" }
---@brief [[
--- Functions to be used to determine the current state of telescope.

View File

@@ -1,5 +1,5 @@
---@tag telescope.actions.utils
---@config { ["module"] = "telescope.actions.utils" }
---@config { ["module"] = "telescope.actions.utils", ["name"] = "ACTIONS_UTILS" }
---@brief [[
--- Utilities to wrap functions around picker selections and entries.

View File

@@ -90,6 +90,7 @@ local telescope = {}
---@brief ]]
---@tag telescope.nvim
---@config { ["name"] = "INTRODUCTION" }
--- Setup function to be run by user. Configures the defaults, pickers and
--- extensions of telescope.
@@ -134,12 +135,6 @@ function telescope.setup(opts)
_extensions.set_config(opts.extensions)
end
--- Register an extension. To be used by plugin authors.
---@param mod table: Module
function telescope.register_extension(mod)
return _extensions.register(mod)
end
--- Load an extension.
--- - Notes:
--- - Loading triggers ext setup via the config passed in |telescope.setup|
@@ -148,6 +143,12 @@ function telescope.load_extension(name)
return _extensions.load(name)
end
--- Register an extension. To be used by plugin authors.
---@param mod table: Module
function telescope.register_extension(mod)
return _extensions.register(mod)
end
--- Use telescope.extensions to reference any extensions within your configuration. <br>
--- While the docs currently generate this as a function, it's actually a table. Sorry.
telescope.extensions = require("telescope._extensions").manager