chore: use stylua for formatting (#1040)

* chore: stylua job and config

* reformat with stylua
This commit is contained in:
Simon Hauser
2021-07-23 17:42:37 +02:00
committed by GitHub
parent 664690029f
commit 79644ab677
75 changed files with 3201 additions and 2809 deletions

View File

@@ -6,7 +6,7 @@
--- Generally used from within other |telescope.actions|
---@brief ]]
local action_state = require('telescope.actions.state')
local action_state = require "telescope.actions.state"
local utils = {}
@@ -33,12 +33,12 @@ local utils = {}
---@param prompt_bufnr number: The prompt bufnr
---@param f function: Function to map onto entries of picker that takes (entry, index, row) as viable arguments
function utils.map_entries(prompt_bufnr, f)
vim.validate{
f = {f, "function"}
vim.validate {
f = { f, "function" },
}
local current_picker = action_state.get_current_picker(prompt_bufnr)
local index = 1
-- indices are 1-indexed, rows are 0-indexed
-- indices are 1-indexed, rows are 0-indexed
for entry in current_picker.manager:iter() do
local row = current_picker:get_row(index)
f(entry, index, row)
@@ -69,8 +69,8 @@ end
---@param prompt_bufnr number: The prompt bufnr
---@param f function: Function to map onto selection of picker that takes (selection) as a viable argument
function utils.map_selections(prompt_bufnr, f)
vim.validate{
f = {f, "function"}
vim.validate {
f = { f, "function" },
}
local current_picker = action_state.get_current_picker(prompt_bufnr)
for _, selection in ipairs(current_picker:get_multi_selection()) do