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

Resolving misidentified ".conf" Files #12120

Closed
kfatyuip opened this issue Nov 24, 2024 · 4 comments · Fixed by #12156
Closed

Resolving misidentified ".conf" Files #12120

kfatyuip opened this issue Nov 24, 2024 · 4 comments · Fixed by #12156

Comments

@kfatyuip
Copy link
Contributor

All the ".conf" files are misidentfied as hocon

maybe a stricter distinction method is required like neovim filetype.lua

@David-Else
Copy link
Contributor

David-Else commented Nov 28, 2024

This is a big problem. I have verified it is happening.

I looked at the hocon website and it seems the only valid file type is .conf, which was pretty short sighted of lightbend.

I can see only 2 solutions:

  1. Remove hocon from Helix. Does anyone use it?
  2. Add every possible x.conf (for example kitty.conf) file as a globs for other file types from https://github.com/neovim/neovim/blob/master/runtime/lua/vim/filetype.lua. I started to look at this file and there is a lot of legacy stuff from vim, I am not sure we would want to just copy things blindly from it. This is not a great solution as .conf files are meant to default to text files.

.conf files are absolutley everywhere and it is wrong to have Helix assume they are obscure hocon files. They should be defaulting to text files. @jpaju do you have any input, I see you added hocon in #9203. Cheers!

@jpaju
Copy link
Contributor

jpaju commented Nov 29, 2024

Hocon files are used quite lot in JVM (Scala, Kotlin and Java) projects so removing support for them altogether would be a bummer for someone who mainly works with the JVM. Usually in JVM projects, these .conf files are placed in src/main/resources folder so maybe we could change the existing language configuration to glob for this path and only match .conf files under that folder? How would that sound?

@David-Else
Copy link
Contributor

Usually in JVM projects, these .conf files are placed in src/main/resources folder so maybe we could change the existing language configuration to glob for this path and only match .conf files under that folder? How would that sound?

That sounds perfect! Can you make a PR?

@jpaju
Copy link
Contributor

jpaju commented Nov 29, 2024

Sure! Hopefully I manage find time for that during the weekend

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

Successfully merging a pull request may close this issue.

3 participants