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

Support for search engines #230337

Closed
Febbe opened this issue Oct 2, 2024 · 3 comments
Closed

Support for search engines #230337

Febbe opened this issue Oct 2, 2024 · 3 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@Febbe
Copy link

Febbe commented Oct 2, 2024

We want to extend clangd-vscode with an AST search engine besides regex and plain text search, unfortunately it looks like, that VSCode does not support to extend the global and lokal search.
It would be very useful, if one could just add a search engine. Currently we have to add a new separate view, but that is unintentional.

Optionally it would be good to also support a pop-up dialog, with the ability to modify specific search options and a larger search field with semantic linting.

@andreamah
Copy link
Contributor

We currently have proposed APIs that cover custom search engines.

See the following:
#59921
#73524

@andreamah andreamah added the *duplicate Issue identified as a duplicate of another issue(s) label Oct 2, 2024
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 2, 2024
@Febbe
Copy link
Author

Febbe commented Oct 3, 2024

@caleb-allen Great question!

For the most part, this API is meant to be consumed to simply search for 'text' as-is. For example, if you create a custom filesystem, this API helps with actually understanding what it takes to get search results from your project. This being said, it was not necessarily created to facilitate a special or 'intelligent' search that requires custom options. The reason why the options have things like isRegex is because the UI (aka the search view on the sidebar) will have a button for that, which will drive what info we send to the API. If we introduced more/alternative options, this would preferably match changes in the UI. We want to keep the options simple, as that is what the user expects out of the search view (for now). Also, we only allow one provider per file scheme, so regular text would lose the traditional ripgrep text results if you overwrote our default provider for text with your own.

Can you reopen this, or explain how your extension will cover this issue?

The thing is, that we don't want to change anything with the current ways of searching.
We want to add a new search type "ast_search", which expects a string of the clang-ast-matcher-dsl. So we definitely need to somehow change the mode to something else than text or regex.
We also would like to change some options, e.g. the Traverse Mode.

A future extension would also be, to provide a rich semantic checking UI, where only valid matchers can be concatenated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

2 participants