MituuZ / fuzzier

IntelliJ file finder plugin inspired by Telescope (designed for ideavim)
MIT License
13 stars 4 forks source link

Fuzzy Search for "File Structure" #62

Open Kyren223 opened 4 months ago

Kyren223 commented 4 months ago

Similar to the IntelliJ built-in "File Structure" image

But allows for fuzzy searching and vim-like navigation Would be cool if it had settings like different scopes like Current File, Entire Project, Entire Project with git etc

MituuZ commented 4 months ago

I can't see why this wouldn't be possible. I'll have to finish a bit of a refactor and solve the customizable actions first though

Kyren223 commented 4 months ago

Alright, awesome, let me know if u need any more details on how this will work

MituuZ commented 3 months ago

@Kyren223 what do you think about this suggestion on handling and creating custom searches?

Custom searches

Kyren223 commented 3 months ago

@MituuZ Looks good other than 1 thing, having an extra step for selecting the specific search seems tedious, so there needs to be some way to immediately open that using a hotkey (maybe something like ":FuzzierOpenCustomSearchs" to open then immediately go to s, not sure if this will work) But if there is a way to assign some shortcut to opening it immediately then it's good. In any case, having file structure be a builtin thing of this plugin would be awesome (can use that system and be bundled in as a builtin custom search)

MituuZ commented 3 months ago

@Kyren223 thanks for the input! Yeah that suggestion is pretty vim-like, where chord shortcuts are quite normal.

I do think each search should be usable through a separate shortcut, so the custom search would be extra.

Another option to modify the scope could be to prepend the search with some letter. e.g. c {search term} for local search etc.

I think I'll try to tackle this before the custom search stuff, to have a better idea how it could work.

Kyren223 commented 3 months ago

@MituuZ Finally started setting up my nvim config (will still stick with IntelliJ for java/kotlin bcz it's superior in terms of lsp and stuff) so I learned about macros, and how macros work is there is a key + a letter/number, maybe you can do the same

Have a custom action for each letter like FuzzierCustom[A-Z1-9] and then have in the settings allow to assign 1 search to these numbers. that way, u can have as many searches as u want, but there will be a limit on how many u can use at one time (any letter + number should be plenty)

It's alot of hardcoding but that's what I did with Trident (harpoon basically) I have hardcoded TridentSeelct1, TridentSelect2 etc up until 9

MituuZ commented 2 months ago

Mostly done with my summer studies for now and did some research on this. This would be good as this forces the search to be line based instead of just file based enabling more granular searches.

I think I could do this now with UAST, but this would only work on JVM languages.

The classes for general implementation (if I'm correct) seem to be behind the kotlin-compiler dependency which does break some things, more so because I want to use the new 2.0.0 version.

I think I should start with migrating to the new compiler and tackle this after it.

Kyren223 commented 2 months ago

Yea I totally don't mind it being JVM-only. This past month I was working hard on my nvim config, yesterday I was setting up java and realized Eclipse LSP just sucks compared to IntelliJ's, so for java/kotlin, I will be sticking to IntelliJ, for other langs I now use nvim.

After using telescope I now notice all the little annoyances with Fuzzier (IntelliJ's fault for being kinda slow and not as snappy as nvim, it's not ur fault, Fuzzier is amazing!)

MituuZ commented 2 months ago

I know exactly what you mean.

Aso tried expanding my nvim config to include Java and Kotlin, but decided it was nicer to keep them in IntelliJ :smile: