We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
The basic LanguageService interface puts some requirements on the "host", such as an implementation of a ScriptSnapshot system to support incremental parsing, managing contexts, monitoring files on disk, scheduling diagnostic queries, maintaining line map for line/column for positions for files, etc.. Every editor plugin is required to implement the expected host functionality, possibly in different languages.
This change exposes a new interface to the Services layer (ts server), through a JSON-based communication protocol. Behind the protocol, the server supports all the common host functionality,:
The server is mainly available as an IO process that a client would create in a separate process and communicates with it over stdin/stdout.
The change also adds a JS client implementation as a reference implementation to a client, and also used for tests.
The protocol definitions are all in protocol.d.ts.
Note: Reviewing the final change is probably easier.
Sorry, something went wrong.
Rename the main node package filename to match the package name
acd4914
Merge branch 'master' into TSServer
e4128af
Conflicts: Jakefile
Add support for stat and modified time on sys
9735b74
Add indexer on the Formatting options interface
27a9084
Initial checkin for server code
17f19b2
Wire the build for the server code
7b28f20
Wire tests to use the new server
abec4f9
Add fomratting tests
54f3250
Add type annotations
0963644
wire package.json command for the server
ee3ee05
Simplify host logic in client
07d37fa
Remove redundant type definitions
6e94f39
Supportt abbreviation
4a44b74
Wire navto tests
c987ab9
Use commmandNames module
3e86e55
Support brace matching
c0b1254
Add test for format on key
93aa3f1
Add test for goto def
99373db
Recover from git corruption
a0b557e
Always default to using JSON and do not format it
dfd8a06
use ts.getDefaultLibFileName to get the default library file name
b175045
Get details for member completions as well as completions matching pr…
ce828d0
…efix
Move fileWatching logic to the server to allow for testing on non-nod…
89267bc
…e systems
Add test for completions
d396ddf
Add a new definition test
9867e06
Add test for find references
11e2460
Add test for quickInfo
178e8f7
Add test for rename
40d3cb7
Add navbar test
2a02655
Make method names inline with matching LS function names
50ca35a
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Get this onto the same line as the =
=
This is awkward and a probably somewhat unnecessary.
Removed deleteLen from change request; added endLine, endCol that mark
3868fb5
the end of the deleted Range (inclusive). DeleteLen was not always accurate because editors normalize \r\n to \n in some cases, affecting the length of ranges. In Diagnostic response items, changed len field to end to address the same range length issue. Flattened MessageDiagnosticChains in diagnostic message text, since clients expect string there. Renamed ts.server.protocol to simply protocol in session.ts and client.ts since module name prefix is clear. Based on protocol feedback: Changed LineCol to Location. Changed CodeLocation interface name prefix to FileLocation. Changed DiagEvent to DiagnosticEvent. Removed anonymous types.
Split completions req/response pair into two messages "completions" and
4b59083
"completionEntryDetails". This mirrors the function of the LS API and increases performance of completion in large projects.
Style fixes.
d364f61
Merge pull request #2041 from Microsoft/TSServer
6d7045e
TS Server
I reviewed the TSServer code today as it exists in https://github.com/Microsoft/TypeScript/tree/master/src/server
I think its really nicely done in that it takes the burden of watching files + efficient snapshoting off of editor package authors.
The limitations for us is that it does not (and cannot easily using stdout) expose getProgram. This means that for really advanced features we would either need to wait for them to become a part of languageService or reimplement the stuff from TSServer. Also I use a globbing that isn't there in TSServer.
getProgram
I am okay with using TSServer as a reference implementation and copying all the good stuff over. But just wanted to leave this feedback about my reasons for doing so (and potentially other package authors might end up doing the same thing). Thanks again for the initiative ❤️
ref : Based on @csnover
Successfully merging this pull request may close these issues.