Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add options for disabling lang tag detection #77

Open
glyh opened this issue Apr 28, 2022 · 1 comment
Open

Add options for disabling lang tag detection #77

glyh opened this issue Apr 28, 2022 · 1 comment

Comments

@glyh
Copy link

glyh commented Apr 28, 2022

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

@benknoble
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants