Skip to content

Commit

Permalink
Merge pull request #53 from trewjames/readme-tele-opts
Browse files Browse the repository at this point in the history
readme: set and pass telescope opts
  • Loading branch information
ThePrimeagen authored Aug 14, 2021
2 parents 6c61114 + 889eb14 commit b61756e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ end
-- in the mappings below
M = {}
M.refactors = function()
require("telescope.pickers").new({}, {
local opts = require("telescope.themes").get_cursor() -- set personal telescope options
require("telescope.pickers").new(opts, {
prompt_title = "refactors",
finder = require("telescope.finders").new_table({
results = require("refactoring").get_refactors(),
}),
sorter = require("telescope.config").values.generic_sorter({}),
sorter = require("telescope.config").values.generic_sorter(opts),
attach_mappings = function(_, map)
map("i", "<CR>", refactor)
map("n", "<CR>", refactor)
Expand Down

0 comments on commit b61756e

Please sign in to comment.