<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/109735>109735</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clangd] Clangd's #include CodeCompletion could use a fuzzier finder across '/'
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          torshepherd
      </td>
    </tr>
</table>

<pre>
    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`
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVNGOozgQ_Brz0hrkGAjJAw-5mYt0z7s_YOwGfGNsZDdhsl9_MpDZ7N2e7rTSaCI1dnVXlatljKZ3iA2rfmPVWyZnGnxoyIc44DRg0Fnr9b15tdL1mok6wqvX-OrHySIZ76DzAdiRM1EYp-yskR15BDWHgI7sHbTHCBK6-du3O4yS1ADtTOA8gVTBx7jdvrIjz-HqA-CHTOBMvDL-xvhl_3_k25-aph_qn32BCaEsJChxBUlAAwI6DQMGhMXQYBxYextBeY2tjKkFqJUYLMZaiHPfY6QNSLp-hRI_6_P7xxTy4dFrx1DSMVETdKafAwINJoJ3CH6mn896-fKLOD8q8lz8upKV6driwcQ4Y1y5rzCsuMCBiTN03moMEbTfWo3yHSGii7j6uU8Zk0DSaRDpzt3PMMgbAnnojNOwDEYNO9T6dZGO0tcHyS74EVrsfEAY_c24HrxLB5IzDj9ofxWTDAS-W8uTpCF_ZvSHA-UdBRkpjZPO3GJyEJwkc0PojEWYjHrH9SEqCvZlYke-0U6VXehU8-Gz_CglLnE7t3l--fKVietmTTogI-DHhIpQ5_-u9SLvERYE5WerwYxT8EmrAR-2rnOq78FJmMGgU8iKyzPuIYeLtX4BOZPfL2BMusV3M4E2ARX5cAeLN7SrSTFpKulBa5v7v4ht3cSjW_LCOIzxH7ncOzxJ-f8aZLop9Lk4ywybQy3qQ1EXvMyGpqhEURYn3p7qtjsVp0qKou1KVcpWVGUlM9MILkp-FiXn4lCWOS-xU-eWq6M-deLQspLjKI3NU6BzH_psfevNgZ_rosqsbNHGdakJ4XDZkpDCXL1loUmXXtq5j6zk1kSK32HIkF234eYaq97gafc9Jfhva3CzfY647zqDYdUHw6ecol5zXmdzsM1ANKU8btHvDQ1zmys_MnFNs-w_L1Pwf6IiJq5blpm47hRvjfgrAAD__7dF1Og">