Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around VSC issue with formatting on save #624 #635

Merged
merged 90 commits into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
7675901
Basic tokenizer
Dec 1, 2017
eb42669
Fixed property names
Dec 1, 2017
2756974
Tests, round I
Dec 1, 2017
c2c1ced
Tests, round II
Dec 2, 2017
a108c96
merge master
Dec 3, 2017
14864a5
tokenizer test
Dec 4, 2017
0ed51d6
Remove temorary change
Dec 4, 2017
51b544c
Fix merge issue
Dec 4, 2017
3cd11e6
Merge conflict
Dec 4, 2017
82e0ad1
Merge conflict
Dec 4, 2017
9295c1a
Completion test
Dec 4, 2017
06eb1a5
Fix last line
Dec 4, 2017
e9db8e0
Fix javascript math
Dec 4, 2017
d12ca03
Merge master
Dec 5, 2017
d8ab041
Make test await for results
Dec 5, 2017
db75cd0
Add license headers
Dec 5, 2017
9ab2c47
Rename definitions to types
Dec 5, 2017
d587485
License headers
Dec 5, 2017
1da5e0a
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Dec 5, 2017
7668cee
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Dec 11, 2017
1ac4932
Fix typo in completion details (typo)
Dec 11, 2017
2aa5a6c
Fix hover test
Dec 12, 2017
5db31bd
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Dec 12, 2017
560d2af
Russian translations
Dec 13, 2017
c71024d
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Dec 13, 2017
31aa087
Update to better translation
Dec 13, 2017
593ae05
Fix typo
Dec 13, 2017
e6d69bb
#70 How to get all parameter info when filling in a function param list
Dec 13, 2017
b5a23d3
Fix #70 How to get all parameter info when filling in a function para…
Dec 14, 2017
cd200f7
Clean up
Dec 14, 2017
7c33228
Clean imports
Dec 14, 2017
c4a6b90
CR feedback
Dec 14, 2017
f85b848
Trim whitespace for test stability
Dec 14, 2017
37c210b
More tests
Dec 15, 2017
61a5650
Better handle no-parameters documentation
Dec 15, 2017
a10305e
Better handle ellipsis and Python3
Dec 15, 2017
bfcae78
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Dec 15, 2017
42a5f79
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Dec 18, 2017
e4ba322
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Jan 8, 2018
7baec1a
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Jan 9, 2018
9cb43e7
#385 Auto-Indentation doesn't work after comment
Jan 9, 2018
5a9c3fd
#141 Auto indentation broken when return keyword involved
Jan 9, 2018
9800c4a
Undo changes
Jan 9, 2018
3205d33
Merge branch 'master' of https://github.com/Microsoft/vscode-python
Jan 11, 2018
de6a59c
Round I
Jan 11, 2018
c374a43
Round 2
Jan 12, 2018
d1f429b
Round 3
Jan 12, 2018
7eca943
Round 4
Jan 13, 2018
595f63c
Round 5
Jan 16, 2018
86e3e05
no message
Jan 16, 2018
c02bd84
Round 6
Jan 17, 2018
c15fdb2
Round 7
Jan 18, 2018
29833eb
Clean up targets and messages
Jan 18, 2018
5c729db
Settings propagation
Jan 18, 2018
a5aa108
Tests
Jan 18, 2018
7848d1b
Test warning
Jan 18, 2018
2da60af
Fix installer tests
Jan 18, 2018
372c855
Tests
Jan 18, 2018
3800516
Merge branch 'master' of https://github.com/Microsoft/vscode-python i…
Jan 18, 2018
d3afee8
Merge branch 'master' of https://github.com/Microsoft/vscode-python i…
Jan 19, 2018
2f361f5
Test fixes
Jan 19, 2018
384ca3a
Fix terminal service and tests async/await
Jan 19, 2018
4dc23fb
Fix mock setup
Jan 19, 2018
82e4d52
Test fix
Jan 19, 2018
8207953
Test async/await fix
Jan 19, 2018
8b701d2
Test fix + activate tslint on awaits
Jan 19, 2018
c5ece0a
Use command manager
Jan 19, 2018
5972c11
Work around updateSettings
Jan 19, 2018
11a4891
Multiroot fixes, partial
Jan 20, 2018
84562bf
More workarounds
Jan 20, 2018
b5c547a
Multiroot tests
Jan 21, 2018
ecb90a6
Fix installer test
Jan 21, 2018
cd79d03
Test fixes
Jan 21, 2018
27a4244
Disable prospector
Jan 22, 2018
34365a5
Enable dispose in all cases
Jan 22, 2018
9071ea8
Fix event firing
Jan 22, 2018
4e2c620
Min pylint options
Jan 22, 2018
c090581
Min checkers & pylintrc discovery
Jan 23, 2018
96fcba1
Fix Windows path in tests for Travis
Jan 23, 2018
25c7d0a
Fix Mac test
Jan 23, 2018
c824c3e
Merge branch 'master' of https://github.com/Microsoft/vscode-python i…
Jan 24, 2018
9de1d81
Merge branch 'lint' of https://github.com/MikhailArkhipov/vscode-pyth…
Jan 24, 2018
36e2fa9
Test fix
Jan 24, 2018
dfdca98
Work around VSC issue with formatting on save #624
Jan 24, 2018
96a81ca
Workaround test
Jan 25, 2018
368c173
Unused
Jan 25, 2018
3999c90
Merge master
Jan 25, 2018
ae81702
Old file
Jan 25, 2018
a31b3fd
Use version instead of content
Jan 29, 2018
d9c7d3d
Update tests
Jan 29, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
"onCommand:python.startREPL",
"onCommand:python.goToPythonObject",
"onCommand:python.setLinter",
"onCommand:python.enableLinting",
"onCommand:python.createTerminal"
"onCommand:python.enableLinting",
"onCommand:python.createTerminal"
],
"main": "./out/client/extension",
"contributes": {
Expand Down
6 changes: 4 additions & 2 deletions src/client/common/application/documentManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// tslint:disable:no-any

import { injectable } from 'inversify';
import { Event, TextDocument, TextDocumentShowOptions, TextEditor, TextEditorOptionsChangeEvent, TextEditorSelectionChangeEvent, TextEditorViewColumnChangeEvent, Uri, ViewColumn, window } from 'vscode';
import { Event, TextDocument, TextDocumentShowOptions, TextEditor, TextEditorOptionsChangeEvent, TextEditorSelectionChangeEvent, TextEditorViewColumnChangeEvent, Uri, ViewColumn, window, workspace } from 'vscode';
import { IDocumentManager } from './types';

@injectable()
Expand All @@ -30,10 +30,12 @@ export class DocumentManager implements IDocumentManager {
public get onDidChangeTextEditorViewColumn(): Event<TextEditorViewColumnChangeEvent> {
return window.onDidChangeTextEditorViewColumn;
}
public get onDidSaveTextDocument(): Event<TextDocument> {
return workspace.onDidSaveTextDocument;
}
public showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable<TextEditor>;
public showTextDocument(document: TextDocument | Uri, options?: TextDocumentShowOptions): Thenable<TextEditor>;
public showTextDocument(uri: any, options?: any, preserveFocus?: any): Thenable<TextEditor> {
return window.showTextDocument(uri, options, preserveFocus);
}

}
5 changes: 5 additions & 0 deletions src/client/common/application/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ export interface IDocumentManager {
*/
readonly onDidChangeTextEditorViewColumn: Event<TextEditorViewColumnChangeEvent>;

/**
* An event that is emitted when a [text document](#TextDocument) is saved to disk.
*/
readonly onDidSaveTextDocument: Event<TextDocument>;

/**
* Show the given document in a text editor. A [column](#ViewColumn) can be provided
* to control where the editor is being shown. Might change the [active editor](#window.activeTextEditor).
Expand Down
36 changes: 18 additions & 18 deletions src/client/common/application/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@
// Licensed under the MIT License.

import { injectable } from 'inversify';
import { CancellationToken, Event, FileSystemWatcher, GlobPattern, Uri, workspace, WorkspaceConfiguration, WorkspaceFolder, WorkspaceFoldersChangeEvent } from 'vscode';
import * as vscode from 'vscode';
import { IWorkspaceService } from './types';

@injectable()
export class WorkspaceService implements IWorkspaceService {
public get onDidChangeConfiguration(): Event<void> {
return workspace.onDidChangeConfiguration;
public get onDidChangeConfiguration(): vscode.Event<void> {
return vscode.workspace.onDidChangeConfiguration;
}
public get rootPath(): string | undefined {
return workspace.rootPath;
return vscode.workspace.rootPath;
}
public get workspaceFolders(): WorkspaceFolder[] | undefined {
return workspace.workspaceFolders;
public get workspaceFolders(): vscode.WorkspaceFolder[] | undefined {
return vscode.workspace.workspaceFolders;
}
public get onDidChangeWorkspaceFolders(): Event<WorkspaceFoldersChangeEvent> {
return workspace.onDidChangeWorkspaceFolders;
public get onDidChangeWorkspaceFolders(): vscode.Event<vscode.WorkspaceFoldersChangeEvent> {
return vscode.workspace.onDidChangeWorkspaceFolders;
}
public getConfiguration(section?: string, resource?: Uri): WorkspaceConfiguration {
return workspace.getConfiguration(section, resource);
public getConfiguration(section?: string, resource?: vscode.Uri): vscode.WorkspaceConfiguration {
return vscode.workspace.getConfiguration(section, resource);
}
public getWorkspaceFolder(uri: Uri): WorkspaceFolder | undefined {
return workspace.getWorkspaceFolder(uri);
public getWorkspaceFolder(uri: vscode.Uri): vscode.WorkspaceFolder | undefined {
return vscode.workspace.getWorkspaceFolder(uri);
}
public asRelativePath(pathOrUri: string | Uri, includeWorkspaceFolder?: boolean): string {
return workspace.asRelativePath(pathOrUri, includeWorkspaceFolder);
public asRelativePath(pathOrUri: string | vscode.Uri, includeWorkspaceFolder?: boolean): string {
return vscode.workspace.asRelativePath(pathOrUri, includeWorkspaceFolder);
}
public createFileSystemWatcher(globPattern: GlobPattern, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher {
return workspace.createFileSystemWatcher(globPattern, ignoreChangeEvents, ignoreChangeEvents, ignoreDeleteEvents);
public createFileSystemWatcher(globPattern: vscode.GlobPattern, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): vscode.FileSystemWatcher {
return vscode.workspace.createFileSystemWatcher(globPattern, ignoreChangeEvents, ignoreChangeEvents, ignoreDeleteEvents);
}
public findFiles(include: GlobPattern, exclude?: GlobPattern, maxResults?: number, token?: CancellationToken): Thenable<Uri[]> {
return workspace.findFiles(include, exclude, maxResults, token);
public findFiles(include: vscode.GlobPattern, exclude?: vscode.GlobPattern, maxResults?: number, token?: vscode.CancellationToken): Thenable<vscode.Uri[]> {
return vscode.workspace.findFiles(include, exclude, maxResults, token);
}
}
Loading