Home Page | Docs | Roadmap | Mission | Playground CodeQue - Multiline Structural Search for Visual Studio CodeCodeQue is code search engine that understands the code syntax. It matches structure rather than plain text, which makes it very effective for complex queries. VSCode extension aims to improve code search and navigation experience. Advanced search options and todo-like list of accurate search results makes it your new super power. It's one of the tools in the ecosystem. There is also CLI tool and ESLint plugin for creating custom rules in zero time. CodeQue supports multiline search for any programming language and structural search for JavaScript and TypeScript. Structural search support for other programming languages will be added soon. Click to watch extension in action 👇 ![]() Benefits of using CodeQue VSCode extensionCodeQue is more than just a search tool - it's a refactoring tool as well. It addresses the problems of standard search by providing multiline support and an easy way to add gaps or use wildcards into the query. You don't need to have any knowledge of Regular Expressions to query complex code patterns. It helps developers with code refactoring, speeds up project discovery, and makes it easy to find duplicated or similar code. patterns. With CodeQue, you can easily navigate and modify your codebase, making your development process faster and more efficient. OverviewOne of the main strengths of CodeQue is its easy-to-use query language, but it also offers several additional features that make it a great support tool for your daily work. Features
Example Queries
FeaturesQuery languageThe beauty of CodeQue query language is that the query has to be valid source code. You don't have to learn anything new! Except the fact there are a few types of wildcards.
It matches all identifiers, JSX identifiers, types identifiers, function names and so on.
It matches any statement or expression. Think of it as 'match anything'. There a few quirks there. It's good to have general understanding of how code is represented in AST (Abstract Syntax Tree) for more complex queries. More technically Wildcards in stringsStrings have their's own wildcards
Number wildcard
Here is an example of query which finds all types of logs which includes word ![]()
Search modesCodeQue offers the following search modes
The most useful mode is `include`. As the name suggest the matched code has to include the code from query, but it can also contain other statements. It performs structural comparison. Learn more about
Learn more about Sometimes you might want to find the code that matches exactly your query. Here is where Learn more about Last but not least, Learn more about Here is the example of ![]() Searching by file importsCool feature of CodeQue is ability to search within files that are directly and indirectly imported by given entry point. CodeQue generates file's dependency tree and search through all nodes. Simply file dependency based search. It's handy for finding whether a given module is used in given part of application or find a code causing a bug when proper stack trace is not available. To get started you can enter the file path manually in search settings. However easier way of searching by file imports is to use option ![]() Todo-like results listAbility to manage search results list is very handy for refactoring. You can collapse or remove not relevant results and mark others as done after you make changes. I've very similar UX to Github Pull Request review view. ![]() Select to searchAnother handy addition is the possibility to search by code selected in editor, so you don't have to copy-paste the query. It's just faster. After making a selection simply click CodeQue will automatically detect whether select text is valid code and perform search using recently used structural search mode. Otherwise it would fallback to ![]() Files list filtersSearch wouldn't be useful without ability to filter files list. You can define glob patters to either include or exclude files from the list. By default CodeQue is not searching in files ignored by Enable the following flags with caution, as they might significantly downgrade search performance for lager projects.
Example files list settings 👇
Case sensitivityYou can choose whether to compare identifier persisting their original case or do case insensitive match. Search errorsSometimes you might encounter some search errors. They will be mostly due to some syntax errors in you source files. You can check search error details in tooltip available after click the error count message 👇 ![]() Query examplesCodeQue is general purpose search tool. The examples list could be endless. Here are some of them for you to get a glimpse of what's possible. Those are relatively simple, you definitely would find some more complex during day to day work.
All usages of
|