-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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 easier way to change default/fallback language behaviour #11705
Comments
Helix is really great, but I'm failing here too and can only get ahead with workarounds. Overwriting the default configuration for "text" also seems to be the best solution to me. Another possibility could be to use "" for file-types, to apply to all files that don't have a suffix.
As a workaround for dot-files the following is possible:
EDIT: Missing quote added |
Cool! Thanks, I'll be using that. (sidenote you're missing a doublequote in |
At best I'm paraphrasing here and at worst I'm completely wrong, but from my understanding the plan is to let this use-case be handled by the plugin system instead of putting more work into supporting changing the defaults. |
Oh boy I can't wait to install the always-use-4-space-indentation plugin, I love installing random software instead of having a single knob to turn! |
Oh okay, I misunderstood, my bad. The discussions you linked seem quite promising! |
Make sense 'cause one would expect that we don't do clever filetype checking, thus fallback to 'text' as type. |
[[language]]
name = "bash"
file-types = [{glob=".*"},"sh"] Unfortunately when using this files like |
The ability to more easily configure fallback falls under 5he config system refactor #8853 (just liek the issue you linked for a workaround). |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Motivation
I often edit files which dont have a file type nor shebang (like ~/.gdbinit) and for me they most often use
#
for comments. Programming languages which use//
in general have a file extension so are detected. Maybe#
should be the default?My solution
I want to make it so that
#
is used for comments by default when a specific language isn't detected.The problem
This isn't intuitive at all, and reading the docs doesn't help much. It seems the current solution is doing this: #9165 (comment) which seems way to hacky and verbose to overwrite a simple configuration option.
I would expect:
or something similar to Just Work.
The text was updated successfully, but these errors were encountered: