-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Problem parsing emacs initializing request #3123
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
Comments
Manually setting
to |
I think that was a bug in lsp-mode, which was fixed a while ago. |
I have a smaller reproducer use serde::{Deserialize, Serialize};
fn main() -> std::result::Result<(), Box<dyn std::error::Error>> {
let value = serde_json::json!{
{
"semanticHighlightingCapabilities": {
"semanticHighlighting": null
}
}
};
let res : TextDocumentClientCapabilities = serde_json::from_value(value)?;
Ok(())
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct TextDocumentClientCapabilities {
pub semantic_highlighting_capabilities: Option<SemanticHighlightingClientCapability>,
}
#[derive(Default, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SemanticHighlightingClientCapability {
pub semantic_highlighting: bool,
} Is serde_json not working correctly. |
Never mind. It is an emacs bug. |
Could you point us to the Emacs bug? I've updated my Emacs configuration and I'm getting a similar error while lsp-mode tries to run rust-analyzer. |
To answer my own question. lsp-mode.el is passing elisp's I worked around the issue by setting the variable to |
@mvaled That bug has been fixed since 4 months in lsp-mode, so I'd recommend updating. |
Last I checked the change is not in melpa stable. |
I updated yesterday and now there's no variable |
I think the new semantic tokens protocol is not yet supported in Emacs:
emacs-lsp/lsp-mode#1482
…On Mon, 11 May 2020 at 18:36, Manuel Vázquez Acosta < ***@***.***> wrote:
Well I updated yesterday and now there's no variable
lsp-enable-semantic-highlighting.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3123 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANB3M4N2QHASGZV6ZBTYTDRRASQZANCNFSM4KT4MO2A>
.
|
There's some support for some kind of semantic highlighting, but I'm not sure how well it works and whether it implements the current proposal (I guess I should try it out sometime). The variable got renamed to |
Yep. I can find I haven't read about semantic highlighting yet. I'll read about it later. |
RLS seems to be having issues converting the initializing message
lsp_types::InitializeParams
that it gets from my emacs installation.The error it gets is
Error("invalid type: null, expected a boolean", line: 0, column: 0)
.Please find the gist below that contains the reproducer.
https://gist.github.com/samanpa/7bb31219b53e803e11cee26de8de7b1a
The error goes away when
lsp-types
is compiled without theproposed
feature.Problematic toml
Working toml
The text was updated successfully, but these errors were encountered: