Comments (4)
You can temporarily turn on the log through the lsp-bridge-enable-log option. The log can be seen in the *lsp-bridge*
buffer.
If after the lsp-bridge-find-def command is executed, clangd returns the defined log but lsp-bridge does not jump correctly, then it is a bug of lsp-bridge. You are welcome to submit the log and I will fix it.
If clangd does not return the defined location in the log, that is a problem with clangd, lsp-bridge just obeys the information returned by the lsp server to perform the operation
from lsp-bridge.
I already had the logging turned on, but I noticed that it had stopped giving me any output. I closed it and it eventually started again, giving me warnings that the index might be incomplete. Is there any way to force the index to be built to completion? I don't remember having this issue before.
Anyway, I suspect that the issue might be an incomplete index. When I switched from lsp-mode
to lsp-bridge
, I had to delete the cache because they're using different clangd installs, and the one that lsp-bridge
picks up is an older revision. Though it's still confusing that finding the symbol works and jumping to the class by finding the definition doesn't. I'll update this thread once the index has finished building.
FWIW, this is what happens when I try to look up the definition for the class AActor
, a common class in the Unreal Engine:
--- [20:05:40.971285] Send textDocument/definition request (15594) to 'clangd' for project
I[20:05:40.972] --> reply:textDocument/definition(15594) 0 ms
{
"id": 15594,
"method": "textDocument/definition",
"params": {
"position": {
"line": 32,
"character": 61
},
"textDocument": {
"uri": "file:///d%3A/p4v/Dev/Engine/Plugins/WeaponSystem/Source/SystemRuntime/Public/Actors/WeaponVisualActor.h"
}
},
"message_type": "request",
"jsonrpc": "2.0"
}
--- [20:05:40.971285] Recv textDocument/definition response (15594) from 'clangd' for project
Eval in Emacs: (lsp-bridge-find-def-fallback '(:line 32 :character 61))
{
"id": 15594,
"jsonrpc": "2.0",
"result": []
}
I get a tremendous amount of data back from lsp-bridge-workspace-list-symbols
, though.
I'll just include one of the entries, but there's about 1900 lines of JSON results in the log. The duplication is in the log, it's not a copy paste error. But what's being found in this case is a constructor, so I would guess that's why this is happening?
{
"containerName": "AActor",
"kind": 9,
"location": {
"range": {
"end": {
"character": 14,
"line": 109
},
"start": {
"character": 8,
"line": 109
}
},
"uri": "file:///D:/p4v/Dev/Engine/Source/Runtime/Engine/Private/Actor.cpp"
},
"name": "AActor",
"score": 0.5
},
{
"containerName": "AActor",
"kind": 9,
"location": {
"range": {
"end": {
"character": 14,
"line": 104
},
"start": {
"character": 8,
"line": 104
}
},
"uri": "file:///D:/p4v/Dev/Engine/Source/Runtime/Engine/Private/Actor.cpp"
},
"name": "AActor",
"score": 0.5
},
from lsp-bridge.
Actually, I'll ask that question while I'm here anyway: what's the easiest way to change the path that lsp-bridge uses when it starts the language server?
I have 2 versions of clangd installed on my machine. Unreal prefers v14, and so that's the system default. I have v17 installed because it's newer, and my emacs paths are set to start that up. For lsps like lsp-mode and eglot, this is fine, since they use whatever emacs finds (or I can set the path manually).
I don't actually know python, but I looked through it quickly and I THINK what's happening is it tries to merge emacs' exec-path to the system paths, but crucially, it adds the emacs paths AFTER the system paths, so it's always going to pick up the wrong LSP for me. You can let me know if I'm right or wrong here. :)
from lsp-bridge.
The lsp server configuration of lsp-bridge is in the langserver directory. For example, clangd is lspbridge/langserver/clangd.json
clangd.json only writes the clangd name, it will find clangd from the system directory. If you want to customize the version of clangd, you can customize lsp-bridge-get-single-lang-server-by-project, according to project- path and filename return a customized json file path. The content of the json path can be the same as lspbridge/langserver/clangd.json, except that "clangd" in clangd.json is replaced with the clangd path you specify.
from lsp-bridge.
Related Issues (20)
- lsp-bridge-copilot-login 无法登录 HOT 30
- elisp 开启lsp-bridge,跳转返回时,提示:[LSP-Bridge] No lsp-bridge mark set HOT 3
- code-action无法使用 HOT 1
- Lsp-bridge does not work on doom emacs HOT 3
- lsp-bridge-code-action does not get imports HOT 7
- Cannot start "deno lsp" HOT 7
- 使用lsp-bridge-semantic-tokens-global-scope-face后,C++中的宏和函数的颜色无法区分开 HOT 9
- Rust中函数名不显示 HOT 1
- C++自己写的头文件函数名不显示,标准库可以 HOT 6
- Incorrect response to `window/workDoneProgress/create` HOT 2
- paramiko.ssh_exception.PasswordRequiredException: Private key file is encrypted HOT 3
- 补全自动修改窗口位置 HOT 3
- `lsp-bridge` clogging `org-babel-tangle` when enabled HOT 2
- Dynamically set up `lsp-bridge-get-single-lang-server-by-project` HOT 3
- rust remote server 失败,可能是在远程主机没有启动 tabnine HOT 7
- react jsx 中不支持 tailwindcss HOT 3
- semantic-tokens 渲染modifiers时能否支持combine和override混用 HOT 7
- 调用 multi-server-function的时候,如果当前project 没有git init,则会报错,建议设置当前目录作为缺省值并且打印message提醒一下用户 HOT 1
- `lsp-bridge-find-def` with `pyright` takes to stub file (`.pyi`) instead of code (`.py`). HOT 1
- When I open the vue project, ts doesn't recognize my directory HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-bridge.