Clangd's CodeCompletion for #includes currently does a fuzzy match but not across /. For example,
#include "cl // at the end here within llvm codebase, clangd will suggest "clang/"
#include "Expr.h // clangd can't figure this one out
#include "clASExpr.h // clangd can't figure this one out
There are two issues with this: 1) folders don't make sense for includes, and 2) you have to find which folder you want to include from before moving on to the next fuzzy part of the path.
In contrast, the vscode native file picker ctrl-p with clASExpr or with Expr finds clang/AST/Expr.h as expected.
There are two ways we could improve the clangd file completion experience:
Allow autocompletes to skip directory levels, so that Expr.h finds clang/AST/Expr.h
Allow fuzziness across /, so clASExpr.h finds clang/AST/Expr.h
Clangd's CodeCompletion for `#include`s currently does a fuzzy match but not across `/`. For example,
```cpp
#include "cl // at the end here within llvm codebase, clangd will suggest "clang/"
#include "Expr.h // clangd can't figure this one out
#include "clASExpr.h // clangd can't figure this one out
```
There are two issues with this: 1) folders don't make sense for includes, and 2) you have to find which folder you want to include from before moving on to the next fuzzy part of the path.
In contrast, the vscode native file picker `ctrl-p` with `clASExpr` or with `Expr` finds `clang/AST/Expr.h` as expected.
There are two ways we could improve the clangd file completion experience:
1. Allow autocompletes to skip directory levels, so that `Expr.h` finds `clang/AST/Expr.h`
2. Allow fuzziness across `/`, so `clASExpr.h` finds `clang/AST/Expr.h`
Clangd's CodeCompletion for
#include
s currently does a fuzzy match but not across/
. For example,There are two issues with this: 1) folders don't make sense for includes, and 2) you have to find which folder you want to include from before moving on to the next fuzzy part of the path.
In contrast, the vscode native file picker
ctrl-p
withclASExpr
or withExpr
findsclang/AST/Expr.h
as expected.There are two ways we could improve the clangd file completion experience:
Expr.h
findsclang/AST/Expr.h
/
, soclASExpr.h
findsclang/AST/Expr.h