its own version of this because tsc always starts from the current
directory but the server must start from whatever directory contains the
newly opened file.
file F, the server will check whether F is configured by a
tsconfig.json file. If so, the project specified by the tsconfig.json
file becomes the LS context for F.
pass locations as line/offset pairs instead of line/column pairs, where
offset is a 1-based character offset from the beginning of the line.
Offset will be equal to column if the line contains no tabs. If the
line contains tabs, offset will be less than or equal to column,
depending on how many tabs are before the offset. Also added tab size
and indent size to file open message.
as follows. If TSS_LOG is not set, no logging will occur. If TSS_LOG
is set to any value, logging will occur as before this change (log file
will be in directory of tsserver.js with name .logPID where PID is the
process id of the server process; log will contain the pre-change
messages). If TSS_LOG is set to a string that has the form "-file
fileName", the log file will be in the tsserver.js directory with name
'fileName'. If TSS_LOG is set to a string that has the form "-level
levelName", then the level of logging will be set to 'levelName'.
Currently the two levels are 'normal' and 'verbose'. The TSS_LOG string
can contain zero, one or both of its options as in "-file LOG -level
verbose". At the verbose level, the server will log every request,
response and event, and will also give elapsed time for message processing.
timer is started. If timer finishes before another change takes place,
project structure will be updated to reflect any changes in reference
comments or import statements.
changes in last s seconds (where s is currently 1.5), then check project
structure to account for references that may have changed. Turned this
off pending fix for getScriptFileNames returning only the root names.
Added event handler for deleted file, so that session can update error
messages upon deletion of a file from a project.
session.ts to use this field. Remove sort of nav items from getNavigateToItems in
sesion.ts because LS now does the sort. Removed no content throw in
quick info as this happens frequently with Sublime (every cursor move
calls quick info, and quick info is only available on symbols). Added
mechanism for other commands to avoid throwing and instead return a
specific error message, so that we don't make the log unreadable (as it
was with hundreds of quick info stack traces).
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.