Commit graph

6701 commits

Author SHA1 Message Date
Matt Bierner f929531dfb Add CodeActionKind.intersects
Fixes #66881
2019-01-21 18:04:01 -08:00
Matt Bierner c994fc20fa Apply auto fix on save actions sequentially and make sure we request fixes of the specific type we are interested in 2019-01-21 17:16:06 -08:00
Matt Bierner ee65a242a9 Gate auto fix for TS to use an undocumented experimental TS setting
We likely do not want to enable autofixes until we have proper TS support: https://github.com/Microsoft/TypeScript/issues/29452
2019-01-21 17:16:06 -08:00
Matt Bierner 4e6bd4aedd Prototype autofix source code action
Part of #62110

* Adds a new `CodeActionKind`: `source.autoFix`.
* Implements a simple auto fix provider for typescript. This provider can auto fix `implement interface` and `spelling` errors (provided there is only a single valid fix listed)

The provider is likely not something we actually want to check it (especially in its current state), we should ask TS for proper autoFix support
2019-01-21 17:16:06 -08:00
Matt Bierner 4f8d546aa7 De-duplicate "fix all" quick fixes across requests for multiple diagnostics in selection range
For https://github.com/Microsoft/typescript-tslint-plugin/issues/49
2019-01-21 17:15:49 -08:00
Matt Bierner 59ce7f3b28 Fix markdown preview code highlighting
Fixes #66772
2019-01-21 14:09:30 -08:00
Matt Bierner bcc2281e45 Rename CodeAction.canAutoApply -> CodeAction.preferred
Part of #62110

Use the more generic name as suggested in https://github.com/Dart-Code/Dart-Code/issues/1393. This makes the intent of the field more clear and also allows us to extend the concept of preferred code actions to refactorings and other classes of code actions

Experimentally also allows a `preferred` value for `apply` when configuring code aciton keyboard shortcuts. This applies the preferred code action returned from the list of code actions returned
2019-01-21 14:09:30 -08:00
Pine Wu 02b7e03b72 Update service 2019-01-18 11:16:20 -08:00
Pine Wu 9a3ef8c4b2 Load html data using new API per Microsoft/vscode-html-languageservice#45 2019-01-18 11:09:34 -08:00
Benjamin Pasero af010d9cf7
Merge branch 'master' into regex-fixes 2019-01-18 12:37:18 +01:00
Pine Wu e0a3f26e07 Emmet dependency for #66013 2019-01-17 13:18:22 -08:00
Martin Aeschlimann 54adadd72c fix lgtm warnings 2019-01-17 20:53:18 +01:00
Ubuntu 35eae99ec3 Fix more lgtm.com issues 2019-01-17 18:06:23 +00:00
Pine Wu 926cfe1c4a Update css language service for #66519 and #66637 2019-01-16 18:36:11 -08:00
Matt Bierner 1904cd8d84 Prototype auto fixable quick fixes
Part of #62110

- Adds a new field `canAutoApply` to code actions. This field indicates that a code action can be applied without additional user input. For quick fixes, this should be set if the fix properly addresses the error

- Enable auto fixes for TS spelling errors

- Added a `editor.action.autoFix` command to triggers auto fixes at the current cursor position
2019-01-16 17:56:22 -08:00
Pine Wu ba0d1454e7 Update emmet-helper for #65455 2019-01-16 15:40:30 -08:00
Pine Wu 5ac02a0910 Update emmet-helper for #63384 and #62855 2019-01-16 11:13:25 -08:00
alexet 0798d13f10 Remove duplicate character from regex class 2019-01-16 17:56:17 +00:00
alexet 651f624f06 Remove spurious pipes from regexes 2019-01-16 17:40:47 +00:00
João Moreno 65fcf3180b
Merge pull request #66416 from Microsoft/rebornix/git-blame
add git blame api
2019-01-16 09:17:44 +01:00
rebornix f27183be67 add error code for git blame 2019-01-15 11:56:48 -08:00
Matt Bierner 2ab82c12ed Make sure we opt in to new TS user preferences for enabling rename features
Fixes #66176
2019-01-11 15:42:03 -08:00
Matt Bierner d3d16d2b34 Don't return symbolic columns for webview panels
Fixes #56097

When a symbolic column is used while creating a webview panel, instead set the `viewColum` as `undefined` and then resolve it once we know the real (non-symbolic) column
2019-01-11 15:32:15 -08:00
Matt Bierner adb4b04bfd Fix type error 2019-01-11 14:40:17 -08:00
Matt Bierner beef295f9a Normalize the TS server path in logged TS server errors 2019-01-11 14:23:29 -08:00
Matt Bierner e730375b7a Don't make semantic requests against the TS server when the languageService has been disabled 2019-01-11 14:23:29 -08:00
Matt Bierner 6682006c8b Use more explicit state for TS server states
Try to prevent the tracked server state from getting into weird invalid states and make the state more explicit
2019-01-11 14:23:29 -08:00
rebornix e5a596be29 add git blame api 2019-01-11 13:10:54 -08:00
Pine Wu 2b0cee0eba contributes.css.customData for #66414 2019-01-11 12:21:25 -08:00
Pine 3e8028e5d8
Merge pull request #66228 from Microsoft/octref/customCSSData
css.experimental.customData
2019-01-11 11:57:26 -08:00
Pine Wu 67973726b6 Upgrade css service version 2019-01-11 11:20:47 -08:00
Pine c42df918e5
Merge pull request #66306 from Microsoft/octref/html-workspace-folders
Handle workspace folder reading for custom HTML data
2019-01-11 11:18:02 -08:00
Matt Bierner 2f5d88899d Make NoContentResponse an constant instead of a class 2019-01-11 11:04:58 -08:00
Matt Bierner 60f232b246 Include TypeScript version in errors logged to dev tools
Fixes #66368
2019-01-11 11:04:58 -08:00
Matt Bierner 3da39a64dd Improve logging of TypeScript server errors
Fixes #66366
Fixes #66367

Avoid printing the error twice in the trace

Make sure we show helpful error information in the VS Code dev tools when a TS server error occurrs
2019-01-11 11:04:57 -08:00
Matt Bierner d2a8ca946f Use isCancellationRequested 2019-01-11 11:04:57 -08:00
Matt Bierner 66511a0bdb Interup geterror during rename
Rename is a user triggered operation and should interupt long run error computations
2019-01-11 11:04:57 -08:00
SteVen Batten ccdd2997a6
update AI module (#66370)
fixes #64849
2019-01-10 17:43:25 -08:00
Martin Aeschlimann ed48143239
Merge pull request #66072 from mathiasvr/patch-2
HTML Snippet: Consistent void tags
2019-01-10 15:58:17 +01:00
Matt Bierner 344f4fa361 Make sure we update the markdown document on config changes 2019-01-09 19:32:53 -08:00
Matt Bierner 758280cc47 Extract TokenCache 2019-01-09 19:27:41 -08:00
Matt Bierner 5496ba7617 Prevent possible race while initilizing markdown engine 2019-01-09 19:18:23 -08:00
Matt Bierner 1bbc0e3b4d Deprecate the previewFrontMatter setting
Switch to always hiding the frontmatter and then allowing markdown-it plugins to render it properly if they wish. `previewFrontMatter: "show"` is also not very useful since it usually results in a jumble of text at the top of the file

This is required with the new performance work to avoid re-tokenizing the document  multiple times during rendering
2019-01-09 19:05:55 -08:00
Matt Bierner e325cce9bc Fixing markdown unit tests 2019-01-09 18:15:34 -08:00
Matt Bierner 9140285092
Merge pull request #65953 from skprabhanjan/fix-65575
Fix-65575 MarkdownIt plugins (or Rules) called multiple times for one input
2019-01-09 17:41:47 -08:00
Matt Bierner 3580109d05 Pick up new TS version 2019-01-09 17:37:41 -08:00
Pine Wu 177b805150 Handle workspace folder reading 2019-01-09 16:16:04 -08:00
Pine Wu 9efac59949 Improve custom data reading 2019-01-09 15:55:55 -08:00
Matt Bierner 7e86998ef9 Fixes #66247
Allow markdown comments to match blocks that contain extra docs on first line
2019-01-09 12:58:20 -08:00
Pine Wu 70696746b0 Address feedback 2019-01-09 12:43:51 -08:00