Commit Graph

18 Commits

Author SHA1 Message Date
Tony Garnock-Jones aafb654687 Try harder to be incremental in editContent 2023-05-03 18:20:26 +03:00
Tony Garnock-Jones 1f72baf3ad Log expansion delay 2023-05-03 18:19:48 +03:00
Tony Garnock-Jones a0f87bf687 Monkeypatch ScriptInfo instead of subclassing-and-replacing.
This means we can ditch the whole approach of trying to remove
stale ScriptInfo instances at plugin startup, instead just
endowing existing ones with new behaviour.

This repairs an error where renaming an identifer would perform
spurious edits.
2023-05-02 12:57:22 +03:00
Tony Garnock-Jones 075893fc85 Fix up a few of the more egregious problems with the plugin.
TypeScript has been moving on while the plugin has been staying still, and
that has caused the plugin to stop working well. This patch gets things
back into somewhat workable state, but I'm sure more will be required.

Changes include:

 - `hookHost` is no longer required: instead, we hook ts.createSourceFile.

 - `shouldExpand` abstracts away details of whether a file is considered
   Syndicateish or not.

 - The code that does the Syndicate expansion has been abstracted out of
   the detail of how expansion is invoked by the language server.

 - I've had to monkey-patch ScriptInfo in order to get access to the
   `editContent` method.

 - As a consequence, at plugin startup, we invalidate existing ScriptInfo
   instances so they are rebuilt with our SyndicateScriptInfo constructor.
2023-04-28 10:32:49 +02:00
Tony Garnock-Jones 3384acbd62 Cosmetic 2023-04-28 10:23:57 +02:00
Tony Garnock-Jones 0962c5e41a Implement getDefinitionAndBoundSpan 2023-02-14 12:06:31 +01:00
Tony Garnock-Jones 8a51e87f38 Avoid double-translation of positions (?) 2023-02-14 12:06:19 +01:00
Tony Garnock-Jones 4adcfdd0ab Update copyrights 2023-01-17 11:44:05 +01:00
Tony Garnock-Jones c3dfd42a58 Bump copyright years 2022-01-26 14:38:38 +01:00
Tony Garnock-Jones 3edb680c19 Improve preprocessor error reporting 2021-12-11 16:49:12 +01:00
Tony Garnock-Jones 7b137bea06 At least *propagate* unhandlable-binder-guard errors 2021-12-08 14:29:28 +01:00
Tony Garnock-Jones edbe7bcdac Get ts-plugin working with Emacs and LSP 2021-12-03 15:37:41 +01:00
Tony Garnock-Jones d8b60ccf76 ts-plugin. Works in VS Code, haven't managed to configure Emacs to work with it yet. 2021-12-03 02:06:17 +01:00
Tony Garnock-Jones d2f5c947ac Bulk copyright notice repair 2021-12-01 17:24:29 +01:00
Tony Garnock-Jones ccd87c09f1 Adapt to latest Preserves changes 2021-03-03 10:28:10 +01:00
Tony Garnock-Jones 690ac12cc0 Many fixes to compiler; watchable syndicate-tsc 2021-01-25 22:16:52 +01:00
Tony Garnock-Jones 0b1208d2fd Add cwd if no rootDir or rootDirs configured 2021-01-24 00:17:40 +01:00
Tony Garnock-Jones 2f8e1fb1ca Split up compiler into more packages 2021-01-23 23:38:00 +01:00
Renamed from packages/syndicatec/src/tsserver-plugin.ts (Browse further)