These guides will show you how you can take advantage of the TSC Language Server in your favorite editor/IDE.
Most of these setups will require you to download a release.
You can download the Cave Story TSC extension for Visual Studio Code. You don't have to have the language server installed - the extension will the installation and the updates of the language server for you.
-
Install Package Control (Ctrl+Shift+P, then type
Install Package Control
and press Enter). -
Install the Sublime LSP package.
-
Add the following code to your User settings (
LSP.sublime-settings
) -Preferences -> Package Settings -> LSP -> Settings
:
{
"clients": {
"tsc": {
"command": ["/path/to/your/tsc-ls", "start"],
"enabled": true,
"languageId": "tsc",
"scopes": ["source.tsc"],
"syntaxes": ["Packages/User/tsc.sublime-syntax"]
}
}
}
Create a new syntax file (Tools -> Developer -> New Syntax
) with the following
contents:
%YAML 1.2
---
file_extensions:
- tsc
scope: source.tsc
contexts:
main:
- match: '#.+\n'
scope: constant.numeric.tsc
- match: '<([A-Z0-9+-]{3})'
scope: keyword.control.tsc
- match: '(?<=(<([A-Z0-9+-]{3}))|[^#0-9])([0-9V])([0-9]){3}'
scope: string.quoted.single.tsc
- match: '\/\/.+\n'
scope: comment.line.tsc
- Install the LSP Support plugin.
File -> Settings -> Language & Frameworks -> Language Server Protocol
, then selectServer Definitions
- Mode:
Executable
- Extension:
tsc
- Path: (insert path to tsc-ls)
- Args:
start
- Mode:
- Click on
Apply
Currently, there is no IDEA extension that can provide syntax highlighting for the TSC language. In the meantime, you can try creating a tmbundle using the syntaxes from the Visual Studio Code extension.
We recommend using coc.nvim. Once installed, you can add the
following to your coc-setting.json
(:CocConfig
in nvim):
{
"languageserver": {
"tsc": {
"command": "/path/to/tsc-ls",
"args": [ "start" ],
"filetypes": [ "tsc" ]
}
}
}