Commit Graph
410 Commits
Author SHA1 Message Date
Arthur Ozga a714ece3da add status request 2017-12-04 18:11:23 -08:00
AndyandGitHub fd4d8ab96e Support a 'recommended' completion entry (#20020)
* Support a 'recommended' completion entry

* Code review

* Restore duplicate comments
2017-12-01 13:00:01 -08:00
Mine Starks 1fbe684834 compileOnSaveAffectedFileList shouldn't return any files for noEmit projects 2017-11-30 14:55:41 -08:00
Andrew Casey 5ed31cff8c Use stricter types for event bodies 2017-11-21 16:38:58 -08:00
Arthur OzgaandGitHub 65908ef8ba Merge pull request #19864 from Microsoft/dev/aozgaa/eventPortTelemetry
Send events through a single stream
2017-11-17 20:22:57 -08:00
Arthur Ozga d2cc4f15be test overriding Session.event 2017-11-17 19:48:57 -08:00
AndyandGitHub e7adb1ce79 Bundle fileName with CodeActionCommand (#19881)
* Bundle fileName with CodeActionCommand

* Update test

* Fix API tests

* Add new overloads in services

* Fix overload

* Update API baselines
2017-11-17 14:16:38 -08:00
Arthur Ozga 49d92d844b defer callback and remove handler object 2017-11-16 18:15:39 -08:00
Arthur Ozga a7822c550d expose just eventSender 2017-11-15 19:39:02 -08:00
Arthur Ozga d6c3a15ea6 Move event into IoSession 2017-11-15 18:51:25 -08:00
Arthur Ozga 005c86340f move socketSender to IOSession 2017-11-15 13:12:48 -08:00
Arthur Ozga 93ff7ba2c5 lint more 2017-11-14 22:27:01 -08:00
Arthur Ozga 6a910919ac use arrow to capture this 2017-11-14 18:09:32 -08:00
Arthur Ozga e341e52174 Merge branch 'master' into dev/aozgaa/eventPortTelemetry-IOSessionSocket 2017-11-14 16:50:54 -08:00
Arthur Ozga bf8f9be677 expose event to overwrite in SessionOptions
* need to retain eventPort and canUseEvents arguments and functionality for backwards
compatibility.
2017-11-14 16:42:18 -08:00
Arthur Ozga 1746f4b3d3 factor out socket-event-sending 2017-11-14 15:10:44 -08:00
AndyandGitHub b94940525b Allow applyCodeActionCommand to take an array (#19870)
* Allow applyCodeActionCommand to take an array

* Use this.host.newLine
2017-11-09 13:17:47 -08:00
Arthur Ozga 9f991d375a cleanup 2017-11-08 23:05:04 -08:00
Arthur Ozga 23da1cf822 send all events through common stream 2017-11-08 21:59:44 -08:00
AndyandGitHub bd2e97597d Enable 'no-empty' tslint rule (#19769)
* Enable 'no-empty' tslint rule

* Fix bug
2017-11-07 09:22:28 -08:00
Ron BucktonandGitHub 3f248ecfe1 Merge pull request #19452 from Microsoft/compareStrings
Clean up outdated string comparison logic
2017-11-06 18:48:15 -08:00
AndyandGitHub 0a7b7e07ee Apply 'variable-name' tslint rule (#19743) 2017-11-06 09:23:47 -08:00
Ron Buckton 31c3d444f1 Merge branch 'master' into compareStrings 2017-11-03 23:01:51 -07:00
AndyandGitHub bb7fb7dda9 For getCompletionsAtPosition, require a flag to provide completions with code actions (#19687)
* For getCompletionsAtPosition, require a flag to provide completions with code actions

* Change name

* Increase API version

* Update API baselines

* Add comment

* Update API baseline
2017-11-03 15:55:31 -07:00
AndyandGitHub 8b5d8565cf Add CompletionDetailsFull request (#19689)
* Add CompletionDetailsFull request

* Update API baselines

* Make internal
2017-11-03 15:11:36 -07:00
Armando AguirreandGitHub d5c18a6fb7 Merge branch 'master' into AddDefinitionAndBoundSpan 2017-10-30 17:02:23 -07:00
Ron Buckton bfba32b71d Cleanup, merge #19475 2017-10-26 13:49:32 -07:00
AndyandGitHub 9615e54e13 Support multiple completions with the same name but different source module (#19455)
* Support multiple completions with the same name but different source module

* Use optional parameters for source

* Simplify use of `uniques`

* Update test

* Fix `undefined` error
2017-10-26 08:22:17 -07:00
Ron Buckton c0ed26e605 Simplify comparers 2017-10-25 17:46:39 -07:00
Ron Buckton 130c407708 More control over which collator to use in each situation 2017-10-25 16:30:19 -07:00
Sheetal Nandi 2668f50577 Reload contents of file from disk irrespective of project presence and file already containing its own text
Fixes #19336
2017-10-25 13:46:12 -07:00
Armando Aguirre 7fd9fe686b Rollback spread operator changes 2017-10-24 15:58:43 -07:00
Armando AguirreandGitHub ae266f6aa1 Merge branch 'master' into AddDefinitionAndBoundSpan 2017-10-24 11:18:07 -07:00
Armando Aguirre f8ccde5218 Renamed a couple of methods, refactored code for reusability 2017-10-24 11:05:21 -07:00
AndyandGitHub c1b4d59752 Fixup line and offset of rename location of refactor (#19265)
* Fixup line and offset of rename location of refactor

* Fixes

* Handle "\r" only documents

* Update api baselines

* Fix error if an edit comes *after* the rename location

* Add bounds check

* Simpler implementation: get new text, then calculate line starts the usual way
2017-10-19 14:31:23 -07:00
AndyandGitHub 6c1afba389 Remove extra blank line in logs (#19307) 2017-10-18 16:04:18 -07:00
Armando Aguirre 8004fec2ce Addressed PR comments: added simplified/full version, changed design 2017-10-18 14:48:06 -07:00
AndyandGitHub d05443bb1d Add quickfix and refactoring to install @types packages (#19130)
* Add quickfix and refactoring to install @types packages

* Move `validatePackageName` to `jsTyping.ts`

* Remove combinePaths overloads

* Respond to code review

* Update api baselines

* Use native PromiseConstructor

* Return false instead of undefined

* Remove getProjectRootPath

* Update api
2017-10-17 15:04:09 -07:00
AndyandGitHub d0c4d13fe2 In tsserver, indent logged JSON (#19080) 2017-10-17 11:34:59 -07:00
AndyandGitHub 2b566b9a53 Add exported members of all project files in the global completion list (#19069)
* checker.ts: Remove null check on symbols

* tsserverProjectSystem.ts: add two tests

* client.ts, completions.ts, types.ts: Add codeActions member to CompletionEntryDetails

* protocol.ts, session.ts: Add codeActions member to CompletionEntryDetails protocol

* protocol.ts, session.ts, types.ts: add hasAction to CompletionEntry

* session.ts, services.ts, types.ts: Add formattingOptions parameter to getCompletionEntryDetails

* completions.ts: define SymbolOriginInfo type

* completions.ts, services.ts: Add allSourceFiles parameter to getCompletionsAtPosition

* completions.ts, services.ts: Plumb allSourceFiles into new function getSymbolsFromOtherSourceFileExports inside getCompletionData

* completions.ts: add symbolToOriginInfoMap parameter to getCompletionEntriesFromSymbols and to return value of getCompletionData

* utilities.ts: Add getOtherModuleSymbols, getUniqueSymbolIdAsString, getUniqueSymbolId

* completions.ts: Set CompletionEntry.hasAction when symbol is found in symbolToOriginInfoMap (meaning there's an import action)

* completions.ts: Populate list with possible exports (implement getSymbolsFromOtherSourceFileExports)

* completions.ts, services.ts: Plumb host and rulesProvider into getCompletionEntryDetails

* completions.ts: Add TODO comment

* importFixes.ts: Add types ImportDeclarationMap and ImportCodeFixContext

* Move getImportDeclarations into getCodeActionForImport, immediately after the implementation

* importFixes.ts: Move createChangeTracker into getCodeActionForImport, immediately after getImportDeclarations

* importFixes.ts: Add convertToImportCodeFixContext function and reference it from the getCodeActions lambda

* importFixes.ts: Add context: ImportCodeFixContext parameter to getCodeActionForImport, update call sites, destructure it, use compilerOptions in getModuleSpecifierForNewImport

* importFixes.ts: Remove moduleSymbol parameter from getImportDeclarations and use the ambient one

* importFixes.ts: Use cachedImportDeclarations from context in getCodeActionForImport

* importFixes.ts: Move createCodeAction out, immediately above convertToImportCodeFixContext

* Move the declaration for lastImportDeclaration out of the getCodeActions lambda into getCodeActionForImport

* importFixes.ts: Use symbolToken in getCodeActionForImport

* importFixes.ts: Remove useCaseSensitiveFileNames altogether from getCodeActions lambda

* importFixes.ts: Remove local getUniqueSymbolId function and add checker parameter to calls to it

* importFixes.ts: Move getCodeActionForImport out into an export, immediately below convertToImportCodeFixContext

* completions.ts: In getCompletionEntryDetails, if there's symbolOriginInfo, call getCodeActionForImport

* importFixes.ts: Create and use importFixContext within getCodeActions lambda

* importFixes.ts: Use local newLineCharacter instead of context.newLineCharacter in getCodeActionForImport

* importFixes.ts: Use local host instead of context.host in getCodeActionForImport

* importFixes.ts: Remove dummy getCanonicalFileName line

* Filter symbols after gathering exports instead of before

* Lint

* Test, fix bugs, refactor

* Suggestions from code review

* Update api baseline

* Fix bug if previousToken is not an Identifier

* Replace `startsWith` with `stringContainsCharactersInOrder`
2017-10-17 10:20:11 -07:00
Armando Aguirre b86153da88 Changed command designed based on review input 2017-10-16 17:50:35 -07:00
Armando Aguirre 1cb2d24c5d Added DefinitionAndBoundSpan command 2017-10-12 17:18:38 -07:00
Sheetal NandiandGitHub 6e5a4a9476 Merge pull request #18959 from Microsoft/configFileDiag
Do not report config file errors if the file opened isn't from configured project and that project doesn't have the config errors
2017-10-12 08:56:00 -07:00
Sheetal Nandi e30a66d22f Add utitlity for stringContains 2017-10-10 17:16:39 -07:00
Sheetal Nandi 249725d4b7 Do not report config file errors if the file opened isnt from configured project and that project doesnt have the config errors
Fixes #16635
2017-10-04 16:11:20 -07:00
Sheetal Nandi 4bb4711eff Merge branch 'master' into watchImprovements 2017-10-02 16:34:43 -07:00
AndyandGitHub eefe5c9706 Fix acquiring format options for getEditsForRefactor (#18848)
* Fix acquiring format options for getEditsForRefactor

* Add test

* Fix test description

* Use `executeCommandSeq`
2017-10-02 13:26:35 -07:00
Sheetal Nandi 23acff5bc8 Merge branch 'master' into watchImprovements 2017-09-25 16:18:26 -07:00
Andy Hanson 0b76e43977 Make formatOptions optional in GetEditsForRefactorRequestArgs 2017-09-15 07:21:38 -07:00
AndyandGitHub 0de1b2301e Cleanup getDiagnosticsForProject (#18151) 2017-09-14 12:38:48 -07:00