Skip to content

wip: new setup docs#3670

Draft
jamestrew wants to merge 1 commit into
nvim-telescope:masterfrom
jamestrew:push-npuztslpwokr
Draft

wip: new setup docs#3670
jamestrew wants to merge 1 commit into
nvim-telescope:masterfrom
jamestrew:push-npuztslpwokr

Conversation

@jamestrew

Copy link
Copy Markdown
Contributor

Replacing the existing config.lua dynamic approach for documenting telescope.setup(opts)'s opts values to the ---@class approach.

There's a somewhat complicated coupling and chain of inheritance between many of the fields, the base picker class and the many builtin pickers. Like how each builtin picker (and extension pickers) inherit many but not all of the default options (eg vimgrep_arguments are for only a couple builtins) which share many but not all the base picker options. Many of the base picker options are yet to be documented. And then some options are "config-only", and not passable to pickers at invocation time (eg theme and mappings).

  • don't really like telescope.setup.pickers in the current form. worth keeping?
  • want to make clearer that each picker inherit from telescope.builtin.base_opts set by pickers > defaults
  • clean up config.lua, dropping existing descriptions, the ---@eval call based on it
  • field descriptions are pretty much copy/pasted from the old descriptions with minor docgen/markdown support clean up but probably more cleanup opportunities present

@clason

clason commented May 25, 2026

Copy link
Copy Markdown
Contributor

Ouch, that looks like a lot more work than I anticipated...

And, yeah, the dynamic nature and complex dependencies is a general issue that makes telescope maintenance so difficult... I am honestly not sure how much of this is necessary/useful and how much was just "we do what we must because we can" showing off...

I do think that the concept of extensions is core to the telescope identity (moreso than slight design choice differences that make some people prefer it over newer alternatives), but I'm sure that can be simplified or streamlined (with enough effort, which I don't expect anybody to put in!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants