-
Notifications
You must be signed in to change notification settings - Fork 144
Description
I've been trying to get syntax highlighting working for typescript in vim for over a week now. If I don't have any plugins installed, then I get some synstack options that are decent like typescriptArrowFuncArg
and typescriptParenExp
. I can begin making some positive changes to the way ts pages look with those and many more, but vim gets confused in highly typed pages. For example:
export const sessionActions = {
updateUserAttributes: (params: SomeLibraryType) => async (
dispatch: Dispatch,
): Promise<void> => {
dispatch<Types.MyType>({
type: ActionType.MY_ACTION_TYPE,
});
try {
// some things
} catch (err) {
// some other things
}
},
};
Once we reach dispatch
, vim thinks we're inside of an object rather than a function, so dispatch
and try
are being recognized as typescriptObjectLabel
when they are in fact inside of a function.
I was hoping that adding typescript-vim would solve the issue, but when I do that almost everything on the page gets a synstack that looks like: [foldBraces, foldBraces, foldBraces]
. I'm assuming that's not what is supposed to happen.
I'm using VIM - Vi IMproved 8.1
on a MacBook Pro that is running Mojave. To be transparent, this is the first issue I've ever submitted to a repo that I'm not working in. I'll be happy to provide more info if I need to, but I hope that I've provided at least enough to get started.