feat: v1 options menu (#133)
Still has a bunch of improvements that can be done, but wanted to merge in some of the related changes. * options parser * wip: vimoptions finder * feat: pre-populate ex-command line with `:set foo=` * use options current value when populating command line * fix: use result.raw_value to store original option value * . * options: Continue work on option finder * [WIP]: Tue 27 Oct 2020 10:34:09 PM EDT * [WIP]: Mon 02 Nov 2020 08:20:13 PM EST * [WIP]: Mon 02 Nov 2020 09:04:23 PM EST Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
This commit is contained in:
@@ -7,12 +7,14 @@ local actions = require('telescope.actions')
|
||||
local config = require('telescope.config')
|
||||
local debounce = require('telescope.debounce')
|
||||
local resolve = require('telescope.config.resolve')
|
||||
local layout_strategies = require('telescope.pickers.layout_strategies')
|
||||
local log = require('telescope.log')
|
||||
local mappings = require('telescope.mappings')
|
||||
local state = require('telescope.state')
|
||||
local utils = require('telescope.utils')
|
||||
|
||||
local layout_strategies = require('telescope.pickers.layout_strategies')
|
||||
local entry_display = require('telescope.pickers.entry_display')
|
||||
|
||||
local EntryManager = require('telescope.entry_manager')
|
||||
|
||||
local get_default = utils.get_default
|
||||
@@ -307,7 +309,9 @@ function Picker:find()
|
||||
|
||||
local results_win, results_opts = popup.create('', popup_opts.results)
|
||||
local results_bufnr = a.nvim_win_get_buf(results_win)
|
||||
|
||||
self.results_bufnr = results_bufnr
|
||||
self.results_win = results_win
|
||||
|
||||
-- TODO: Should probably always show all the line for results win, so should implement a resize for the windows
|
||||
a.nvim_win_set_option(results_win, 'wrap', false)
|
||||
@@ -785,13 +789,8 @@ function Picker:entry_adder(index, entry, score)
|
||||
return
|
||||
end
|
||||
|
||||
local display, display_highlights
|
||||
if type(entry.display) == 'function' then
|
||||
self:_increment("display_fn")
|
||||
display, display_highlights = entry:display()
|
||||
elseif type(entry.display) == 'string' then
|
||||
display = entry.display
|
||||
else
|
||||
local display, display_highlights = entry_display.resolve(self, entry)
|
||||
if not display then
|
||||
log.info("Weird entry", entry)
|
||||
return
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user