-
-
Notifications
You must be signed in to change notification settings - Fork 902
feat: buf highlights for current buffer fuzzy find #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
lua/telescope/make_entry.lua
Outdated
@@ -685,14 +685,30 @@ function make_entry.gen_from_buffer_lines(opts) | |||
separator = ' │ ', | |||
items = { | |||
{ width = 5 }, | |||
{ remaining = true }, | |||
{ dynamic_highlight = true, }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that actually a thing? I think you solved this differently so we should change that line back to not confuse people reading that code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well technically, I don't think remaining = true
does anything either haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call.
Just thinking out load: We should probably make it explicit and error on wrong key input, so people aren't up being confused if they have a typo, when using width
or right_justify
or something sunjon wanted some time ago, was right side align, not column but result side (currently not possible because we need to lazy evaluate the result window width).
For me it makes sense to validate the items tbl.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it. Works like a charm. Lets ship it :)
Thanks tj :) also treesitter is amazing
Amazing work @tjdevries works well |
* upstream/master: picker(live_grep): add option to grep only over open files (nvim-telescope#666) git(action): create and checkout branch (nvim-telescope#755) readme: fix broken links and spelling errors (nvim-telescope#753) added a new DynamicFinder (which can be used with rust_analyzer) (nvim-telescope#705) feat: add icons to git_status finder (nvim-telescope#401) fix: update to newer code (nvim-telescope#744) pickers(buffers): added only_cwd opt (nvim-telescope#739) feat: asyncify pickers - except for live_grep (nvim-telescope#709) fix: Use standardized names for current buffer fuzzy find (nvim-telescope#737) fix(git_branches): use the quoted fields instead of json-formatting and fix regressions with nvim-telescope#695 (nvim-telescope#704) feat: buf highlights for current buffer fuzzy find (nvim-telescope#732)
Hey @tjdevries, absolutely love this one, BUT... If I have treesitter highlighting disabled for a specific syntax, ie) require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained",
highlight = {
enable = true,
disable = {'php'},
},
} Opening this finder will not only use treesitter in the results view, but will switch to treesitter highlighting in my actual file buffer as well. I can flip back to polyglot highlighting after closing telescope by running PS. Don't judge me. I want to fully switch to treesitter, but the php implementation is a bit buggy in my experience compared to polyglot. I'll get there though! PSS. Don't judge me, for developing in PHP instead of Rust. |
Don't know why the picture is weird, but gives you the right idea at least.