I've setup lsp-mode
and clangd
, and put the compile-commands.json
in the projects root.
I can tell compile-commands.json
because my cflags are included in the Updating file
output of *clangd::stderr*
log.
However, whenever I run lsp-find-definition
it simply prints:lsp-request: method not found
... unless the function happens to be defined in the same file.
How to troubleshoot this? it makes lsp-mode
quite useless.
Checking the logs gives no hints as to why it fails to find the method.
For reference this is the output of lsp-describe-session
:
[-] /src/blender/
`-[-] clangd:22663
|-[-] Buffers
| |-[+] BKE_blender.h
| `-[+] creator.c
`-[-] Capabilities
|-[X] workspaceSymbolProvider: t
|-[X] textDocumentSync: 2
|-[-] signatureHelpProvider:
| `-[X] triggerCharacters: [( ,]
|-[X] renameProvider: t
|-[X] referencesProvider: t
|-[X] hoverProvider: t
|-[-] executeCommandProvider:
| `-[X] commands: [clangd.applyFix]
|-[X] documentSymbolProvider: t
|-[X] documentRangeFormattingProvider: t
|-[-] documentOnTypeFormattingProvider:
| |-[X] moreTriggerCharacter: []
| `-[X] firstTriggerCharacter: }
|-[X] documentHighlightProvider: t
|-[X] documentFormattingProvider: t
|-[X] definitionProvider: t
|-[-] completionProvider:
| |-[X] triggerCharacters: [. > :]
| `-[X] resolveProvider: nil
`-[X] codeActionProvider: t