Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Update language server types, making ClientCapabilities.experimental optional #313

Merged
merged 1 commit into from
May 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build = "build.rs"
cargo = { git = "https://github.com/rust-lang/cargo" }
derive-new = "0.3"
env_logger = "0.4"
languageserver-types = "0.8.0"
languageserver-types = "0.9.0"
log = "0.3"
racer = "2.0.6"
rls-analysis = "0.2.1"
Expand Down
3 changes: 1 addition & 2 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use vfs::Vfs;
use server::{self, ServerMessage, Request, Notification, Method, LsService, ParseError, ResponseData};

use ls_types::{ClientCapabilities, TextDocumentPositionParams, TextDocumentIdentifier, TraceOption, Position, InitializeParams};
use serde_json::Value;
use std::time::Duration;
use std::io::{stdin, stdout, Write};
use std::path::Path;
Expand Down Expand Up @@ -121,7 +120,7 @@ fn initialize(root_path: String) -> ServerMessage {
capabilities: ClientCapabilities {
workspace: None,
text_document: None,
experimental: Value::Null,
experimental: None,
},
trace: TraceOption::Off,
};
Expand Down
24 changes: 7 additions & 17 deletions src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fn test_hover() {
let url = Url::from_file_path(cache.abs_path(&source_file_path)).expect("couldn't convert file path to URL");
let text_doc = serde_json::to_string(&TextDocumentIdentifier::new(url)).expect("couldn't convert path to JSON");
let messages = vec![Message::new("initialize", vec![("processId", "0".to_owned()),
("capabilities", "{ \"experimental\": null }".to_owned()),
("capabilities", "{}".to_owned()),
("rootPath", root_path),
("rootUri", "null".to_owned()),
("trace", "\"off\"".to_owned())]),
Expand Down Expand Up @@ -116,9 +116,7 @@ fn test_find_all_refs() {
"id": 0,
"params": {
"processId": 0,
"capabilities": {
"experimental": null
},
"capabilities": {},
"rootPath": root_path,
"rootUri": null,
"trace": "off"
Expand Down Expand Up @@ -169,9 +167,7 @@ fn test_find_all_refs_no_cfg_test() {
"id": 0,
"params": {
"processId": 0,
"capabilities": {
"experimental": null
},
"capabilities": {},
"rootPath": root_path,
"rootUri": null,
"trace": "off"
Expand Down Expand Up @@ -217,9 +213,7 @@ fn test_borrow_error() {
"id": 0,
"params": {
"processId": 0,
"capabilities": {
"experimental": null
},
"capabilities": {},
"rootPath": root_path,
"rootUri": null,
"trace": "off"
Expand Down Expand Up @@ -254,9 +248,7 @@ fn test_highlight() {
"id": 0,
"params": {
"processId": 0,
"capabilities": {
"experimental": null
},
"capabilities": {},
"rootPath": root_path,
"rootUri": null,
"trace": "off"
Expand Down Expand Up @@ -303,9 +295,7 @@ fn test_rename() {
"id": 0,
"params": {
"processId": 0,
"capabilities": {
"experimental": null
},
"capabilities": {},
"rootPath": root_path,
"rootUri": null,
"trace": "off"
Expand Down Expand Up @@ -349,7 +339,7 @@ fn test_completion() {
let url = Url::from_file_path(cache.abs_path(&source_file_path)).expect("couldn't convert file path to URL");
let text_doc = serde_json::to_string(&TextDocumentIdentifier::new(url)).expect("couldn't convert path to JSON");
let messages = vec![Message::new("initialize", vec![("processId", "0".to_owned()),
("capabilities", "{ \"experimental\": null }".to_owned()),
("capabilities", "{}".to_owned()),
("rootPath", root_path),
("rootUri", "null".to_owned()),
("trace", "\"off\"".to_owned())]),
Expand Down