Open glyh opened 2 years ago
Hi @glyh, I'm the one that advocated for and implemented this feature. (The most up-to-date version is effectively my fork https://github.com/benknoble/vim-racket.) The intent was to make non-Racket-looking (or feeling) #lang
s into custom filetypes so that syntax, indent, and ftplugin scripts could more accurately target and describe those files. (As an example, my fork contains both #lang info
and #lang jsond
detection and syntaxes.)
You may be interested to know that the entire #lang
+ ftdetect
system is overridable, starting with a handful of (probably under-documented) variables you can tweak and ending with overriding the ftdetect
with your own. I have successfully used this to map custom languages to the desired filetypes even when those languages aren't part of the general racket ecosystem (e.g., they are private). I'm also expanding the default list all the time to try to provide better support for the standard and commonly used languages.
Please let me know if something about configuring this system is unclear!
This plugin set filetype according to lang tag, which make it diffcult to integrate with other plugins, e.g. conjure.