Skip to content

use ini lexer for systemd service files#1849

Merged
Anteru merged 3 commits intopygments:masterfrom
Akuli:systemd-service
Jul 18, 2021
Merged

use ini lexer for systemd service files#1849
Anteru merged 3 commits intopygments:masterfrom
Akuli:systemd-service

Conversation

@Akuli
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants