Commit graph

10 commits

Author SHA1 Message Date
Folke Lemaitre
e2cb9df7d0
feat(util): util method to check if ts lang is available on any Neovim version. See #1422 2025-02-25 15:25:48 +01:00
Folke Lemaitre
336798345c
fix(picker.highlight): lower case treesitter parser name 2025-02-11 20:02:50 +01:00
Folke Lemaitre
719b36fa70
perf(picker): cache wether ts lang exists and disable smooth scrolling on big files 2025-02-05 21:39:34 +01:00
Folke Lemaitre
af31c31287
perf(picker): cache treesitter line highlights 2025-02-05 20:32:30 +01:00
Folke Lemaitre
32cffd2e60
feat(picker): added notifications picker. Closes #738 2025-01-28 17:16:32 +01:00
Folke Lemaitre
348307a82e
feat(picker.lsp): added lsp_workspace_symbols. Supports live search. Closes #473 2025-01-19 17:29:37 +01:00
Folke Lemaitre
8563dfce68
feat(picker): added git_branches picker. Closes #614 2025-01-19 16:24:35 +01:00
Folke Lemaitre
27b72ecd00
fix(picker.highlight): properly deal with multiline treesitter captures 2025-01-17 13:09:28 +01:00
Folke Lemaitre
924a988d9a
feat(picker.list): better way of highlighting field patterns 2025-01-17 12:40:37 +01:00
Folke Lemaitre
559d6c6bf2
feat(snacks): added snacks.picker (#445)
## Description

More info coming tomorrow.

In short:
- very fast. pretty much realtime filtering/sorting in huge repos (like
1.7 million files)
- extensible
- easy to customize the layout (and lots of presets) with
`snacks.layout`
- simple to create custom pickers
- `vim.ui.select`
- lots of builtin pickers
- uses treesitter highlighting wherever it makes sense
- fast lua fuzzy matcher which supports the [fzf
syntax](https://junegunn.github.io/fzf/search-syntax/) and additionally
supports field filters, like `file:lua$ 'function`

There's no snacks picker command, just use lua.

```lua
-- all pickers
Snacks.picker()

-- run files picker
Snacks.picker.files(opts)
Snacks.picker.pick("files", opts)
Snacks.picker.pick({source = "files", ...})
```

<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Todo
- [x] issue with preview loc not always correct when scrolling fast in
list (probably due to `snacks.scroll`)
- [x] `grep` (`live_grep`) is sometimes too fast in large repos and can
impact ui rendering. Not very noticeable, but something I want to look
at.
- [x] docs
- [x] treesitter highlights are broken. Messed something up somewhere

## Related Issue(s)

<!--
  If this PR fixes any issues, please link to the issue here.
  - Fixes #<issue_number>
-->

## Screenshots

<!-- Add screenshots of the changes if applicable. -->
2025-01-14 22:53:59 +01:00