summaryrefslogtreecommitdiff
path: root/lua/telescope/actions/init.lua
diff options
context:
space:
mode:
authorSimon Hauser <simon.hauser@helsinki-systems.de>2022-07-07 08:27:46 +0200
committerSimon Hauser <simon.hauser@helsinki-systems.de>2022-07-07 08:27:46 +0200
commitf838695459d75a889ae8d96e370957f0f675902a (patch)
tree886426677b34edaa04dad95b33a2dc7e3514b8cb /lua/telescope/actions/init.lua
parent8fe2dde6560667217682b22d77e1e719b7156cda (diff)
chore: reformat with stylua 0.14.0
Diffstat (limited to 'lua/telescope/actions/init.lua')
-rw-r--r--lua/telescope/actions/init.lua34
1 files changed, 14 insertions, 20 deletions
diff --git a/lua/telescope/actions/init.lua b/lua/telescope/actions/init.lua
index 8f9e5c8..768dc65 100644
--- a/lua/telescope/actions/init.lua
+++ b/lua/telescope/actions/init.lua
@@ -242,10 +242,9 @@ end
---@param prompt_bufnr number: The prompt bufnr
actions.select_default = {
pre = function(prompt_bufnr)
- action_state.get_current_history():append(
- action_state.get_current_line(),
- action_state.get_current_picker(prompt_bufnr)
- )
+ action_state
+ .get_current_history()
+ :append(action_state.get_current_line(), action_state.get_current_picker(prompt_bufnr))
end,
action = function(prompt_bufnr)
return action_set.select(prompt_bufnr, "default")
@@ -259,10 +258,9 @@ actions.select_default = {
---@param prompt_bufnr number: The prompt bufnr
actions.select_horizontal = {
pre = function(prompt_bufnr)
- action_state.get_current_history():append(
- action_state.get_current_line(),
- action_state.get_current_picker(prompt_bufnr)
- )
+ action_state
+ .get_current_history()
+ :append(action_state.get_current_line(), action_state.get_current_picker(prompt_bufnr))
end,
action = function(prompt_bufnr)
return action_set.select(prompt_bufnr, "horizontal")
@@ -276,10 +274,9 @@ actions.select_horizontal = {
---@param prompt_bufnr number: The prompt bufnr
actions.select_vertical = {
pre = function(prompt_bufnr)
- action_state.get_current_history():append(
- action_state.get_current_line(),
- action_state.get_current_picker(prompt_bufnr)
- )
+ action_state
+ .get_current_history()
+ :append(action_state.get_current_line(), action_state.get_current_picker(prompt_bufnr))
end,
action = function(prompt_bufnr)
return action_set.select(prompt_bufnr, "vertical")
@@ -293,10 +290,9 @@ actions.select_vertical = {
---@param prompt_bufnr number: The prompt bufnr
actions.select_tab = {
pre = function(prompt_bufnr)
- action_state.get_current_history():append(
- action_state.get_current_line(),
- action_state.get_current_picker(prompt_bufnr)
- )
+ action_state
+ .get_current_history()
+ :append(action_state.get_current_line(), action_state.get_current_picker(prompt_bufnr))
end,
action = function(prompt_bufnr)
return action_set.select(prompt_bufnr, "tab")
@@ -1175,10 +1171,8 @@ actions.which_key = function(prompt_bufnr, opts)
+ opts.name_width
+ (3 * #opts.separator)
local num_total_columns = math.floor((vim.o.columns - #column_indent) / entry_width)
- opts.num_rows = math.min(
- math.ceil(#mappings / num_total_columns),
- resolver.resolve_height(opts.max_height)(_, _, vim.o.lines)
- )
+ opts.num_rows =
+ math.min(math.ceil(#mappings / num_total_columns), resolver.resolve_height(opts.max_height)(_, _, vim.o.lines))
local total_available_entries = opts.num_rows * num_total_columns
local winheight = opts.num_rows + 2 * opts.line_padding