-
Notifications
You must be signed in to change notification settings - Fork 61
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
#lang filetype detection is harmful #62
Comments
This is at least partially my fault; I advocated for this on the basis that not all OTOH, See |
Using let g:var = get(g:, 'var', default) is an idiom for allowing a user to set the variable themselves but have a default intact. In the case of lists/dictionaries, I use an empty default and then extend() with the actual default: this essentially merges the default with the user value. In the list case, there is no way to not get the defaults; here, this should not be harmful. In the dictionary case, I specify the 'keep' argument so that user values override the defaults in case of a collision on keys. Note that it is probably silly to override g:racket_hash_lang_modifiers_regex or g:racket_hash_lang_regexp, but I allow it anyway. Related: wlangstroth#62
I've pushed a commit in my fork which supports user overriding much easier. Simply |
This needs to be configurable as to which dialects, or at least disableable. As it is now, adding vim-racket removes language support in vim, because what used to at least be recognized as ft=scheme is now ft=sicp or ft=br, which is worse than useless, unless you happen to have the specific plugin.
Temporary workaround for users of vim-plug:
Plug 'wlangstroth/vim-racket', { 'do': 'echo au BufRead,BufNewFile *.rkt,*.rktl set filetype=racket > ftdetect/racket.vim' }
The text was updated successfully, but these errors were encountered: