Can't center with ctrl-l when editing C code with LSP.
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### What did you expect to happen?
When I press ctrl-l while editing a C file, it should move around the file so that the line my cursor is currently on is in the middle of the screen.
### What actually happened?
I see this error:
```
Debugger entered--Lisp error: (error "method not found")
signal(error ("method not found"))
error("method not found")
lsp-request("$ccls/navigate" (:textDocument (:uri "file:///Users/space/code/curl/src/tool_operate.c") :position (:line 733 :character 39) :direction "D"))
lsp-find-custom("$ccls/navigate" (:direction "D"))
ccls-navigate("D")
(closure (t) (&rest _) (interactive) (ccls-navigate "D"))()
#((closure (t) (&rest _) (interactive) (ccls-navigate "D")))
apply(# (closure (t) (&rest _) (interactive) (ccls-navigate "D")))
funcall-interactively((closure (t) (&rest _) (interactive) (ccls-navigate "D")))
#((closure (t) (&rest _) (interactive) (ccls-navigate "D")) nil nil)
apply(# ((closure (t) (&rest _) (interactive) (ccls-navigate "D")) nil nil))
explain-pause--wrap-call-interactively(# (closure (t) (&rest _) (interactive) (ccls-navigate "D")) nil nil)
apply(explain-pause--wrap-call-interactively # ((closure (t) (&rest _) (interactive) (ccls-navigate "D")) nil nil))
call-interactively((closure (t) (&rest _) (interactive) (ccls-navigate "D")) nil nil)
command-execute((closure (t) (&rest _) (interactive) (ccls-navigate "D")))
```
### Steps to reproduce
1. Put this in your `init.el`:
```
(doom! :input
lsp
(cc +lsp) ; C/C++/Obj-C madness
```
2. Create/open a C file like `myfile.c` and write some code in it (you can add a bunch of empty lines to make it longer)
```c
int main(void) {
}
```
press Ctrl-l
### System Information
https://pastebin.com/Pa0aFHCr
Contributor guide
Assessment
This issue has not been assessed yet.