Commit Graph
533 Commits
Author SHA1 Message Date
Ben Lichtman 5233bcc064 Avoid compile on save for declaration files 2019-08-02 15:53:54 -07:00
Andrew Casey 2953574eba Use getEncodedSyntacticClassifications 2019-06-21 14:48:22 -07:00
Andrew Casey 6e50853143 Trivially expose getEncodedSyntacticClassifications 2019-06-19 15:48:23 -07:00
Sheetal Nandi 73bf2684ac Rename to use contextSpan 2019-06-13 12:41:21 -07:00
Sheetal Nandi da2aa9781e Revert to using spread instead of mutating value later 2019-06-12 15:25:16 -07:00
Sheetal Nandi fd86f40d05 Include declarationSpan as relevant declaration span when defintion or other places are declaration name
Fixes #30849
2019-05-24 15:44:32 -07:00
Andrew Branch d8936fd290 Rename to be smarter 2019-04-18 16:23:06 -07:00
Andrew Branch 0f7bc02892 Move to language service 2019-04-18 16:05:06 -07:00
Andrew Branch 61425cb304 Move most logic to separate file 2019-04-18 16:05:06 -07:00
Andrew Branch 0a4ef0f630 Distinguish between same-line and different-line braces 2019-04-18 16:05:06 -07:00
Andrew Branch 039487c84e Also skip TemplateHeads 2019-04-18 16:05:06 -07:00
Andrew Branch fd88e52252 Start imports 2019-04-18 16:05:06 -07:00
Andrew Branch e62c2333eb Add support for string literals 2019-04-18 16:05:06 -07:00
Andrew Branch f98c00ab9d Add more tests, special handling for mapped types 2019-04-18 16:05:05 -07:00
Andrew Branch af3d0f0248 Start smart select API 2019-04-18 16:05:05 -07:00
Benjamin Lichtman 78b0956474 VS IntelliCode-related changes (#30731)
* ensure configurePlugin gives a response

* Update tests

* Update baseline

* Enable global plugin loading for external projects

* Fix lint errors
2019-04-03 10:36:04 -07:00
Sheetal Nandi e78f52d246 Add more information when getValidSourceFile cant find the file in question.
Log for #30180
2019-03-15 15:03:45 -07:00
Sheetal Nandi e55fbffed6 Rename the request as updateOpen 2019-03-05 14:34:08 -08:00
Sheetal Nandi 03377f70b7 Apply changes in reverse order even in new API to match behaviour with internal api 2019-02-27 14:07:15 -08:00
Sheetal Nandi 2258bb2fb7 Add request applyChangesToOpenFiles 2019-02-26 10:21:01 -08:00
Nathan Shively-Sanders 17d16d1bbb Disable checkJS survey (#29830)
* Disable checkJS survey

* Completely remove survey infrastructure

* Re-instate the protocol part of SurveyReady
2019-02-11 08:36:35 -08:00
Benjamin Lichtman 62cf44cb9b Allow per-file setting for rename default behavior preferences (#29593)
<!--
Thank you for submitting a pull request!

Here's a checklist you might find useful.
* [ ] There is an associated issue that is labeled
  'Bug' or 'help wanted' or is in the Community milestone
* [ ] Code is up-to-date with the `master` branch
* [ ] You've successfully run `jake runtests` locally
* [ ] You've signed the CLA
* [ ] There are new or updated unit tests validating the change

Refer to CONTRIBUTING.MD for more details.
  https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
-->

Fixes #29585.
#29314 and #29385 made it so their respective settings are only recognized when provided to the host as a whole.
This PR makes it so that the relevant settings for the preferences on the file override those of the preferences on the host.
2019-01-30 19:08:30 -08:00
Benjamin Lichtman 5fc8f1dd80 Add opt-in user preference for prefix and suffix text on renames (#29314)
* Add user preference to control renaming through exports

* Only impact renaming

* Update baselines

* Use flag to control all prefix and suffix text and imports

* [WIP] add tests

* Only skip export import specifier with flag

* [WIP] Update tests

* Update test

* Pick up preference from host and update test

* Shorten flag name

* Add missing utility function

* Update comment

* [WIP] rename flag and respond to cr

* [WIP] Add flag for forRelatedSymbol

* Use larger search symbol set for old-style rename

* Respond to CR

* Fix small error

* Fix type mismatch

* Update comment and remove unnecessary exprot

* Respond to CR
2019-01-16 10:58:07 -08:00
Benjamin Lichtman d029fae35c Add user preference to opt-in to renaming import paths 2019-01-11 14:45:08 -08:00
Sheetal Nandi 12428d45c0 Add method on host to get DocumentPositionMapper so it can be cached. 2018-12-06 15:22:39 -08:00
Andy 12f3d0d54c Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00
Andy 1089424035 Ensure getApplicableRefactors doesn't crash when given a position (#28361) 2018-11-16 09:30:37 -08:00
Ron Buckton 151dc074a8 Merge branch 'master' into sourceMapGenerator 2018-11-09 11:50:51 -08:00
Sheetal Nandi 9eecf3bd68 Some reorg 2018-11-08 12:32:48 -08:00
Sheetal Nandi f0f02754f3 Change type of metadata to unknown 2018-11-06 18:45:08 -08:00
Sheetal Nandi 4a51f12c3e Add metadata to response if it exists for results from language service.
Currently its wired through for completions requests.
Handles #21999
2018-11-06 15:06:54 -08:00
Andy 92a48d8880 Improve error message when scriptInfo is missing in mapTextChangeToCodeEdit (#28258)
* Improve error message when scriptInfo is missing in mapTextChangeToCodeEdit

* Include both fileName and path, and use in more places

* Move logErrorForScriptInfoNotFound to editorServices.ts

* Update API
2018-11-02 16:12:46 -07:00
Sheetal Nandi 878b7a21ce Fix incorrect event 2018-10-31 13:05:00 -07:00
Mine Starks 1fbabd5534 Merge pull request #28106 from minestarks/configure-plugins
configurePlugins command for tsserver
2018-10-29 14:06:40 -07:00
Andy 672b0e3e16 Have flatMap return a ReadonlyArray by default (#28205) 2018-10-29 11:12:51 -07:00
Ron Buckton 4982803a38 Merge branch 'master' into sourceMapGenerator 2018-10-08 18:01:37 -07:00
Sheetal Nandi 37e25c8873 Send even for ProjectLoadStart and ProjectLoadFinish
Fixes #27206
2018-10-05 15:09:33 -07:00
Andy 5f2741b2ba Make RenameInfo a union (#27382) 2018-09-27 08:56:40 -07:00
Andy 0a97663843 Add 'prefixText' and 'suffixText' when renaming shorthand properties (#27356)
* Add 'prefixText' and 'suffixText' when renaming shorthand properties

* Make prefixText and suffixText missing instead of undefined

* Fix test
2018-09-26 16:58:01 -07:00
Andy c435d1c9a4 Log text of relevant file after an exception (#27006)
* Log text of relevant file after an exception

* Require LogLevel.verbose
2018-09-26 11:31:59 -07:00
Andy 471bc646b8 Ensure session passes along fileToRename (#27323) 2018-09-24 14:44:26 -07:00
Andrew Casey eaf6c692e8 Merge pull request #22776 from amcasey/GH22607
Thread typesMapLocation down to the ProjectService
2018-09-19 10:57:49 -07:00
Andy c57ff087d6 Add codefix to generate types for untyped module (#26588) 2018-09-18 11:47:29 -07:00
Andrew Casey 1bcb4910ca Thread typesMapLocation down to the ProjectService
Fixes #22607
2018-09-18 10:38:43 -07:00
Andy fc54a2c0a7 Include triggerSpan in protocol.RenameInfo (#27160) 2018-09-17 15:00:41 -07:00
Andy bfc00935df Fix bug: Get mapped location of definition for findAllReferencesFull (#27113) 2018-09-17 14:14:55 -07:00
Andy 24a5bdd1b1 Add 'fileToRename' property to RenameInfo (#24702)
* Add 'fileToRename' property to RenameInfo

* Update tests

* Support directory rename
2018-09-10 11:25:03 -07:00
Ryan Cavanaugh cfc6d353b2 Merge pull request #26589 from Microsoft/deduplicate_overloads
Remove unused overloads of 'deduplicate' and 'deduplicateSorted'
2018-09-05 17:43:52 -07:00
Ron Buckton b006287cb1 Refactor and clean up sourcemap decoder 2018-09-04 17:50:06 -07:00
Nathan Shively-Sanders 30f611b055 Add survey event (#26455)
* Start adding survey event

* Add surveyReady event

* Remove old notes

* Move event, simplify type, add test

1. Move the survey event to sendProjectTelemetry so that it happens on
open instead of on editing tsconfig.
2. Remove URL from the survey type; VS code should control this
information.
3. Add test based on large files event test. I'm not sure it's in the
right place, though.

* Fix tests and update API baseline

* Split survey sending from telemetry

Based on tests requested during review.

* Add additional assertion
2018-08-28 19:57:39 -07:00