SUMMARY cjs, cts, mjs, mts file extensions are ignored by LSP (no ctrl + click & no typecheck). They were not ignored until bug #476942 appeared. After bugfix for #476942 js, jsx, ts & tsx files are working again but not cjs, cts, mjs, mts. I'm using default LSP config. STEPS TO REPRODUCE 1. Have project with valid cjs, cts, mjs or mts file 2. Open it with Kate OBSERVED RESULT There is only syntax highlighting. No ctrl + click and no typecheck (for cts, mts). EXPECTED RESULT cjs, mjs should be loaded like js and cts, mts loaded like ts. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Manjaro with latest updates (available in About System) KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.113.0 Qt Version: 5.15.12
typescript-language-server is 4.3. On another laptop I have locked typescript-language-server at 4.0 and problem does not occur. Since TSLS 4.1 issues started to happen.
{ "servers": { "typescript": { "use": "javascript", "highlightingModeRegex": "^TypeScript.*$", "documentLanguageId": true } } } Fix is to use this LSP server override to enable support for more TypeScript file extensions but then almost everything is underlined in React TypeScript (.tsx) files.
Hmm, in current master the extensions cjs, mjs should be loaded like js and cts, mts loaded like ts. should be fixed.