-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax highlighting broken after any <Type>cast statement #134
Comments
Many thanks for the report and example code. |
seeing similar for generic types (line 12): code``` ts /** * @module host */ import {isAppBridgeAction, isFromApp, validatedActionPayload} from '../actions/validator'; export const buildMiddleware = (reducers: Reducer): Middleware => { let store: MiddlewareAPI; const middleware: any = (hostStore: MiddlewareAPI) => {
}; middleware.load = (data: any): Application => {
}; return middleware;
|
I can confirm this issue too. As workaround I do something like the following const something = someotherthing as Foo; instead of const something = <Foo>someotherthing |
I'm seeing this as well. I'm willing to put in the time to take a look but I'd need some general pointers as I'm not too familiar with how vim syntax works... any ideas? |
You could start with the 3 chapters in this book And vim help. Then, I have this key binding to show me the syntax groups for a location in a file " Show syntax groups under cursor
map <silent> zs :for id in synstack(line("."), col("."))<bar>
\ echo synIDattr(id, "name").' '<bar> execute 'echohl' synIDattr(synIDtrans(id), "name") <bar> echon synIDattr(synIDtrans(id), "name") <bar> echohl None <bar>
\ endfor<CR> With that and the examples above you might be able to figure out what it is that confuses the highlighting. |
I think this problem might be caused by syntax conflict. Do you have any other related syntax plugins installed e.g. vim-jsx-pretty. I did have the same issue and I found it is caused by vim-jsx-pretty not typescript-vim |
I can confirm what @Lucklyric said, this only happens with For now I simply disabled |
@leafgarland I believe you can close this issue as it is not related to If you found this through a search engine like me, it may still be an issue if you use |
@pbondoer ok, thanks for investigating |
Any statement that uses the
<Type>variable
casting syntax breaks all the highlighting for the rest of the file.I can reproduce with the 04e0d82 commit with this file:
The text was updated successfully, but these errors were encountered: