Skip to content

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

@ukch

Description

@ukch

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions