mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
497 lines
17 KiB
JSON
497 lines
17 KiB
JSON
{
|
|
"name": "ra-lsp",
|
|
"displayName": "ra-lsp",
|
|
"description": "An alternative rust language server to the RLS",
|
|
"preview": true,
|
|
"private": true,
|
|
"version": "0.0.1",
|
|
"publisher": "matklad",
|
|
"repository": {
|
|
"url": "https://github.com/matklad/rust-analyzer/"
|
|
},
|
|
"categories": [
|
|
"Other"
|
|
],
|
|
"engines": {
|
|
"vscode": "^1.37.0"
|
|
},
|
|
"scripts": {
|
|
"vscode:prepublish": "npm run compile",
|
|
"package": "vsce package",
|
|
"compile": "rollup -c && shx cp src/utils/terminateProcess.sh bundle/terminateProcess.sh",
|
|
"watch": "tsc -watch -p ./",
|
|
"fix": "prettier **/*.{json,ts} --write && tslint --project . --fix",
|
|
"lint": "tslint --project .",
|
|
"prettier": "prettier **/*.{json,ts}",
|
|
"test": "tsc -p . && node ./out/test/runTest.js",
|
|
"travis": "npm run compile && npm run test && npm run lint && npm run prettier -- --write && git diff --exit-code"
|
|
},
|
|
"prettier": {
|
|
"tabWidth": 4,
|
|
"singleQuote": true
|
|
},
|
|
"dependencies": {
|
|
"seedrandom": "^3.0.1",
|
|
"vscode-languageclient": "^5.3.0-next.4",
|
|
"jsonc-parser": "^2.1.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/glob": "^7.1.1",
|
|
"@types/mocha": "^5.2.7",
|
|
"@types/node": "^10.14.13",
|
|
"@types/seedrandom": "^2.4.28",
|
|
"@types/vscode": "^1.37.0",
|
|
"glob": "^7.1.4",
|
|
"mocha": "^6.2.0",
|
|
"prettier": "^1.18.2",
|
|
"rollup": "^1.23.1",
|
|
"rollup-plugin-commonjs": "^10.1.0",
|
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
"rollup-plugin-typescript": "^1.0.1",
|
|
"shx": "^0.3.1",
|
|
"tslint": "^5.18.0",
|
|
"tslint-config-prettier": "^1.18.0",
|
|
"typescript": "^3.5.3",
|
|
"vsce": "^1.67.0",
|
|
"vscode-test": "^1.2.0"
|
|
},
|
|
"activationEvents": [
|
|
"onLanguage:rust",
|
|
"onCommand:rust-analyzer.analyzerStatus",
|
|
"onCommand:rust-analyzer.collectGarbage",
|
|
"workspaceContains:**/Cargo.toml"
|
|
],
|
|
"main": "./bundle/extension",
|
|
"contributes": {
|
|
"taskDefinitions": [
|
|
{
|
|
"type": "cargo",
|
|
"required": [
|
|
"command"
|
|
],
|
|
"properties": {
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"args": {
|
|
"type": "array"
|
|
},
|
|
"env": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"commands": [
|
|
{
|
|
"command": "rust-analyzer.syntaxTree",
|
|
"title": "Show Syntax Tree",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.matchingBrace",
|
|
"title": "Find matching brace",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.parentModule",
|
|
"title": "Locate parent module",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.joinLines",
|
|
"title": "Join lines",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.run",
|
|
"title": "Run",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.analyzerStatus",
|
|
"title": "Status",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.collectGarbage",
|
|
"title": "Run garbage collection",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.reload",
|
|
"title": "Restart server",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.startCargoWatch",
|
|
"title": "Start Cargo Watch",
|
|
"category": "Rust Analyzer"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.stopCargoWatch",
|
|
"title": "Stop Cargo Watch",
|
|
"category": "Rust Analyzer"
|
|
}
|
|
],
|
|
"keybindings": [
|
|
{
|
|
"command": "rust-analyzer.parentModule",
|
|
"key": "ctrl+u",
|
|
"when": "editorTextFocus && editorLangId == rust"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.matchingBrace",
|
|
"key": "ctrl+shift+m",
|
|
"when": "editorTextFocus && editorLangId == rust"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.joinLines",
|
|
"key": "ctrl+shift+j",
|
|
"when": "editorTextFocus && editorLangId == rust"
|
|
},
|
|
{
|
|
"command": "rust-analyzer.run",
|
|
"key": "ctrl+r",
|
|
"when": "editorTextFocus && editorLangId == rust"
|
|
}
|
|
],
|
|
"configuration": {
|
|
"type": "object",
|
|
"title": "Rust Analyzer",
|
|
"properties": {
|
|
"rust-analyzer.highlightingOn": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "Highlight Rust code (overrides built-in syntax highlighting)"
|
|
},
|
|
"rust-analyzer.rainbowHighlightingOn": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "When highlighting Rust code, use a unique color per identifier"
|
|
},
|
|
"rust-analyzer.featureFlags": {
|
|
"type": "object",
|
|
"default": {},
|
|
"description": "Fine grained feature flags to disable annoying features"
|
|
},
|
|
"rust-analyzer.enableEnhancedTyping": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Enables enhanced typing. NOTE: If using a VIM extension, you should set this to false"
|
|
},
|
|
"rust-analyzer.raLspServerPath": {
|
|
"type": [
|
|
"string"
|
|
],
|
|
"default": "ra_lsp_server",
|
|
"description": "Path to ra_lsp_server executable"
|
|
},
|
|
"rust-analyzer.enableCargoWatchOnStartup": {
|
|
"type": "string",
|
|
"default": "ask",
|
|
"enum": [
|
|
"ask",
|
|
"enabled",
|
|
"disabled"
|
|
],
|
|
"enumDescriptions": [
|
|
"Asks each time whether to run `cargo watch`",
|
|
"`cargo watch` is always started",
|
|
"Don't start `cargo watch`"
|
|
],
|
|
"description": "Whether to run `cargo watch` on startup"
|
|
},
|
|
"rust-analyzer.excludeGlobs": {
|
|
"type": "array",
|
|
"default": [],
|
|
"description": "Paths to exclude from analysis"
|
|
},
|
|
"rust-analyzer.useClientWatching": {
|
|
"type": "boolean",
|
|
"default": false,
|
|
"description": "client provided file watching instead of notify watching."
|
|
},
|
|
"rust-analyzer.cargo-watch.arguments": {
|
|
"type": "string",
|
|
"description": "`cargo-watch` arguments. (e.g: `--features=\"shumway,pdf\"` will run as `cargo watch -x \"check --features=\"shumway,pdf\"\"` )",
|
|
"default": ""
|
|
},
|
|
"rust-analyzer.cargo-watch.command": {
|
|
"type": "string",
|
|
"description": "`cargo-watch` command. (e.g: `clippy` will run as `cargo watch -x clippy` )",
|
|
"default": "check"
|
|
},
|
|
"rust-analyzer.cargo-watch.ignore": {
|
|
"type": "array",
|
|
"description": "A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)",
|
|
"default": []
|
|
},
|
|
"rust-analyzer.showWorkspaceLoadedNotification": {
|
|
"type": "boolean",
|
|
"description": "Controls whether rust-analyzer displays a notification when a project is loaded.",
|
|
"default": false
|
|
},
|
|
"rust-analyzer.trace.server": {
|
|
"type": "string",
|
|
"scope": "window",
|
|
"enum": [
|
|
"off",
|
|
"messages",
|
|
"verbose"
|
|
],
|
|
"enumDescriptions": [
|
|
"No traces",
|
|
"Error only",
|
|
"Full log"
|
|
],
|
|
"default": "off",
|
|
"description": "Trace requests to the ra_lsp_server"
|
|
},
|
|
"rust-analyzer.trace.cargo-watch": {
|
|
"type": "string",
|
|
"scope": "window",
|
|
"enum": [
|
|
"off",
|
|
"error",
|
|
"verbose"
|
|
],
|
|
"default": "off",
|
|
"description": "Trace output of cargo-watch"
|
|
},
|
|
"rust-analyzer.lruCapacity": {
|
|
"type": "number",
|
|
"default": null,
|
|
"description": "Number of syntax trees rust-analyzer keeps in memory"
|
|
},
|
|
"rust-analyzer.displayInlayHints": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Display additional type information in the editor"
|
|
},
|
|
"rust-analyzer.maxInlayHintLength": {
|
|
"type": "number",
|
|
"default": 20,
|
|
"description": "Maximum length for inlay hints"
|
|
}
|
|
}
|
|
},
|
|
"problemPatterns": [
|
|
{
|
|
"name": "rustc",
|
|
"patterns": [
|
|
{
|
|
"regexp": "^(warning|warn|error)(?:\\[(.*?)\\])?: (.*)$",
|
|
"severity": 1,
|
|
"code": 2,
|
|
"message": 3
|
|
},
|
|
{
|
|
"regexp": "^[\\s->=]*(.*?):(\\d*):(\\d*)\\s*$",
|
|
"file": 1,
|
|
"line": 2,
|
|
"column": 3
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"problemMatchers": [
|
|
{
|
|
"name": "rustc",
|
|
"fileLocation": [
|
|
"relative",
|
|
"${workspaceRoot}"
|
|
],
|
|
"pattern": "$rustc"
|
|
},
|
|
{
|
|
"name": "rustc-watch",
|
|
"fileLocation": [
|
|
"relative",
|
|
"${workspaceRoot}"
|
|
],
|
|
"background": {
|
|
"beginsPattern": "^\\[Running\\b",
|
|
"endsPattern": "^\\[Finished running\\b"
|
|
},
|
|
"pattern": "$rustc"
|
|
}
|
|
],
|
|
"colors": [
|
|
{
|
|
"id": "ralsp.comment",
|
|
"description": "Color for comments",
|
|
"defaults": {
|
|
"dark": "#6A9955",
|
|
"light": "#008000",
|
|
"highContrast": "#7CA668"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.string",
|
|
"description": "Color for strings",
|
|
"defaults": {
|
|
"dark": "#CE9178",
|
|
"light": "#A31515",
|
|
"highContrast": "#CE9178"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.keyword",
|
|
"description": "Color for keywords",
|
|
"defaults": {
|
|
"dark": "#569cd6",
|
|
"light": "#0000FF",
|
|
"highContrast": "#569CD6"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.keyword.control",
|
|
"description": "Color for control keywords",
|
|
"defaults": {
|
|
"dark": "#C586C0",
|
|
"light": "#AF00DB",
|
|
"highContrast": "#C586C0"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.keyword.unsafe",
|
|
"description": "Color for unsafe",
|
|
"defaults": {
|
|
"dark": "#FF3030",
|
|
"light": "#FF1010",
|
|
"highContrast": "#FF1010"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.function",
|
|
"description": "Color for functions",
|
|
"defaults": {
|
|
"dark": "#DCDCAA",
|
|
"light": "#795E26",
|
|
"highContrast": "#DCDCAA"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.parameter",
|
|
"description": "Color for parameters",
|
|
"defaults": {
|
|
"dark": "#9CDCFE",
|
|
"light": "#001080",
|
|
"highContrast": "#9CDCFE"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.builtin",
|
|
"description": "Color for builtins",
|
|
"defaults": {
|
|
"dark": "#DD6718",
|
|
"light": "#DD6718",
|
|
"highContrast": "#DD6718"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.text",
|
|
"description": "Color for text",
|
|
"defaults": {
|
|
"dark": "#D4D4D4",
|
|
"light": "#000000",
|
|
"highContrast": "#FFFFFF"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.attribute",
|
|
"description": "Color for attributes",
|
|
"defaults": {
|
|
"dark": "#9FE9BF",
|
|
"light": "#1F4B1F",
|
|
"highContrast": "#108010"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.literal",
|
|
"description": "Color for literals",
|
|
"defaults": {
|
|
"dark": "#BECEA8",
|
|
"light": "#09885A",
|
|
"highContrast": "#B5CEA8"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.macro",
|
|
"description": "Color for macros",
|
|
"defaults": {
|
|
"dark": "#BFEBBF",
|
|
"light": "#DD6718",
|
|
"highContrast": "#ED7718"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.constant",
|
|
"description": "Color for constants",
|
|
"defaults": {
|
|
"dark": "#569cd6",
|
|
"light": "#267cb6",
|
|
"highContrast": "#569cd6"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.type",
|
|
"description": "Color for types",
|
|
"defaults": {
|
|
"dark": "#4EC9B0",
|
|
"light": "#267F99",
|
|
"highContrast": "#4EC9B0"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.field",
|
|
"description": "Color for fields",
|
|
"defaults": {
|
|
"dark": "#4EC9B0",
|
|
"light": "#267F99",
|
|
"highContrast": "#4EC9B0"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.variable",
|
|
"description": "Color for variables",
|
|
"defaults": {
|
|
"dark": "#4EC9B0",
|
|
"light": "#267F99",
|
|
"highContrast": "#4EC9B0"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.variable.mut",
|
|
"description": "Color for mutable variables",
|
|
"defaults": {
|
|
"dark": "#4EC9B0",
|
|
"light": "#267F99",
|
|
"highContrast": "#4EC9B0"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.module",
|
|
"description": "Color for modules",
|
|
"defaults": {
|
|
"dark": "#D4D4D4",
|
|
"light": "#000000",
|
|
"highContrast": "#FFFFFF"
|
|
}
|
|
},
|
|
{
|
|
"id": "ralsp.inlayHint",
|
|
"description": "Color for inlay hints",
|
|
"defaults": {
|
|
"dark": "#A0A0A0F0",
|
|
"light": "#747474",
|
|
"highContrast": "#BEBEBE"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|