Skip to content
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

Telescope-style search box #8279

Open
1 task done
SalamanderXing opened this issue Feb 23, 2024 · 13 comments
Open
1 task done

Telescope-style search box #8279

SalamanderXing opened this issue Feb 23, 2024 · 13 comments
Labels
enhancement [core label] search / project search Feedback for in-file search, multi-buffer global search, etc

Comments

@SalamanderXing
Copy link

Check for existing issues

  • Completed

Describe the feature

In (neo)vim I'm able to search for file names and contents using telescope. This has the following advantages:

  • runs search as I type
  • I don't have to leave the current tab so it's faster
  • Since the preview of a file and the list of files are separated I can just very quickly scroll through the list of files only using my keyboard

If applicable, add mockups / screenshots to help present your vision of the feature

Screenshot 2024-02-23 at 15 57 27
@SalamanderXing SalamanderXing added admin read Pending admin review enhancement [core label] triage Maintainer needs to classify the issue labels Feb 23, 2024
@JosephTLyons JosephTLyons added search / project search Feedback for in-file search, multi-buffer global search, etc and removed triage Maintainer needs to classify the issue admin read Pending admin review labels Feb 26, 2024
@ryanwinchester
Copy link

It's the main thing I'll miss from neovim

Screen.Recording.2024-04-19.at.7.53.25.PM.mov

@ryanwinchester
Copy link

And the grep version

Screen.Recording.2024-04-19.at.8.00.28.PM.mov

@NachoNievaG
Copy link

Agree completely.
Also, the live grep requires ripgrep (rust based) as a dependency, which using it in Zed sounds suitable. (talking as an outsider regarding integrations tho)

@lungarella-raffaele
Copy link

Would be the feature that makes me move from vs-code

@martincartledge
Copy link

Please make this happen!

@joachimhorshauge
Copy link

This would be amazing

@ElhamAryanpur
Copy link

absolutely, I'm on board too

@raozaeemshahid
Copy link

I also want this to happen, It'll speed the coding.

@costinsin
Copy link

This would be very nice!

@vjdhanota
Copy link

In case it helps anyone else, I was able to set up a task that uses rg, fzf and bat for a better find in files experience:

  {
    "label": "search:project",
    "command": "QUERY=${ZED_SELECTED_TEXT:-}; FILE=$(rg --column --hidden --line-number --no-heading --color=always --smart-case --colors match:fg:green --colors path:fg:white --colors path:style:nobold --glob '!**/.git/' '--glob' '!**/node_modules'  \"$QUERY\" . | fzf --ansi --delimiter : --preview 'bat --style=numbers,changes,header --color=always --highlight-line {2} {1}' --preview-window 'up:60%: {2} 3/3' --layout=reverse --query \"$QUERY\" --print-query | tail -1); if [ -n \"$FILE\" ]; then LINE=$(echo $FILE | cut -d':' -f2); COL=$(echo $FILE | cut -d':' -f3); FILE=$(echo $FILE | cut -d':' -f1); zed $FILE:$LINE:$COL; fi",
    "env": {},
    "cwd": "${ZED_WORKTREE_ROOT}",
    "allow_concurrent_runs": false,
    "use_new_terminal": false,
    "reveal": "always",
    "hide": "on_success"
  },

The preview window is specific to my layout but should be pretty easy to update (--preview-window 'up:60%: {2} 3/3' --layout=reverse). There is probably a cleaner way to set this up but it has worked for me so far.

Something built-in like telescope would be amazing

@j-o-sh
Copy link

j-o-sh commented Sep 11, 2024

This 🙌

I'm soooo in favor. This is the main (and atm. basically the only) missing feature that keeps me from switching to Zed from Neovim. - I don't care for tabs or clunky file trees that much but am totally content using Telescope for this.

Things I'd need from that:

  • Fuzzy find files in the root dir (basic Telescope)
  • Grep over files in root dir
  • Find files in the open buffers

Bonus:

  • Grep over files in the open buffers
  • Find (and Grep in) files that have been modified in the current branch of the repo

@Koshkaj
Copy link

Koshkaj commented Sep 12, 2024

If this gets added to the editor along with errorlens. consider me as a loyal lifelong Zed user.

@eduDorus
Copy link

eduDorus commented Oct 9, 2024

This would be a very nice addition! Keep up the good work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement [core label] search / project search Feedback for in-file search, multi-buffer global search, etc
Projects
None yet
Development

No branches or pull requests