Skip to content
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

Cannot get this working in Typescript (using neovim) #5

Open
ukch opened this issue Sep 16, 2020 · 1 comment
Open

Cannot get this working in Typescript (using neovim) #5

ukch opened this issue Sep 16, 2020 · 1 comment

Comments

@ukch
Copy link

ukch commented Sep 16, 2020

I would like to get syntax highlighting for an xml syntax. My file:

# custom.xml.ts
import { xml } from "lit-xml";

export default xml`
<some>
    <xml>
        <content>
           ...
        </content>
    </xml>
</some>
`;

In my ~/.config/nvim/init.vim I have the following block:

...
Plug 'cdata/vim-tagged-template'
let g:taggedtemplate#tagSyntaxMap = {
  \ "html": "html",
  \ "xml": "xml",
  \ "md":   "markdown",
  \ "css":  "css" }
autocmd FileType javascript,typescript : call taggedtemplate#applySyntaxMap()
...

When I first open this file in vim, the xml portion has no syntax highlighting. Manually running the command call taggedtemplate#applySyntaxMap() has no effect.

However, if I do set ft=javascript, then run the applySyntaxMap command, the highlighting appears correctly (NB: the autocmd doesn't seem to work - I still need to run the command manually)

@wgxh
Copy link

wgxh commented Feb 2, 2021

What?Why i can?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants