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

    <tr>
        <th>Summary</th>
        <td>
            definition goes to .h only and the definition in '.c' is not located until it is manually opened in nvim.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    Hi,
I am using clangd as my LSP in neovim and it seems like that the definition goes to .h only and the definition in '.c' is not located until it is manually opened.

versions:
nvim: 0.8.3
clangd: 16.0.2

I search around and it seems that it's been resolved by replacing the 'compile_flags.txt' with 'compile_commands.json', while
I am still encountering this after that. 

Any idea on how to debug? The 'compile_commands.json' was generated using 'bear make' and seems good.
```  
#wc compile_commands.json
  4144330   4273816 126228837 compile_commands.json
```

Reference post:
https://neovim.discourse.group/t/clangd-lsp-jump-to-definition-takes-me-to-h-file/2153/1
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VM2OpDYQfhpzKYHAphs4cJjsCmWlHKIk96gw1eAZYyOX6Q5vHwG7sz2rKMeVEEhFlb6_spHZjI6oFZdfxOVzgmucfGgfZDaecEt6P2ztr0bITyL_LPKXL4AzrGzcCNqiGwdAhnmD3_78HYwDR_5uZkA3gInARDODNW8EccIIcSIY6GacicY7GD0xRA_ZBN7Z7Zj6ocU4ELLKtJAVGAbnI1ivMdIAq4vG7iiGYUa3orUb-IUcDdnJ9XzfKbDxjoX6WnB3Mwv1AnlWZ-osnVL2YnHN8kw-z38BJgx6Agx-dcNHbYcsE4WsGHoiB4HY2zsN0G8QaLGod6t2VUJW2s-LsfT3zeLIWfxnn4OHidPzT-3nGd3A2St7J2Ql5Cd4TMbSUwAcjbVATvvVRQonhGHAW6RwkMrgWcOL28AMhOAdTP6xmz5Qv45CdfDXR24_wsMDGUZyFE7Xj-iFrHrCADO-0d6ze3IaMnr_bv81Px_4xkWqh4b_BjoaAMqiLJXKAaCUlaqLKxTyKmVdq-r_Bt-hnkX_QTcK5DTB4jm-xz_FuBzLIDshu3Nhs8Gw9mtgysbg10XILgrZnWuRWl7S13Ve0ujT77uZRnwjTmfay1N62xOSnSwuSsiuSIZWDY1qMKG2uNaNkpdaqWRqFSLKq7yQrvK-vOVNfcOirG5lk6NuakpMK3Op8qoo86bIlcqKRuuh6etCYq17LESZ04zGZtbe58yHMTHMK7VXVV9lYrEny9-Oc2j3prRfRxZlbg1H_j4WTbTU_owDeVwNu8_JGmz7MYHRxGntM-1nIbud29dPugT_SnrP4dDHQnaHxH8DAAD__-Phg8w">