You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an issue with the TypeScript language server when using Neovim NVIM version v0.11.0-dev-194+g6c7677e5d. The error occurs specifically when defining a type with template literal types encapsulated in backticks (`), but not when using single quotes for string types.
Environment:
Neovim Version: NVIM v0.11.0-dev-194+g6c7677e5d
Steps to Reproduce:
Open Neovim with the specified version (NVIM v0.11.0-dev-194+g6c7677e5d).
Create or open a TypeScript file.
Define a type using template literal types as follows:
type foo = `${string}` // Error occurs when typing this line
Notice that an error is thrown: vtsls: -32603: Request textDocument/documentHighlight failed with message: TypeScript Server Error (5.4.5)
For comparison, define another type using single quotes:
type bar = 'xxx' // No error occurs with this line
Expected Behavior:
The TypeScript language server should not throw an error when defining types with template literal types.
Actual Behavior:
An error is thrown when using backticks for template literal types, but not with single quotes.
The text was updated successfully, but these errors were encountered:
Cannot reproduce with latest nvim nightly. Needs LSP communication logs (set vim.lsp.set_log_level("DEBUG")) and the plugin or code you use for document highlight feature on client.
Also, this seems like an issue of underlying tsserver. If you can also reproduce the error in VSCode, then we could do nothing to fix it here.
I am encountering an issue with the TypeScript language server when using Neovim NVIM version v0.11.0-dev-194+g6c7677e5d. The error occurs specifically when defining a type with template literal types encapsulated in backticks (`), but not when using single quotes for string types.
Environment:
Neovim Version: NVIM v0.11.0-dev-194+g6c7677e5d
Steps to Reproduce:
Open Neovim with the specified version (NVIM v0.11.0-dev-194+g6c7677e5d).
Create or open a TypeScript file.
Define a type using template literal types as follows:
Notice that an error is thrown: vtsls: -32603: Request textDocument/documentHighlight failed with message: TypeScript Server Error (5.4.5)
For comparison, define another type using single quotes:
Expected Behavior:
The TypeScript language server should not throw an error when defining types with template literal types.
Actual Behavior:
An error is thrown when using backticks for template literal types, but not with single quotes.
The text was updated successfully, but these errors were encountered: