peitalin / vim-jsx-typescript

React JSX syntax highlighting for vim and Typescript
The Unlicense
305 stars 29 forks source link

Highlighting issue: related to genrics in method calls and interfaces #11

Closed NullVoxPopuli closed 5 years ago

NullVoxPopuli commented 5 years ago

image Here is the file: https://github.com/sillsdev/appbuilder-portal/blob/develop/source/SIL.AppBuilder.Portal.Frontend/src/ui/routes/projects/show/overview/products/index.tsx

Maybe this is a regex mishap? idk can't tell if it's an issue with the generic param to useOrbit or with the / in the template string of useLiveData.

NullVoxPopuli commented 5 years ago

Looks like it's generics: image

peitalin commented 5 years ago

Hi, thanks for the heads up. I'm having some difficulty reproducing what you see, although I can't see the rest of the 2nd screenshot. image image

Can you try it on a clean install of vim and see if it's still there?

NullVoxPopuli commented 5 years ago

hmm. interesting, yeah. I must have a conflicting highlighter or something. weird.

image image

but now I can't replicate. there must be some difference between the two computers I've been using. hmm.

Investigation continues...

NullVoxPopuli commented 5 years ago

oh wait, new computer, didn't have this plugin installed. ok. cool. back to replicating.

NullVoxPopuli commented 5 years ago

image

NullVoxPopuli commented 5 years ago

with this one, I disabled two plugins: " Plug 'maxmellon/vim-jsx-pretty' " Plug 'mxw/vim-jsx'

image

the rest of the file looks fine

NullVoxPopuli commented 5 years ago

ah ha! this one is the issue: https://github.com/HerringtonDarkholme/yats.vim removing that fixes everything. cool :+1:

NullVoxPopuli commented 5 years ago

@peitalin what theme are you using in those screenshots?

peitalin commented 5 years ago

@NullVoxPopuli I'm using "onedark" with a few edits:

Plug 'joshdick/onedark.vim'
...
...
""""""""""""" Color Schemes """"""""""""""""
set termguicolors
colorscheme onedark

highlight Normal guibg=#202328
highlight MatchParen guifg=#C678DD guibg=#504066
highlight LineNr    guifg=#151822
highlight CursorLineNr guifg=#56B6C2
highlight Error guifg=#f57373 guibg=#804040
highlight vimError guifg=#f57373 guibg=#804040

hi IndentGuidesEven guibg=#2a2e30 guifg=#24282a
hi IndentGuidesOdd guibg=#262a2c guifg=#24282a
hi Comment cterm=italic guifg=#4a5158
hi String guifg=#98C379 guibg=#2a2e34

" Yellows
hi Number guifg=#E5C07B
hi Special guifg=#E5C07B
hi Boolean guifg=#E5C07B
hi Type guifg=#F0A15F

" purple
hi CtrlPMatch guifg=#ba9ef7
hi Visual guibg=#364652
hi Keyword guifg=#ba9ef7
hi Function guifg=#5682A3

" light blue
hi tsxTagName guifg=#59ACE5
" dark blue
hi tsxCloseString guifg=#2974a1
hi tsxCloseTag guifg=#2974a1
hi tsxAttributeBraces guifg=#2974a1
hi tsxEqual guifg=#2974a1
" green
hi tsxAttrib guifg=#1BD1C1

" cyan
hi Constant guifg=#56B6C2
hi typescriptBraces guifg=#56B6C2
hi typescriptEndColons guifg=#56B6C2
hi typescriptRef guifg=#56B6C2
hi typescriptPropietaryMethods guifg=#56B6C2
hi typescriptEventListenerMethods guifg=#56B6C2
hi typescriptFunction guifg=#56B6C2
hi typescriptVars guifg=#56B6C2
hi typescriptParen guifg=#56B6C2
hi typescriptDotNotation guifg=#56B6C2
hi typescriptBracket guifg=#56B6C2
hi typescriptBlock guifg=#56B6C2
hi typescriptJFunctions guifg=#56B6C2
hi typescriptSFunctions guifg=#56B6C2
hi typescriptInterpolationDelimiter guifg=#56B6C2
hi typescriptExceptions guifg=#DDA671
hi typescriptIdentifier guifg=#65809D
hi typescriptStorageClass guifg=#65809D

" JSX Dark Blue and Neon Green highlights
hi xmlEndTag guifg=#2974a1
hi tsxCloseString guifg=#15608f
hi htmlTag guifg=#2974a1
hi htmlEndTag guifg=#2974a1
hi htmlTagName guifg=#59ACE5
hi tsxAttrib guifg=#1BD1C1

hi tsxTypeBraces guifg=#BDA7CC
hi tsxTypes guifg=#8D779C
hi tsxIfOperator guifg=#56B6C2
hi tsxElseOperator guifg=#56B6C2

" React keywords
hi ReactState guifg=#C176A7
hi ReactProps guifg=#D19A66
hi ApolloGraphQL guifg=#CB886B
hi Events ctermfg=204 guifg=#56B6C2
hi ReduxKeywords ctermfg=204 guifg=#C678DD
hi WebBrowser ctermfg=204 guifg=#56B6C2
hi ReactLifeCycleMethods ctermfg=204 guifg=#D19A66