The previous implementation with `self.manager:num_results()` could return
0 despite having results due to suspected async/event loop issues
(#3316). This change counts valid entries manually to ensure accurate
result count.
Few pickers with entry makers that relied on `entry_display.create` were
not properly passing the highlight table returned by `transform_path`.
This made the `filename_first` `path_display` option not work as
expected for these pickers.
* Add options to customize length of symbols and line numbers for gen_from_treesitter
* Revert adding symbol_type_width option
* Add docs and type hint
Currently, the buffer name is normalized to the `cwd` option value.
This buffer name is then used as the filename, which is used as the file
path for the previewer. But if the `cwd` value is not the actual cwd,
the buffer path can no longer be found by the previewer (relative to the
true cwd).
This is fixed by adding a `path` value to the entry that's the full path
of the buffer. The previewer will then use this full path to find the
file to preview.
* Initial commit
* Fixes issue with find_files where devicons where disabled
* Fixes issue with vimgrep where devicons where disabled
* Fixes trailing space for path with only a file name
* Adds test for reverse path_display
* Refactors reverse to filename_first
* Adds tests
* Fixes highlighting
* Fixes linting issues
* Uses trim function
* Fixes issue with highlighting
* Moves local function to utils
* Removes redundant code
* Adds highlighting for gen_from_buffer
* fix formatting
---------
Co-authored-by: alycklama <>
Co-authored-by: James Trew <j.trew10@gmail.com>
* Fix tagrelative option not considered in builtin.tags
* Fix wrong notify name
* ctags filtering with grep or rg and normalize path
* pass stylua check
---------
Co-authored-by: James Trew <j.trew10@gmail.com>
When "= contains expression not ought to be run in current context, the
`getreg('=')` raises error.
For example `:put =foo` (where `foo` is undefined) then open registers
picker it fails. Also #2228.
Now specify second arg to `getreg` to get register expr (instead of
"evaluated" result) as content, like what `:registers` command displays.
This has behavior change, if user still want to see/paste the
evaluated result, a customized action will be needed.