Skip to content

feat: telescope preview#305

Open
xieyonn wants to merge 1 commit intoj-hui:mainfrom
xieyonn:feat/telescope-preview
Open

feat: telescope preview#305
xieyonn wants to merge 1 commit intoj-hui:mainfrom
xieyonn:feat/telescope-preview

Conversation

@xieyonn
Copy link
Contributor

@xieyonn xieyonn commented Jan 28, 2026

  1. Remove deprecated function vim.api.nvim_buf_add_highlight, add a helper buf builder.
  2. Add missing annotation style.
  3. Use a global variable _G.__fidget_telescope_config is not a good design, and we do not need either.
  4. Remove option use_previewer because set previewer = false in telescope config will just work.

eg:
disable previewer by default, but you can still toggle previewer window.

require("telescope").extensions.fidget.fidget({ previewer = false })

or in telescope extension config.

require("telescope").setup({
  extensions = {
    fidget = {
      previewer = false,
    },
  },
})

before:
image

after:
image

@xieyonn
Copy link
Contributor Author

xieyonn commented Jan 28, 2026

remove use_preview may break your config.
You can just put wrap_text option in telescope config or via api.

require("telescope").setup({
  extensions = {
    fidget = {
      previewer = false,
      wrap_text = false,
    },
  },
})

cc @ButterSus @lucykowal

@xieyonn xieyonn force-pushed the feat/telescope-preview branch 2 times, most recently from b7316ef to 4732b1c Compare January 28, 2026 12:15
1. Remove deprecated function `vim.api.nvim_buf_add_highlight`, add a
   helper buf builder.
2. Add missing annotation style.
2. Use a global variable _G.__fidget_telescope_config is not a good
   design, and we do not need either.
3. Not need a option `use_previewer`, a option in `previewer = false` in
telescope config will just work. Which allow you disable previewer by
default, but you can still toggle previewer window.

eg:
disable preview by default.
```lua
require("telescope").setup({
  extensions = {
    fidget = {
      previewer = false,
    },
  },
})

```

or in lua api
```lua
require("telescope").extensions.fidget.fidget({ previewer = false })
```
@xieyonn xieyonn force-pushed the feat/telescope-preview branch from 4732b1c to d0f84d3 Compare January 30, 2026 05:18
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.

1 participant