mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-08-16 02:45:09 +00:00
chore: use stylua for formatting (#1040)
* chore: stylua job and config * reformat with stylua
This commit is contained in:
+17
-19
@@ -1,18 +1,17 @@
|
||||
|
||||
local make_entry = require('telescope.make_entry')
|
||||
local actions = require('telescope.actions')
|
||||
local action_state = require('telescope.actions.state')
|
||||
local finders = require('telescope.finders')
|
||||
local previewers = require('telescope.previewers')
|
||||
local pickers = require('telescope.pickers')
|
||||
local sorters = require('telescope.sorters')
|
||||
local make_entry = require "telescope.make_entry"
|
||||
local actions = require "telescope.actions"
|
||||
local action_state = require "telescope.actions.state"
|
||||
local finders = require "telescope.finders"
|
||||
local previewers = require "telescope.previewers"
|
||||
local pickers = require "telescope.pickers"
|
||||
local sorters = require "telescope.sorters"
|
||||
|
||||
local WIP = {}
|
||||
|
||||
WIP.git_diff = function()
|
||||
local file_picker = pickers.new {
|
||||
previewer = previewers.new_termopen {
|
||||
command = "git diff %s"
|
||||
command = "git diff %s",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -24,13 +23,13 @@ WIP.git_diff = function()
|
||||
|
||||
fn_command = function()
|
||||
return {
|
||||
command = 'git',
|
||||
args = {'ls-files', '-m'}
|
||||
command = "git",
|
||||
args = { "ls-files", "-m" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
sorter = sorters.get_norcalli_sorter()
|
||||
sorter = sorters.get_norcalli_sorter(),
|
||||
}
|
||||
end
|
||||
|
||||
@@ -43,12 +42,12 @@ WIP.completion = function(opts)
|
||||
end
|
||||
|
||||
local lsp_reference_finder = finders.new {
|
||||
results = results
|
||||
results = results,
|
||||
}
|
||||
|
||||
-- TODO: Open the help text for the line.
|
||||
local reference_picker = pickers.new(opts, {
|
||||
prompt = 'vim.api Help Reference',
|
||||
prompt = "vim.api Help Reference",
|
||||
finder = lsp_reference_finder,
|
||||
sorter = sorters.get_norcalli_sorter(),
|
||||
previewer = previewers.help,
|
||||
@@ -57,12 +56,11 @@ WIP.completion = function(opts)
|
||||
reference_picker:find {}
|
||||
end
|
||||
|
||||
|
||||
WIP.reloader = function(opts)
|
||||
opts = opts or {}
|
||||
|
||||
pickers.new(opts, {
|
||||
prompt = 'Packages',
|
||||
prompt = "Packages",
|
||||
finder = finders.new_table {
|
||||
results = vim.tbl_keys(package.loaded),
|
||||
entry_maker = make_entry.gen_from_string(opts),
|
||||
@@ -78,11 +76,11 @@ WIP.reloader = function(opts)
|
||||
print(vim.inspect(selection))
|
||||
end
|
||||
|
||||
map('i', '<CR>', reload_package)
|
||||
map('n', '<CR>', reload_package)
|
||||
map("i", "<CR>", reload_package)
|
||||
map("n", "<CR>", reload_package)
|
||||
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}):find()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user