Comments (8)
lsp-bridge-semantic-tokens-mode 选项打开了吗?
我自己平常也不用 semantic
from lsp-bridge.
打开了
from lsp-bridge.
发一下测试代码和全部日志吧, 估计要5.1以后才有时间了。
from lsp-bridge.
main.cpp
#include <iostream>
#include <cmath>
struct Point {
double x, y;
Point(double x_, double y_) : x(x_), y(y_) {}
};
double distance(const Point& p1, const Point& p2) {
double dx = p1.x - p2.x;
double dy = p1.y - p2.y;
return std::sqrt(dx * dx + dy * dy);
}
int main() {
auto p1 = Point(1,2);
auto p2 = Point(3,4);
auto ret = distance(p1, p2);
std::cout << "ret :" << ret << std::endl;
ret = distance(p2, p1);
std::cout << "ret2 :" << ret << std::endl;
return 0;
}
from lsp-bridge.
@xhcoding 大佬能帮忙看一下吗? 我看了一下日志, LSP Server 都返回了Tokens信息, 但是 get_faces_index 总是返回 None, 导致 render_tokens.add 这行代码没执行。
from lsp-bridge.
lsp-bridge-semantic-tokens-mode 高亮需要根据文档自己配置,默认只会高亮宏关闭:https://github.com/manateelazycat/lsp-bridge/wiki/Semantic-Tokens-%5B%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87%5D
比如函数高亮成红色,类高亮成橘色, namespace 高亮成绿色:
(defface lsp-bridge-semantic-tokens-function-face
'((t :foreground "red"))
"Face used for globalScope token."
:group 'lsp-bridge-semantic-tokens)
(defface lsp-bridge-semantic-tokens-class-face
'((t :foreground "orange"))
"Face used for globalScope token."
:group 'lsp-bridge-semantic-tokens)
(defface lsp-bridge-semantic-tokens-namespace-face
'((t :foreground "green"))
"Face used for globalScope token."
:group 'lsp-bridge-semantic-tokens)
(setq-default lsp-bridge-semantic-tokens-type-faces
[("function" . lsp-bridge-semantic-tokens-function-face)
("class" . lsp-bridge-semantic-tokens-class-face)
("namespace" . lsp-bridge-semantic-tokens-namespace-face)
])
(setq-default lsp-bridge-semantic-tokens-ignore-modifier-limit-types ["function" "class" "namespace"])
from lsp-bridge.
感谢 @xhcoding 大佬解惑, @zijianyue 我按照Wiki测试的写了配置以后就可以正常工作了。
from lsp-bridge.
Related Issues (20)
- Inlay hints HOT 8
- outdated diagnostic HOT 4
- 能加入mojo支持吗? HOT 8
- enabling lsp-bridge breaks syntax highlighting HOT 3
- I found how to fix Tailwindcss HOT 30
- Pop up buffer stuck on screen HOT 3
- No signature help when using lsp-bridge within org babel source block HOT 3
- Using eldoc & xref for finding references & showing function signature HOT 7
- LSP signature help does not display for most symbols, only when point is inside function parameters [Typescript] HOT 1
- AttributeError: 'NoneType' object has no attribute 'strip' HOT 3
- 安装说明中是否可以增加spacemacs? HOT 2
- acm popup menu not align well with cursor on KDE plasma 6 wayland HOT 5
- 提供选中区域格式化的功能 HOT 9
- Can we reduce the frequency of `redisplay` execution? HOT 4
- Idea: Support lsp progress? HOT 6
- 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
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.