[clang-tools-extra] [llvm] [Clangd] Add AST search capabilities from clang-query (PR #156090)

Tor Shepherd via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 07:40:22 PST 2025


Fabian =?utf-8?q?Keßler?= <fabian_kessler at gmx.de>,
Fabian =?utf-8?q?Keßler?= <fabian_kessler at gmx.de>,
Fabian =?utf-8?q?Keßler?= <fabian_kessler at gmx.de>,
Fabian =?utf-8?q?Keßler?= <fabian_kessler at gmx.de>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/156090 at github.com>


torshepherd wrote:

Because this first version is ast search *within a document*, in an _ideal_ world, vscode would expose a contribution point for floating search bars in the same style and feel as ctrl-f.

- tied to a tab, not a sidebar or new ui element
- update search on type
- press a hotkey to make it appear, and then enter cycles between matches

Unfortunately there is no exact matching contribution point. So our two options are

1. sidebar with a text entering box, and then show found results as a treeview with one level (being the matched textrange)
2. persistent quick pick that does nothing on enter, but while typing moves your cursor to the first found result

I think we basically have to go with 1. 2 would feel too hacky. But yeah essentially we'd just have it be a text range, and clicking on that would highlight/select the text

https://github.com/llvm/llvm-project/pull/156090


More information about the llvm-commits mailing list