ITADN

Inconsistent goto definition.

#148Opendazoe 创建于 2025-11-10
D
dazoecommented
**Describe the bug** It seems c3-lsp is having trouble looking up functions. Using goto definition, some times it will open just the file with out moving to the definition, some times it works as expected, sometimes is doesn't do anything at all. **To Reproduce** Steps to reproduce the behavior: 1. Open a c3 file. 2. Goto definition on a function. **Expected behavior** Find and jump to definition. **Desktop (please complete the following information):** - OS: Archlinux - Editor: Code - OSS , zed - Version: Editor: Latest, extension: latest, c3-lsp compiled from source, c3 compiled from source. **Additional context** Log from zed ``` 2025/11/09 22:03:51.180 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #146: textDocument/definition: {"position":{"character":28,"line":19},"textDocument":{"uri":"file:///home/dave/Projects/c3/hellosdl/src/main.c3"}} 2025/11/09 22:03:51.180 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #146: textDocument/definition: null 2025/11/09 22:03:51.220 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #147: textDocument/definition: {"position":{"character":28,"line":19},"textDocument":{"uri":"file:///home/dave/Projects/c3/hellosdl/src/main.c3"}} 2025/11/09 22:03:51.221 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #147: textDocument/definition: {"uri":"file:///home/dave/Projects/c3/hellosdl/lib/sdl3.c3l/src/surface.c3i","range":{"start":{"line":494,"character":22},"end":{"line":494,"character":29}}} 2025/11/09 22:04:20.439 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #148: textDocument/hover: {"position":{"character":26,"line":19},"textDocument":{"uri":"file:///home/dave/Projects/c3/hellosdl/src/main.c3"}} 2025/11/09 22:04:20.440 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #148: textDocument/hover: null 2025/11/09 22:04:21.043 DEBUG [C3-LSP:rpc] jsonrpc2: --> request #149: textDocument/definition: {"position":{"character":28,"line":19},"textDocument":{"uri":"file:///home/dave/Projects/c3/hellosdl/src/main.c3"}} 2025/11/09 22:04:21.043 DEBUG [C3-LSP:rpc] jsonrpc2: <-- result #149: textDocument/definition: null ```
0 条评论