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 tmux.conf glob as a bash file type #9653

Merged
merged 2 commits into from
Feb 18, 2024

Conversation

vincevargadev
Copy link
Contributor

@vincevargadev vincevargadev commented Feb 17, 2024

Tmux and tmux.conf are used widely among Helix users. Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works". Feel free to close without merge if you disagree, but I thought it's better I bring this up and give this change a chance to be merged.

Before

Screenshot 2024-02-17 at 21 10 13

After

Screenshot 2024-02-17 at 21 11 12

Tmux and tmux.conf is used widely in software developer circles.

Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".
@filipwiech
Copy link

Won't this break the support for the HOCON highlighting, which is defined later in the languages.toml configuration and already uses the *.conf file extension? Or will it somehow work together? 🤔

languages.toml Outdated Show resolved Hide resolved
@the-mikedavis the-mikedavis added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. A-language-support Area: Support for programming/text languages labels Feb 17, 2024
@dead10ck
Copy link
Member

dead10ck commented Feb 18, 2024

conf is unfortunately used by many, many applications. Just off the top of my head, some others are:

  • SystemD for ini
  • nginx for its own language
  • Salt for yaml
  • logrotate for its own language

I don't really think it should be the default for any language, since it is used in so many different contexts. If folks would like it to be the default for their config language of choice, they should just make a local languages.toml that does this.

@pascalkuthe
Copy link
Member

Yeah I was going to say something similar. If we already have a language for .conf it should be removed. Adding a specific glob pattern like tmux.conf as Mike said is fine tough I think

@webdev23
Copy link

webdev23 commented Feb 18, 2024

In the particular case of tmux.conf, what we can do is name it tmux.conf.sh, so we get the bash syntax highlighting.
Then, tmux will understand just fine: tmux source myconfig.conf.sh without the need to be an executable file.

It's the same for many tools that use the .conf format, in reality it does not matters.

Now, what i read in this title is not that. What could be great is the ability to source Helix configs, just as shown here, as a regular Linux environment. That would allow to do cool things, without going in details, but for example to source text utilities and their shortcuts as a minor mode. It's another approach of a plugin system. Of course that is a Unix thing only.

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
@vincevargadev
Copy link
Contributor Author

vincevargadev commented Feb 18, 2024

Thank you for your feedback. I updated the pull request with @the-mikedavis's suggestion, and the PR now uses globs.

Let me know if you think this PR aligns with Helix's vision and priorities, it would certainly make my life easier if it landed, but I'm also not equipped to judge the side effects it may have.

@vincevargadev vincevargadev changed the title Add conf as a bash file type Add tmux.conf glob as a bash file type Feb 18, 2024
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 18, 2024
@pascalkuthe pascalkuthe merged commit 6432669 into helix-editor:master Feb 18, 2024
6 checks passed
uek-1 pushed a commit to uek-1/helix that referenced this pull request Feb 24, 2024
* Add conf as a bash file type

Tmux and tmux.conf is used widely in software developer circles.

Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".

* Use tmux.conf glob instead of simply conf for tmux

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
cosmikwolf pushed a commit to cosmikwolf/helix that referenced this pull request Feb 26, 2024
* Add conf as a bash file type

Tmux and tmux.conf is used widely in software developer circles.

Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".

* Use tmux.conf glob instead of simply conf for tmux

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
shortc pushed a commit to shortc/helix that referenced this pull request Mar 31, 2024
* Add conf as a bash file type

Tmux and tmux.conf is used widely in software developer circles.

Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".

* Use tmux.conf glob instead of simply conf for tmux

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
* Add conf as a bash file type

Tmux and tmux.conf is used widely in software developer circles.

Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".

* Use tmux.conf glob instead of simply conf for tmux

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* Add conf as a bash file type

Tmux and tmux.conf is used widely in software developer circles.

Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".

* Use tmux.conf glob instead of simply conf for tmux

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
* Add conf as a bash file type

Tmux and tmux.conf is used widely in software developer circles.

Having the tmux.conf file not have any syntax highlighting by default is (IMO) not ideal for an editor that otherwise "just works".

* Use tmux.conf glob instead of simply conf for tmux

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants