AckslD / muren.nvim

Multiple replacements in neovim
361 stars 4 forks source link

Freeze when I try to active some options #31

Open t1gu1 opened 1 year ago

t1gu1 commented 1 year ago

When I try to active dir ou files my terminal freeze. I have to close and reopen everything.

image

Other option seems toggle correctly.

Is there some prerequisite package to install in the OS to get it works?

t1gu1 commented 1 year ago

It seems to happend only if I wrote a patterns or replacement before I toggle the dir or files option.

image

t1gu1 commented 1 year ago

Oh, directly when I active dir option and I write something in the patterns, it freeze too.

t1gu1 commented 1 year ago

I finally find why.

My project is too "big" and it search everywhere. I simply change the files argument to: src/**/* and it was ok.

Is there a way to exclude files? Like /ios/Pods/,/vendor/bundle/,.history,node_modules,dist,.git,build/

AckslD commented 1 year ago

Hi @t1gu1, if you're doing recursive replacements in a directory it can be useful to disable preview while typing the replacements and setting the options since that will do the replacements for each keystroke.

AckslD commented 1 year ago

Regarding your question to exclude files, currently muren calls out to :vimgrep but maybe we can optionally instead call :grep which the user can configure to use rg or anything and custom configs to ignore eg .gitignore.

But the syntax for patterns for both the search-term and files would then potentially have to be different.

t1gu1 commented 1 year ago

Considering the .gitignore file would be a nice enhancement. I would'nt had any issues with that.



Some Ideas


Maybe it could be an idea to remove de default value of the files options.

You can try it with a: vimgrep thingsToSearch `git ls-files` | cw


Maybe add a call to action to make the search? e.g. when you pass from insert mode to normal mode it call the search.

In the options, it could have a live preview option instead of a preview and the preview could be always on with the call action.