Alright, this is my fault :)
As I explain here:
This is at least partially my fault; I advocated for this on the basis that not all *rkt
files are actually racket, and the racket syntax shouldn't try to highlight them all.
OTOH, br
is now correctly mapped to racket, and it's trivial to add sicp
/etc. (My fork adds, for example, info
and info/setuptab
, which it supports. My fork also supports the new jsond
language, but it doesn't need extra configuration precisely because of the new mechanism.)
See g:racket_hash_lang_dict
in ftdetect/racket.vim
. It would be nicer to merge the user's config with the defaults, but I didn't do that yet as I haven't needed it.
Fortunately the global variable is extensible.
Depending on which version of the plugin you use:
- for the
wlangstroth
fork, use
:let g:racket_hash_lang_dict = { 'plai-typed': 'racket', <all the default values here> }
- for the
benknoble
(my) fork, use just
:let g:racket_hash_lang_dict = { 'plai-typed': 'racket' }
Since my fork supports merging the current value with defaults. My fork also has a few other tweaks and overridable variables, as well as general improvements. It also gets updated more often.
g:racket_hash_lang_dict
in your vimrc (takes precedence over that one) that includes aplai-typed
key mapping toracket
. (I'd also copy the rest of the dict entries to keep the behavior for those#lang
s too in that case.) I see that @D.BenKnoble pushed the last commit to that file, so wondering if he'd like to expand on handling of#lang
for Racket?hash_lang_dict
approach is correct. I'll have to elaborate more later, but if you use my fork you won't need to keep all the other entries as they get merged in.