diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 73c9fed59b..8e6e4099ad 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -414,11 +414,11 @@ pub(crate) fn inlay_hint(line_index: &LineIndex, inlay_hint: InlayHint) -> lsp_e lsp_ext::InlayHint { label: inlay_hint.label.to_string(), position: position(line_index, inlay_hint.range.end()), - kind: Some(match inlay_hint.kind { - InlayKind::ParameterHint => lsp_ext::InlayHintKind::PARAMETER, - InlayKind::TypeHint => lsp_ext::InlayHintKind::TYPE, - InlayKind::ChainingHint => lsp_ext::InlayHintKind::TYPE, - }), + kind: match inlay_hint.kind { + InlayKind::ParameterHint => Some(lsp_ext::InlayHintKind::PARAMETER), + InlayKind::TypeHint => Some(lsp_ext::InlayHintKind::TYPE), + InlayKind::ChainingHint => None, + }, tooltip: Some("test description".to_string()), padding_left: Some(true), padding_right: Some(true), diff --git a/editors/code/package.json b/editors/code/package.json index ac6492f463..19a62f6514 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -23,9 +23,7 @@ "engines": { "vscode": "^1.64.0" }, - "enabledApiProposals": [ - "inlayHints" - ], + "enabledApiProposals": [], "scripts": { "vscode:prepublish": "npm run build-base -- --minify", "package": "vsce package -o rust-analyzer.vsix", @@ -35,8 +33,7 @@ "lint": "tsfmt --verify && eslint -c .eslintrc.js --ext ts ./src ./tests", "fix": " tsfmt -r && eslint -c .eslintrc.js --ext ts ./src ./tests --fix", "pretest": "tsc && npm run build", - "test": "node ./out/tests/runTests.js", - "postinstall": "vscode-dts dev" + "test": "node ./out/tests/runTests.js" }, "dependencies": { "vscode-languageclient": "8.0.0-next.12", @@ -54,8 +51,7 @@ "tslib": "^2.3.0", "typescript": "^4.5.5", "typescript-formatter": "^7.2.2", - "vsce": "^2.6.7", - "vscode-dts": "^0.3.3" + "vsce": "^2.6.7" }, "activationEvents": [ "onLanguage:rust", @@ -302,11 +298,6 @@ "default": true, "description": "Whether to show inlay hints." }, - "rust-analyzer.inlayHints.smallerHints": { - "type": "boolean", - "default": true, - "description": "Whether inlay hints font size should be smaller than editor's font size." - }, "rust-analyzer.server.path": { "type": [ "null", @@ -1087,78 +1078,6 @@ } ], "colors": [ - { - "id": "rust_analyzer.inlayHints.foreground", - "description": "Foreground color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.foreground.* configurations)", - "defaults": { - "dark": "#A0A0A0F0", - "light": "#747474", - "highContrast": "#BEBEBE" - } - }, - { - "id": "rust_analyzer.inlayHints.background", - "description": "Background color of inlay hints (is overriden by more specific rust_analyzer.inlayHints.background.* configurations)", - "defaults": { - "dark": "#11223300", - "light": "#11223300", - "highContrast": "#11223300" - } - }, - { - "id": "rust_analyzer.inlayHints.foreground.typeHints", - "description": "Foreground color of inlay type hints for variables (overrides rust_analyzer.inlayHints.foreground)", - "defaults": { - "dark": "rust_analyzer.inlayHints.foreground", - "light": "rust_analyzer.inlayHints.foreground", - "highContrast": "rust_analyzer.inlayHints.foreground" - } - }, - { - "id": "rust_analyzer.inlayHints.foreground.chainingHints", - "description": "Foreground color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.foreground)", - "defaults": { - "dark": "rust_analyzer.inlayHints.foreground", - "light": "rust_analyzer.inlayHints.foreground", - "highContrast": "rust_analyzer.inlayHints.foreground" - } - }, - { - "id": "rust_analyzer.inlayHints.foreground.parameterHints", - "description": "Foreground color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.foreground)", - "defaults": { - "dark": "rust_analyzer.inlayHints.foreground", - "light": "rust_analyzer.inlayHints.foreground", - "highContrast": "rust_analyzer.inlayHints.foreground" - } - }, - { - "id": "rust_analyzer.inlayHints.background.typeHints", - "description": "Background color of inlay type hints for variables (overrides rust_analyzer.inlayHints.background)", - "defaults": { - "dark": "rust_analyzer.inlayHints.background", - "light": "rust_analyzer.inlayHints.background", - "highContrast": "rust_analyzer.inlayHints.background" - } - }, - { - "id": "rust_analyzer.inlayHints.background.chainingHints", - "description": "Background color of inlay type hints for method chains (overrides rust_analyzer.inlayHints.background)", - "defaults": { - "dark": "rust_analyzer.inlayHints.background", - "light": "rust_analyzer.inlayHints.background", - "highContrast": "rust_analyzer.inlayHints.background" - } - }, - { - "id": "rust_analyzer.inlayHints.background.parameterHints", - "description": "Background color of function parameter name inlay hints at the call site (overrides rust_analyzer.inlayHints.background)", - "defaults": { - "dark": "rust_analyzer.inlayHints.background", - "light": "rust_analyzer.inlayHints.background", - "highContrast": "rust_analyzer.inlayHints.background" - } - }, { "id": "rust_analyzer.syntaxTreeBorder", "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)", diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json index 6bf206153a..7c4fbd21eb 100644 --- a/editors/code/tsconfig.json +++ b/editors/code/tsconfig.json @@ -22,7 +22,6 @@ ], "include": [ "src", - "tests", - "vscode.proposed.inlayHints.d.ts" + "tests" ] }