Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong highlight in peek frame #1149

Open
SpringHan opened this issue Jan 16, 2025 · 6 comments
Open

Wrong highlight in peek frame #1149

SpringHan opened this issue Jan 16, 2025 · 6 comments

Comments

@SpringHan
Copy link
Contributor

当使用 lsp-bridge-peek 时,原代码中无特殊样式的文字会反色。

Image

Image

@SpringHan
Copy link
Contributor Author

使用的是最新的 commit

@manateelazycat
Copy link
Owner

啥意思? 没看懂

@SpringHan
Copy link
Contributor Author

就是我使用 lsp-bridge-peek 后弹出的 frame 里有些代码的颜色和普通浏览时相反,比如原字体是白色就成了黑色。
导致看不清内容。我把背景透明关了也看不清楚。我换浅色主题字体就从黑色变成了白色。
我猜是取用了 background-color ?

@manateelazycat
Copy link
Owner

Image

我没重现你的问题

@SpringHan
Copy link
Contributor Author

那等我这两天找找问题尝试写个补丁吧

@SpringHan
Copy link
Contributor Author

原因我找到了,文件内容预览的 face 一直到 lsp-bridge-peek--file-content 都没有出现问题,但是在给 lsp-bridge-peek--ov 设置了 after-string 属性后, file-content 中的没有设置 face 的内容就被 overlay 所在行的 face 影响了。
我在调用了 peek 功能后将 cursor 移动到注释行后 file-content 的 face 又变成了 font-lock-doc-face
但我还没想出比较好的解决方法。

Image

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants