Commit Graph

105 Commits

Author SHA1 Message Date
Emil Lauridsen
b8ea91ae2d Fix eslint errors 2019-04-03 11:01:34 +02:00
Emil Lauridsen
3a79490187 Add extra double quotes only on Windows.
As tested by @edwin0cheng, Windows requires the quotes removed in the
previous commit. This commit re-adds the quotes gated by an if statement
on the node environment, so that quotes are only added on Windows.
2019-04-03 10:38:18 +02:00
Emil Lauridsen
4d78c85de2 Fix VSCode cargo-watch functionality on Linux.
As of #1079 the VSCode cargo-watch functionality has been broken on
Linux systems.

The cause seems to be that linux takes the added quotes inside process
arguments literally, so it attempts to make cargo-watch run the command
`cargo "check --message-format json"` with the entire quoted part being
treated as a single long subcommand, which cargo doesn't know how to
handle.

Removing the extra quotes solves the issue.
2019-04-03 09:50:38 +02:00
Edwin Cheng
88bcaf0e18 Add cargo-watch package animation and refactoring 2019-04-03 01:47:10 +08:00
Edwin Cheng
b60e2f779b Fix prettier error 2019-04-02 17:43:09 +08:00
Edwin Cheng
9d26984998 Add terminate process implemntation note 2019-04-02 17:13:14 +08:00
Edwin Cheng
06053a0a76 Add Cargo.toml file check before cargo watch start 2019-04-02 15:03:31 +08:00
Edwin Cheng
02e450f354 Add cargo-watch.check-arguments 2019-04-02 15:03:31 +08:00
Edwin Cheng
ee05eafe6c Add config for cargo-watch trace 2019-04-02 15:03:31 +08:00
Edwin Cheng
b84d0fc1a3 Add proper process teminate method 2019-04-02 15:03:31 +08:00
Edwin Cheng
c894a3e19b Fix prettier error 2019-04-02 15:03:30 +08:00
Edwin Cheng
6971c7f118 Fixed tslint error 2019-04-02 15:03:30 +08:00
Edwin Cheng
ac8f35019b Fix tslint error 2019-04-02 15:03:30 +08:00
Edwin Cheng
b3683df0cd Improve cargo-watch usage 2019-04-02 15:03:30 +08:00
pcpthm
1529eeb1b3 Don't execute cargo watch when popup is dismissed 2019-03-22 09:38:48 +09:00
Ville Penttinen
5c3e9c716e Change enableCargoWatchOnStartup to have three states
This fixes #1005.

Defaults to `ask` which prompts users each time whether to start `cargo watch`
or not. `enabled` always starts `cargo watch` and `disabled` does not.
2019-03-21 13:56:25 +02:00
Igor Matuszewski
34b428cc5e Appease CI 2019-03-18 22:51:01 +01:00
Igor Matuszewski
7c2595c268 Guard auto cargo watch behind a config option 2019-03-18 22:35:47 +01:00
Igor Matuszewski
60cac29964 Separate out the interactive cargo watch procedure 2019-03-18 22:30:23 +01:00
Igor Matuszewski
5c3cc8c95f Reformat using Prettier 2019-03-18 22:15:03 +01:00
Igor Matuszewski
7d2378ed7d Remove unused imports 2019-03-18 21:16:20 +01:00
Igor Matuszewski
4bd6143062 Prefer installing cargo-watch via Task API
This gives us much more fine-grained stdout buffering and ANSI terminal colors.
2019-03-18 21:13:49 +01:00
Igor Matuszewski
21b73f9844 Respect the user-provided label when creating task 2019-03-18 21:04:41 +01:00
Igor Matuszewski
afe9cea640 Ask the user to install and start cargo watch 2019-03-18 20:50:52 +01:00
Igor Matuszewski
9f1ae658db Define a cargo watch task 2019-03-18 20:47:52 +01:00
Igor Matuszewski
bc560a2f5b Remove redundant Runnable.range 2019-03-18 17:53:07 +01:00
Aleksey Kladov
6ef614f785 activate extension if Cargo.toml is present 2019-03-13 16:38:49 +03:00
Lucas Spits
9fe3b36bda
Applied code style of `npm run fix` 2019-03-11 21:22:54 +01:00
Lucas Spits
915c079e26
Fix typescript linting errors 2019-03-11 20:53:56 +01:00
Lucas Spits
de4ad44282
Merge branch 'master' of https://github.com/LDSpits/rust-analyzer into feature/workspace-directory 2019-03-11 20:41:48 +01:00
Lucas Spits
7185c594fe
Retrieve current directory from workspaces 2019-03-11 20:38:46 +01:00
Bernardo
7cf9c34f66 prettier format 2019-03-10 15:20:27 +01:00
Bernardo
536a579f2e simplify watch patterns 2019-03-10 13:35:02 +01:00
Ville Penttinen
0dcb1cb569 Add showWorkspaceLoadedNotification to vscode client
This allows users to control whether or not they want to see the "workspace
loaded" notification.

This is done on the server side using InitializationOptions which are provided
by the client. By default show_workspace_loaded is true, meaning the
notification is sent.
2019-03-06 11:34:38 +02:00
Ville Penttinen
0db95fc812 Allow syntax tree to update when changing files
Previously when using the file based syntax tree, it would not update until a
change had been made in the new file. Now we automatically update the syntax
tree to match the current file.
2019-03-03 22:03:37 +02:00
Ville Penttinen
1b4e0ec1c8 Rename syntaxtree text provider to SyntaxTreeContentProvider 2019-03-03 22:02:19 +02:00
Ville Penttinen
c2d3203d0c Add vscode support for range in SyntaxTreeParams
This enables the client to use a command to either show the live-updating
version of the syntax tree for the current file. Or optionally when a selected
range is provided, we then provide a snapshot of the syntax tree for the range.
2019-03-03 21:43:40 +02:00
Ville Penttinen
5a9a314b10 Change default value of highlightingOn to false 2019-02-26 08:56:11 +02:00
kjeremy
f626733c4a Use named multiline Problem Matcher
Now that https://github.com/Microsoft/vscode/pull/65840 is in the latest
release we can use the first commit from https://github.com/rust-analyzer/rust-analyzer/pull/408
2019-02-18 13:12:54 -05:00
kjeremy
50383ceae1 Specify vscode 1.31 2019-02-12 10:31:11 -05:00
DJMcNab
48d6a52ac1 Update dependencies 2019-02-10 10:32:45 +00:00
DJMcNab
28fd368393 Fix trace and prettier 2019-02-10 10:30:16 +00:00
DJMcNab
9138317021 Add support for a seperate output channel for trace messages 2019-02-10 10:06:33 +00:00
kjeremy
2c7a07e4e8 Update npm packages 2019-02-07 14:55:09 -05:00
Ville Penttinen
a4d0aebcb8 Run prettier 2019-02-07 12:54:41 +02:00
Ville Penttinen
77a4a311fe Add new configuration "enableEnhancedTyping" to control registering of "type" command
This further fixes problems when having a VIM extension (at least vscodevim)
enabled, by not calling `overrideCommand('type', commands.onEnter.handle)` when
enableEnhancedTyping is set to `false`.

The problem is dependent on the order in which extensions are activated, if
rust-analyzer is activated before `vscodevim`, rust-analyzer will register the
`type` command, and when `vscodevim` finally attempts to activate, it will fail
to register the command. This causes `vscodevim` to stop working properly.

This setting allows users to disable the registerCommand `type` in
rust-analyzer, allowing `vscodevim` to work. The setting defaults to `true`.

Currently changing the setting requires reloading of the window.
2019-02-07 12:37:36 +02:00
Jeremy Kolb
6ac4cca6c1 Implement lens for impls and support resolving lenses. 2019-02-04 08:45:33 -05:00
bors[bot]
897e74f089 Merge #704 #705
704: Feat/jinstall lsp r=matklad a=DJMcNab

Add `cargo jinstall-lsp` as a shorthand to include jemalloc support

Also activate the extension when the commands are run which is makes sense to activate.

I still need to work out what `Run` actually does to give it a better name, and other extensions through some voodoo magic are able to hide their commands from the command palette before the extension is activated, which would be a better fix.

705: Pass Documentation up to LSP and add "rust" to our codeblocks there r=matklad a=kjeremy

Fixes #699

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-01-30 19:08:06 +00:00
kjeremy
63edfaa9a0 Clear the console when running single tasks 2019-01-30 13:46:31 -05:00
DJMcNab
ce939795ed Add category to the commands 2019-01-29 17:16:14 +00:00