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

use ini lexer for systemd service files #1849

Merged
merged 3 commits into from Jul 18, 2021
Merged

Conversation

Akuli
Copy link
Contributor

@Akuli Akuli commented Jun 29, 2021

A foo.service specific lexer could highlight valid and invalid keys differently, but this is much better than no syntax highlighting.

@birkenfeld
Copy link
Member

Makes sense. Do you also want to add the other systemd related filenames (.socket, .target, .slice, and so on)?

As you can see from CI, you need to run make mapfiles afterwards to regenerate the mapping of patterns to lexers.

@Akuli
Copy link
Contributor Author

Akuli commented Jun 29, 2021

I'm a bit unsure about *.path and *.swap. They seem quite generic. Someone might use foo.path to denote a file that contains a path, or bar.swap for a swap file.

@Anteru
Copy link
Collaborator

Anteru commented Jun 29, 2021

It seems unlikely that someone will try to syntax highlight a .swap swap file though, so I don't have concerns. And there's no programming language using .path as the file ending, is there?

@Akuli
Copy link
Contributor Author

Akuli commented Jun 29, 2021

Good points. I don't think this will be a problem in practice.

@Anteru Anteru self-assigned this Jul 18, 2021
@Anteru Anteru added the changelog-update Items which need to get mentioned in the changelog label Jul 18, 2021
@Anteru Anteru added this to the 2.10 milestone Jul 18, 2021
@Anteru Anteru merged commit 6d9b79e into pygments:master Jul 18, 2021
@Anteru
Copy link
Collaborator

Anteru commented Jul 18, 2021

Merged, thanks!

@Anteru Anteru removed the changelog-update Items which need to get mentioned in the changelog label Aug 8, 2021
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 this pull request may close these issues.

None yet

3 participants