typescript-language-server / typescript-language-server

TypeScript & JavaScript Language Server

Home Page:https://www.npmjs.com/package/typescript-language-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for `jsx` and `tsx` for setting preferences via `workspace/didChangeConfiguration`

rosingrind opened this issue · comments

I'm trying to set up formatting options for typescript-language-server via kak-lsp, and I'm stuck with a problem:

  • setting up my lsp client requires languageId to be tsx for .tsx files
  • this leads to diffs when matching typescript in the config key (such as typescript.format.semicolons = "insert")

If options mentioned in the following part of docs could support typescript along with tsx (same for javascript), it will be easier for lsp clients to support these without hacky workarounds:

## workspace/didChangeConfiguration
Some of the preferences can be controlled through the `workspace/didChangeConfiguration` notification. Below is a list of supported options that can be passed. Note that the settings are specified separately for the typescript and javascript files so `[language]` can be either `javascript` or `typescript`.

See kakoune-lsp/kakoune-lsp#693 (comment) for more info about the languageId and config key matching problem

I'll post a comment in the linked kak issue because this seems like a client issue.