vim-racket icon indicating copy to clipboard operation
vim-racket copied to clipboard

Add options for disabling lang tag detection

Open glyh opened this issue 3 years ago • 1 comments

This plugin set filetype according to lang tag, which make it diffcult to integrate with other plugins, e.g. conjure.

glyh avatar Apr 28 '22 00:04 glyh

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) #langs 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!

benknoble avatar Apr 28 '22 11:04 benknoble