Commit Graph

439 Commits

Author SHA1 Message Date
Andy
5c94bef0e1 Add 'renameFile' command to services (#23573)
* Add 'renameFile' command to services

* renameFile -> getEditsForFileRename

* Support `<reference path>` directives
2018-04-20 13:43:09 -07:00
Andy
22f2b118b7 Add 'triggerCharacter' option for completions requests (#23491)
* Add 'triggerCharacter' option for completions requests

* mhegazy code review

* More code review

* Handle '<' in comment
2018-04-20 10:25:58 -07:00
Andrew Casey
26c836b12a Propagage reportsUnnecessary in convertToDiagnosticsWithLinePosition 2018-04-17 19:44:52 -07:00
Ryan Cavanaugh
ff60520460 Merge branch 'master' into referencesDogfood_1 2018-04-12 12:26:10 -07:00
Andy
ff7ef4a25a Add fixName property to CodeFixAction (#23350) 2018-04-12 09:05:30 -07:00
Ryan Cavanaugh
df95de3231 Merge branch 'master' into referencesDogfood_1 2018-04-11 16:17:38 -07:00
Ryan Cavanaugh
3ca1d2d7e3 Remove all reference comments from server/ 2018-04-11 15:38:26 -07:00
Andy
4b706fc479 Add 'disableSuggestions' to UserPreferences (#23283)
* Add 'disableSuggestions' to UserPreferences

* Make mergeMapLikes return a new object

* Avoid additional clone

* mergeMapLikes -> object spread
2018-04-10 11:53:24 -07:00
Andy
556a8010b9 Fix bug: ensure 'reportsUnnecessary' is actually sent by tsserver (#23293) 2018-04-10 10:15:15 -07:00
Andy
542184a05a Rename infoCheck to suggestionCheck (#23286) 2018-04-09 14:09:07 -07:00
Andrew Casey
855171bde5 Introduce a --syntaxOnly server mode
1. Disable the LS in all projects
 2. Don't create Program objects
 3. Ignore config files
2018-04-04 16:44:15 -07:00
Andy
3e32e15895 Add 'fixAllDescription' property to CodeFixAction (#22616)
* Add 'fixAllDescription' property to CodeFixAction

* Code review

* Add to protocol

* Make fixAllDescription be just a string
2018-03-27 18:21:21 -07:00
Andrew Casey
517cf6aa89 Add support for suppressing project events
VS doesn't consume (e.g.) `syntaxDiag` events, so there's no reason to
do the work to compute their payloads.
2018-03-22 16:44:09 -07:00
Andy
cc3921323c Support services settings (#22236)
* Support services settings

* Code review

* More review

* Use different names for Options and GetCompletionsAtPositionOptions (todo: come up with better names)

* More renames

* More renaming

* Support quote style in importFixes

* Add `importModuleSpecifierPreference` option

* Support quote style for `throw new Error('Method not implemented.')` (#18169)

* options -> preferences
2018-03-20 13:07:59 -07:00
Mohamed Hegazy
c335c3803c Fix #22133: Expose getOutliningSpans on the server protocol (#22400)
* Fix #22133: Expose getOutliningSpans on the server protocol

* Remove debugger statement from test
2018-03-09 08:50:47 -08:00
Josh Goldberg
7826b38426 Apply 'no-unnecessary-initializer' lint rule (#22014)
* Apply 'no-unnecessary-initializer' lint rule

Forbids `let`/`const` statements to be initialized to `undefined`, since that's the initial value by default anyway.
The auto-fixer also happened to remove two unnecessary `as number` casts in `src/harness/parallel/worker.ts`.

For historical data: to run with `--fix`, I modified the line in `Jakefile.js` that declared the `cmd` for running TSLint.

* Moved worker.ts type assertions to parameters
2018-03-06 07:30:40 -08:00
Andy
a564912d9a Apply 'no-unnecessary-qualifier' lint rule (#22009) 2018-03-01 14:20:18 -08:00
Andy
fa4619c5c1 Add 'info' diagnostics (#22204)
* Add 'info' diagnostics

* Code review
2018-02-28 11:16:32 -08:00
Andrew Casey
5656f35b6a Introduce an organizeImports command
In phase 1, it coalesces imports from the same module and sorts the
results, but does not remove unused imports.

Some trivia is lost during coalescing, but none should be duplicated.
2018-02-16 10:51:38 -08:00
Sheetal Nandi
d9d98cf11a Handle the delayed updates due to user action correctly when ensuring the project structure is upto date
Fixes #20629
2018-02-12 16:53:47 -08:00
Andy
6d051f82fd Handle CodeFixAction in mapCodeAction (#21247)
* Handle CodeFixAction in mapCodeAction

* Update API baseline
2018-01-18 12:14:47 -08:00
Sheetal Nandi
9ad9dc106c Merge pull request #21171 from Microsoft/renameSymLinks
Rename through all projects with same file through symLink
2018-01-17 15:08:27 -08:00
Sheetal Nandi
428e0529fd Rename through all projects with the same file symLink 2018-01-12 16:24:04 -08:00
Andy
d2fd137d88 Add a getFullText() helper method to IScriptSnapshot (#21155)
* Add a `getFullText()` helper method to `IScriptSnapshot`

* Use a function instead of a method
2018-01-12 10:44:39 -08:00
Andy
89ceb4b9b5 Support completions that require changing from dot to bracket access (#20547)
* Support completions that require changing from dot to bracket access

* Use insertText and replacementSpan

* Rename includeBracketCompletions to includeInsertTextCompletions

* Don't add completions that start with space
2018-01-08 18:57:46 -08:00
Andrew Casey
8b0988543b Stop assuming code fix test changes are in the originating file
Triggering a fix in one file can result in changes in another file.
Instead of passing around the originating file, retrieve an appropriate
`ScriptInfo` for each `FileTextChanges`.

Fixes #19165
2017-12-14 16:50:28 -08:00
Andy
19ea189b42 Support a "getCombinedCodeFix" service (#20338)
* Support a "getCombinedCodeFix" service

* Rename things

* Code review

* Rename things

* Update API baselines

* CodeActionAll -> CombinedCodeActions

* Take a `scope` parameter instead of `fileName` for flexibility

* Renames and bugfixes

* Make API changes internal

* Code review

* Update comment
2017-12-07 12:14:18 -08:00
Arthur Ozga
03e93d832e Merge branch 'master' into dev/aozgaa/tsserverVersion 2017-12-06 14:02:30 -08:00
Andy
3a3bb8e3f0 Immediately respond to applyCodeActionCommand requests (#20448) 2017-12-05 13:19:01 -08:00
Arthur Ozga
a714ece3da add status request 2017-12-04 18:11:23 -08:00
Andy
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 Ozga
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
Andy
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
Andy
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
Andy
bd2e97597d Enable 'no-empty' tslint rule (#19769)
* Enable 'no-empty' tslint rule

* Fix bug
2017-11-07 09:22:28 -08:00
Ron Buckton
3f248ecfe1 Merge pull request #19452 from Microsoft/compareStrings
Clean up outdated string comparison logic
2017-11-06 18:48:15 -08:00