https://bugs.kde.org/show_bug.cgi?id=495805

Bojidar Marinov [:bojidar-bg] <bojidar.marinov...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bojidar.marinov...@gmail.co
                   |                            |m

--- Comment #1 from Bojidar Marinov [:bojidar-bg] 
<bojidar.marinov...@gmail.com> ---
Testing locally to fix a related issue (the typescript language server
highlighting all TSX tags as errors), and inspecting the messages sent to the
language server, it seems like Kate sends "languageId": "typescript" instead of
"languageId": "typescriptreact".

Reverting https://invent.kde.org/utilities/kate/-/merge_requests/1349 and
sending no languageId, would work, since
https://github.com/typescript-language-server/typescript-language-server/pull/799
made the result of that be a warning and not an error in
typescript-language-server 4.1.1 and above.

However, it would seems like adding the following local LSP configuration can
get things working even better, without even triggering the warning:
```
{
    "servers": {
        "javascript": {
            "highlightingModeRegex": "^JavaScript$"
        },
        "javascriptreact": {
            "use": "javascript",
            "highlightingModeRegex": "^JavaScript React.+$"
        },
        "typescript": {
            "use": "javascript",
            "highlightingModeRegex": "^TypeScript$"
        },
        "typescriptreact": {
            "use": "javascript",
            "highlightingModeRegex": "^TypeScript React.+$"
        }
    }
}
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to