Skip to content

feat: independent search#30

Open
tbung wants to merge 4 commits into
petertriho:mainfrom
tbung:feat-independent-search
Open

feat: independent search#30
tbung wants to merge 4 commits into
petertriho:mainfrom
tbung:feat-independent-search

Conversation

@tbung

@tbung tbung commented Jan 10, 2022

Copy link
Copy Markdown
Contributor

Closes #5.

I'll commit some more documentation later (i.e. on replacing rg with a different tool). We may consider replacing rg by default with grep, although rg is faster everybody has grep installed.

@vuki656

vuki656 commented Jan 10, 2022

Copy link
Copy Markdown

Regarding rg, I'd suggest checking if it's executable and if not, falling back to grep since as you said most people have it installed.

If you default to grep, a good chunk of people won't bother to change it and will have a worse experience out of the box.

@tbung

tbung commented Jan 10, 2022

Copy link
Copy Markdown
Contributor Author

Good idea, added!

end


if vim.fn.executable(command) ~= 1 then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't needed anymore

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth just keeping this just in case

@tbung tbung Jan 11, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this basically cleanly saveguards against not having grep installed. I know grep is on every Linux system, I don't know about macOS, and I'm sure Windows doesn't have it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this check on line 27 and on line 21 are the same?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it's to check for rg then grep

@petertriho

Copy link
Copy Markdown
Owner

This is looking good. I'll need to test this before I merge this in but do you know if this works with things like ignorecase?

@tbung

tbung commented Jan 11, 2022

Copy link
Copy Markdown
Contributor Author

I completely forgot about that, I will have to conditionally add some flags. Shouldn't be difficult, I'll update later today.

@CallumHoward

Copy link
Copy Markdown

Any update on this one?

@petertriho

Copy link
Copy Markdown
Owner

@CallumHoward Refactor of the main codebase is in the works, I'll try to add independent search based off this when I have the chance

@CallumHoward

Copy link
Copy Markdown

I'm excited for this refactor! Thanks for your hard work

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.

[Feature Request] Make search marks independent of hlslens

4 participants