LSP-tsgo
TypeScript, JavaScript support for Sublime LSP plugin based on typescript-go
Details
Installs
- Total 208
- Win 59
- Mac 74
- Linux 75
| Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 1 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 3 | 0 | 2 | 0 |
| Linux | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 0 | 2 | 0 | 0 | 1 | 3 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
Readme
- Source
- raw.githubusercontent.com
LSP-tsgo
TypeScript and JavaScript support for Sublime's LSP plugin provided through typescript (go based).
[!NOTE]
typescript-gois now merged into the maintypescriptrepo. This package will likely follow and get merged into LSP-typescript once Typescript 7 gains the tsserver API.
Installation
- Install
LSPandLSP-tsgofrom Package Control. - Restart Sublime.
Configuration
Open the configuration file using the Command Palette Preferences: LSP-tsgo Settings command or open it from the Sublime menu.
Go to Source Definition
LSP: Goto Definition on a symbol from a dependency lands in its .d.ts. The LSP-tsgo: Goto Source Definition command (lsp_tsgo_goto_source_definition) asks the server for the implementation behind that declaration instead: the .js shipped next to the typings, or the original .ts when a declaration map is available. When the server has nothing to map (the symbol is already in source, or the server is too old to support the request) the command falls back to the ordinary definition, so it can take over a definition key binding:
{
"keys": ["super+i"],
"command": "lsp_tsgo_goto_source_definition",
"args": {"fallback": true},
"context": [
{"key": "lsp.session_with_name", "operand": "LSP-tsgo"}
]
}
Pass "fallback": false to get a status message instead of the fallback.
Code Actions on Save
The server supports the following code actions that can be specified in the global lsp_code_actions_on_save setting and run on saving files:
source.fixAll- despite the name, fixes a couple of specific issues: unreachable code, await in non-async functions, incorrectly implemented interfacesource.organizeImports- organizes and removes unused importssource.removeUnusedImports- removes unused importssource.sortImports- sorts imports