267: Fix the extend keybinding r=DJMcNab a=DJMcNab

Make the extend selection keybinding less annoying for users not used to Injelli-J (myself included). Also fixes a minor style issue and runs `npm update`.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
This commit is contained in:
bors[bot] 2018-12-09 09:09:07 +00:00
commit 904438e993
5 changed files with 808 additions and 734 deletions

View File

@ -112,10 +112,7 @@ pub fn run_rustfmt(mode: Mode) -> Result<()> {
fn install_rustfmt() -> Result<()> {
run(&format!("rustup install {}", TOOLCHAIN), ".")?;
run(
&format!(
"rustup component add rustfmt-preview --toolchain {}",
TOOLCHAIN
),
&format!("rustup component add rustfmt --toolchain {}", TOOLCHAIN),
".",
)
}

View File

@ -127,10 +127,7 @@ fn install_code_extension() -> Result<()> {
} else {
run(r"npm install", "./editors/code")?;
}
run(
r"node ./node_modules/vsce/out/vsce package",
"./editors/code",
)?;
run(r"npm run package", "./editors/code")?;
if cfg!(windows) {
run(
r"cmd.exe /c code.cmd --install-extension ./ra-lsp-0.0.1.vsix",

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,9 @@
{
"name": "ra-lsp",
"displayName": "ra-lsp",
"description": "",
"description": "An alternative rust language server to the RLS",
"preview": true,
"private": true,
"version": "0.0.1",
"publisher": "matklad",
"repository": {
@ -15,6 +17,7 @@
},
"scripts": {
"vscode:prepublish": "npm run compile",
"package": "vsce package",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
@ -28,18 +31,18 @@
"singleQuote": true
},
"dependencies": {
"event-stream": "^3.3.4",
"event-stream": "^4.0.1",
"vscode-languageclient": "^5.1.1"
},
"devDependencies": {
"@types/mocha": "^2.2.42",
"@types/node": "^8.10.34",
"prettier": "^1.14.3",
"@types/node": "^8.10.38",
"prettier": "^1.15.3",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0",
"tslint-config-prettier": "^1.17.0",
"typescript": "^2.6.1",
"vsce": "^1.52.0",
"vscode": "^1.1.21"
"vsce": "^1.53.2",
"vscode": "^1.1.26"
},
"activationEvents": [
"onLanguage:rust"
@ -107,7 +110,7 @@
},
{
"command": "ra-lsp.extendSelection",
"key": "ctrl+w",
"key": "shift+alt+right",
"when": "editorTextFocus && editorLangId == rust"
},
{

View File

@ -18,9 +18,9 @@ export async function handle() {
return;
}
const request: ExtendSelectionParams = {
selections: editor.selections.map(s => {
return Server.client.code2ProtocolConverter.asRange(s);
}),
selections: editor.selections.map(s =>
Server.client.code2ProtocolConverter.asRange(s)
),
textDocument: { uri: editor.document.uri.toString() }
};
const response = await Server.client.sendRequest<ExtendSelectionResult>(