For some reason, the vim module has stopped highlighting code associated
to custom filetypes (it still works for built-in filetypes).

For instance, typeset this:

    \usemodule[vim]

    \startvimrc[name=foo]
      set nocompatible
      set runtimepath+=~/foo/
    \stopvimrc

    \definevimtyping[foo][
      style={\switchtobodyfont[16pt,tt]},
      directory=code/,
      syntax=foo,
      alternative=pscolor,
      vimrc=foo,
    ]

    \starttext
    \startfoo
      let while endwhile
    \stopfoo
    \stoptext


The ~/foo/ directory contains ftdetect/foo.vim:

    au BufRead,BufNewFile *.foo setfiletype foo

and syntax/foo.vim:

    if exists("b:current_syntax")
      finish
    endif

    syn case match
    syn iskeyword @,48-57,192-255,_

    syn keyword fooKeyword let while endwhile

    hi def link fooKeyword Keyword

    let b:current_syntax = "foo"

If I change `syntax=foo` to, say, `syntax=vim` in \definevimtyping
then the code is highlighted.  So, I suspect that I am not configuring
the runtimepath correctly. Any idea how to fix this?

I am using the latest LMTX to which I have added modules as explained
here:

    https://wiki.contextgarden.net/Modules#ConTeXt_LMTX

t-vim VERSION reads 2021.03.01.

Nicola

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to