Commit Graph

2471 Commits

Author SHA1 Message Date
Andre Weinand
4215ed797c protect against undefined session; fixes #69128 2019-02-21 11:56:54 +01:00
Sandeep Somavarapu
564b7120ab clean up 2019-02-21 11:34:03 +01:00
isidor
835458245d labelService: register formatters via API. Also expose getSeperator 2019-02-21 10:01:52 +01:00
Matt Bierner
a3e98d6c9b Take a code action kind instead of a string for _executeCodeActionProvider 2019-02-20 13:36:44 -08:00
Alex Dima
3199f1fd3b Introduce and adopt IExtHostWorkspaceProvider 2019-02-20 17:11:51 +01:00
Alex Dima
43f6bf8ff7 Address some null errors (#60565) 2019-02-20 12:05:33 +01:00
Matt Bierner
5c5d64e601 Remove cast that was causing type error 2019-02-19 16:41:24 -08:00
Matt Bierner
7e759cf3c8 Annotate more usage before assign strict null errors 2019-02-19 16:29:01 -08:00
Matt Bierner
e9a1cea1fd Strict null fixes in extHost 2019-02-19 16:29:01 -08:00
Sandeep Somavarapu
ef2a3e89fb #68927 use path.join 2019-02-19 12:48:00 +01:00
Sandeep Somavarapu
e2b1f24253 #68658 Strict null check - ExtHostConfiguration test 2019-02-19 12:06:08 +01:00
Sandeep Somavarapu
36e3c88fa4 #68658 Strict null check - ExtHostConfiguration 2019-02-19 12:06:08 +01:00
Alexandru Dima
f095776d67 Merge pull request #62079 from dlech/issue10339
add editor.indentSize option
2019-02-18 16:44:36 +01:00
Alex Dima
b164459bf8 Tweaks for #62079 2019-02-18 16:41:01 +01:00
Benjamin Pasero
39566fa5e3 Reduce usages of extpath.normalizeWithSlashes() (#68928)
* adopt in tests

* adopt more join() that are straight forward

* more safe usages

* more adoption
2019-02-18 16:31:02 +01:00
David Lechner
5f70fddbfa Add editor.indentSize option
This is an attempt to address issue #10339.

Background:

Currently, the `editor.tabSize` option does two things - it specifies the width of the tab character and it specifies how many columns to advance when the tab key is pressed. However, there is code in the wild that has a mix of spaces and tabs that expects these two values to be different.

These generally use and indent size of 2 or 4 and spaces are used for indentation until the indent becomes >= 8. The tab character size is excpected to be 8 and groups of 8 spaces are replaced with a tab character. Indent levels end up looking like 2 spaces, 4 spaces, 6 spaces, 1 tab, 1 tab + 2 spaces, and so on.

Implementation:

In the editor options, a new option, `editor.indentSize` is added. This, in conjunction with `editor.tabSize` has the same semantics as `indent_size` and `tab_width` in the well known [EditorConfig specification][1].

> indent_size: a whole number defining the number of columns used for each indentation level and the width of soft tabs (when supported). When set to "tab", the value of tab_width (if specified) will be used.
>
> tab_width: a whole number defining the number of columns used to represent a tab character. This defaults to the value of indent_size and doesn't usually need to be specified.

[1]: editorconfig.org

The new `indentSize` option takes a numeric value or "tab" just as EditorConfig's `indent_size`. The default value is set to "tab" so that current default behavior of VS Code does not change and existing user settings will not break.

When getting the new `indentSize` option programatically, it always returns a numeric value (just as `tabSize` does when set to the deprecated "auto" value).

In the text editor model, a new property is added for `indentSize`. Unlike the configuration options where the value of one property influences the other, In this code `tabSize` now should only mean "the width of the tab character" and `indentSize` should only mean "how may columns is one indent".

The cursor operations and shift command are updated to reflect these new semantics.
2019-02-18 12:17:13 +01:00
Martin Aeschlimann
73a912ce9e rename pathext.join to joinWithSlashes 2019-02-18 10:36:09 +01:00
Benjamin Pasero
67494c9dcb paths - drop pathToRelative workaround 2019-02-18 10:19:39 +01:00
Matt Bierner
597e6dc470 Take optional kind for vscode.executeCodeActionProvider command
This is required as some code actions providers will not return results unless code actions of a specific kind are requested
2019-02-15 20:17:21 -08:00
Martin Aeschlimann
98953dd91a rename resources.fsPath to resources.originalFSPath 2019-02-15 16:40:23 +01:00
Martin Aeschlimann
833fc7aa99 test fix 2019-02-15 16:40:23 +01:00
Martin Aeschlimann
a06dbfc3f2 rename extpath.normalize to extpath.normalizeWithSlash 2019-02-15 16:40:23 +01:00
Martin Aeschlimann
92a61b8d16 use path.normalize for extpath.normalize(.., true) 2019-02-15 16:40:23 +01:00
Matt Bierner
f558087bfd Converting some instances of Promise.resolve(null) to Promise.resolve()
In `Action.run` methods, we don't need an explicit null return value but can use undefined instead
2019-02-14 14:45:46 -08:00
Matt Bierner
52f8705214 Strict null work for quick input 2019-02-14 14:33:56 -08:00
Matt Bierner
10c3e9d285 Strict null work for exthost 2019-02-14 14:33:56 -08:00
Martin Aeschlimann
dd40499fda Use URI for linkDTO 2019-02-14 18:24:32 +01:00
Johannes Rieken
7b281daea5 es6 aftermath, static property of type X are created before decorating type X and therefore failing the instanceof-check 2019-02-14 15:59:55 +01:00
Alex Dima
1ed83c7cad Move schema definitions to the commands definitions (#66458) 2019-02-14 12:37:37 +01:00
Johannes Rieken
3283483974 add formatter call, use it for no-formatter-case for now #41882 2019-02-14 11:16:32 +01:00
Peng Lyu
54c75aa50b support icons 2019-02-13 19:34:35 -08:00
Peng Lyu
1789af2b83 Use customized toolbar for reactions. 2019-02-13 19:34:35 -08:00
Matt Bierner
ea755ec3d7 Annotate apis that can return undefined
Strict null work
2019-02-13 14:20:40 -08:00
Matt Bierner
5b98f71146 Fix webview deserialization potential crash 2019-02-13 10:47:56 -08:00
Johannes Rieken
a45fb4099c make insets fit into layering scheme 2019-02-13 16:23:52 +01:00
Johannes Rieken
8d25e4b246 Merge pull request #66418 from rdeline/code-inset
Code inset feature
2019-02-13 15:54:45 +01:00
Sandeep Somavarapu
d3b30f8b48 #67966 Group setting message and refresh together 2019-02-13 15:37:28 +01:00
Johannes Rieken
ac03e62afc last round of making changes smaller 2019-02-13 15:20:29 +01:00
Johannes Rieken
b49bf46bf2 remove api command for code insets 2019-02-13 14:51:32 +01:00
Johannes Rieken
58d2b5be06 disable event for now, remove extension location from provider 2019-02-13 14:46:31 +01:00
Johannes Rieken
44b7588362 remove getNamedCustomer, connect MainThreadWebview with CodeInsetController 2019-02-13 12:47:46 +01:00
Johannes Rieken
8246c1648f workbenchs/parts became workbench/contrib 2019-02-13 12:47:46 +01:00
Johannes Rieken
ace73c05b7 move rest code code inset to workbench out of (monaco) editor 2019-02-13 12:47:46 +01:00
Johannes Rieken
d02c8011df mark API as proposed and enforce proposedApi-property 2019-02-13 12:47:45 +01:00
Rob DeLine
066dfef8f7 Add Code Inset Feature 2019-02-13 12:46:25 +01:00
Alex Dima
767715ba14 Explore resolver api 2019-02-13 11:41:29 +01:00
Benjamin Pasero
a99b64ae8e paths - avoid posix usages 2019-02-13 11:25:10 +01:00
Benjamin Pasero
622b3d62dd paths - paths.node.ts => path.ts 2019-02-12 20:36:23 +01:00
Benjamin Pasero
b0acf49b18 paths - move path to extpath 2019-02-12 20:36:23 +01:00
SteVen Batten
5ebd625b40 use new path implementation (#68538)
* adopt paths.node over path

* fix strict null

* remove hacky typing inlabel.test.ts
2019-02-12 20:14:50 +01:00