summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorSimon Hauser <Simon-Hauser@outlook.de>2022-04-18 08:21:00 +0200
committerGitHub <noreply@github.com>2022-04-18 08:21:00 +0200
commit831f76a809d9f09724d9f3825a3660ed714470d9 (patch)
treee8ac2dcc8049709706fe1ad6d4c4390c2f00576a /lua
parent66c3e2a3514a25524106f648b0da494d4031eb69 (diff)
docs: add module prefix (#1847)
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/actions/generate.lua1
-rw-r--r--lua/telescope/actions/history.lua4
-rw-r--r--lua/telescope/actions/init.lua48
-rw-r--r--lua/telescope/actions/layout.lua1
-rw-r--r--lua/telescope/actions/set.lua1
-rw-r--r--lua/telescope/actions/state.lua1
-rw-r--r--lua/telescope/actions/utils.lua1
-rw-r--r--lua/telescope/builtin/init.lua2
-rw-r--r--lua/telescope/command.lua1
-rw-r--r--lua/telescope/config/resolve.lua1
-rw-r--r--lua/telescope/pickers/layout_strategies.lua1
-rw-r--r--lua/telescope/previewers/init.lua1
-rw-r--r--lua/telescope/themes.lua1
13 files changed, 36 insertions, 28 deletions
diff --git a/lua/telescope/actions/generate.lua b/lua/telescope/actions/generate.lua
index 487894d..2069b03 100644
--- a/lua/telescope/actions/generate.lua
+++ b/lua/telescope/actions/generate.lua
@@ -1,4 +1,5 @@
---@tag telescope.actions.generate
+---@config { ["module"] = "telescope.actions.generate" }
---@brief [[
--- Module for convenience to override defaults of corresponding |telescope.actions| at |telescope.setup()|.
diff --git a/lua/telescope/actions/history.lua b/lua/telescope/actions/history.lua
index 8323ea7..41b72a9 100644
--- a/lua/telescope/actions/history.lua
+++ b/lua/telescope/actions/history.lua
@@ -4,6 +4,9 @@ local utils = require "telescope.utils"
local uv = vim.loop
+---@tag telescope.actions.history
+---@config { ["module"] = "telescope.actions.history" }
+
---@brief [[
--- A base implementation of a prompt history that provides a simple history
--- 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
---@brief ]]
----@tag telescope.actions.history
-- TODO(conni2461): currently not present in plenary path only sync.
-- But sync is just unnecessary here
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index 2e16f1d..402c979 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -1,7 +1,5 @@
---@tag telescope.actions
-
--- TODO: Add @module to make it so we can have the prefix.
---@module telescope.actions
+---@config { ["module"] = "telescope.actions" }
---@brief [[
--- 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
--- 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:
----
--- <code>
---- -- for utility functions
---- local action_state = require "telescope.actions.state"
+--- -- for utility functions
+--- local action_state = require "telescope.actions.state"
---
---- local actions = {}
---- actions.do_stuff = function(prompt_bufnr)
---- local current_picker = action_state.get_current_picker(prompt_bufnr) -- picker state
---- local entry = action_state.get_selected_entry()
---- end
+--- local actions = {}
+--- actions.do_stuff = function(prompt_bufnr)
+--- local current_picker = action_state.get_current_picker(prompt_bufnr) -- picker state
+--- local entry = action_state.get_selected_entry()
+--- end
--- </code>
---
--- See |telescope.actions.state| for more information.
---
--- (2) To transform a module of functions into a module of "action"s, you need
--- to do the following:
----
--- <code>
---- local transform_mod = require("telescope.actions.mt").transform_mod
+--- local transform_mod = require("telescope.actions.mt").transform_mod
---
---- local mod = {}
---- mod.a1 = function(prompt_bufnr)
---- -- your code goes here
---- -- You can access the picker/global state as described above in (1).
---- end
+--- local mod = {}
+--- mod.a1 = function(prompt_bufnr)
+--- -- your code goes here
+--- -- You can access the picker/global state as described above in (1).
+--- end
---
---- mod.a2 = function(prompt_bufnr)
---- -- your code goes here
---- end
---- mod = transform_mod(mod)
+--- mod.a2 = function(prompt_bufnr)
+--- -- your code goes here
+--- end
+--- mod = transform_mod(mod)
---
---- -- 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.
---- local action = mod.a1 + mod.a2
---- action(bufnr)
+--- -- 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.
+--- local action = mod.a1 + mod.a2
+--- action(bufnr)
--- </code>
---
--- Another interesing thing to do is that these actions now have functions you
diff --git a/lua/telescope/actions/layout.lua b/lua/telescope/actions/layout.lua
index 93f74db..f6f6b13 100644
--- a/lua/telescope/actions/layout.lua
+++ b/lua/telescope/actions/layout.lua
@@ -1,4 +1,5 @@
---@tag telescope.actions.layout
+---@config { ["module"] = "telescope.actions.layout" }
---@brief [[
--- The layout actions are actions to be used to change the layout of a picker.
diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua
index b98ad7e..b880424 100644
--- a/lua/telescope/actions/set.lua
+++ b/lua/telescope/actions/set.lua
@@ -1,4 +1,5 @@
---@tag telescope.actions.set
+---@config { ["module"] = "telescope.actions.set" }
---@brief [[
--- Telescope action sets are used to provide an interface for managing
diff --git a/lua/telescope/actions/state.lua b/lua/telescope/actions/state.lua
index 80fef56..597e2f6 100644
--- a/lua/telescope/actions/state.lua
+++ b/lua/telescope/actions/state.lua
@@ -1,4 +1,5 @@
---@tag telescope.actions.state
+---@config { ["module"] = "telescope.actions.state" }
---@brief [[
--- Functions to be used to determine the current state of telescope.
diff --git a/lua/telescope/actions/utils.lua b/lua/telescope/actions/utils.lua
index 4d0c17d..f69112d 100644
--- a/lua/telescope/actions/utils.lua
+++ b/lua/telescope/actions/utils.lua
@@ -1,4 +1,5 @@
---@tag telescope.actions.utils
+---@config { ["module"] = "telescope.actions.utils" }
---@brief [[
--- Utilities to wrap functions around picker selections and entries.
diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua
index 9c434dd..6b20c5f 100644
--- a/lua/telescope/builtin/init.lua
+++ b/lua/telescope/builtin/init.lua
@@ -1,6 +1,6 @@
---@tag telescope.builtin
----@config { ['field_heading'] = "Options" }
+---@config { ['field_heading'] = "Options", ["module"] = "telescope.builtin" }
---@brief [[
--- Telescope Builtins is a collection of community maintained pickers to support common workflows. It can be used as
diff --git a/lua/telescope/command.lua b/lua/telescope/command.lua
index 4bf30d4..72ee2bf 100644
--- a/lua/telescope/command.lua
+++ b/lua/telescope/command.lua
@@ -1,4 +1,5 @@
---@tag telescope.command
+---@config { ["module"] = "telescope.command" }
---@brief [[
---
diff --git a/lua/telescope/config/resolve.lua b/lua/telescope/config/resolve.lua
index 3c23406..0c92ac6 100644
--- a/lua/telescope/config/resolve.lua
+++ b/lua/telescope/config/resolve.lua
@@ -1,4 +1,5 @@
---@tag telescope.resolve
+---@config { ["module"] = "telescope.resolve" }
---@brief [[
--- Provides "resolver functions" to allow more customisable inputs for options.
diff --git a/lua/telescope/pickers/layout_strategies.lua b/lua/telescope/pickers/layout_strategies.lua
index 20e1fc0..3a84759 100644
--- a/lua/telescope/pickers/layout_strategies.lua
+++ b/lua/telescope/pickers/layout_strategies.lua
@@ -1,4 +1,5 @@
---@tag telescope.layout
+---@config { ["module"] = "telescope.layout" }
---@brief [[
--- The layout of telescope pickers can be adjusted using the
diff --git a/lua/telescope/previewers/init.lua b/lua/telescope/previewers/init.lua
index 3bcbdaf..1e28e41 100644
--- a/lua/telescope/previewers/init.lua
+++ b/lua/telescope/previewers/init.lua
@@ -1,4 +1,5 @@
---@tag telescope.previewers
+---@config { ["module"] = "telescope.previewers" }
---@brief [[
--- Provides a Previewer table that has to be implemented by each previewer.
diff --git a/lua/telescope/themes.lua b/lua/telescope/themes.lua
index ef71f89..4c27bb9 100644
--- a/lua/telescope/themes.lua
+++ b/lua/telescope/themes.lua
@@ -4,6 +4,7 @@
-- local opts = themes.get_dropdown { winblend = 3 }
---@tag telescope.themes
+---@config { ["module"] = "telescope.themes" }
---@brief [[
--- Themes are ways to combine several elements of styling together.