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

feat: Add support for nginx configuration files #11823

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

codingjerk
Copy link

No description provided.

@the-mikedavis the-mikedavis added the A-language-support Area: Support for programming/text languages label Oct 3, 2024
@codingjerk codingjerk force-pushed the feat/nginx-lang branch 2 times, most recently from 0b49850 to 1b30dd6 Compare October 6, 2024 16:22
name = "nginx"
scope = "source.nginx"
injection-regex = "nginx"
file-types = ["conf"]
Copy link
Member

Choose a reason for hiding this comment

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

This will conflict with hocon. We might need a glob pattern that would match the common places to put nginx files instead

Comment on lines +3819 to +3822
roots = []
comment-token = "#"
indent = { tab-width = 4, unit = " " }
auto-format = false
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
roots = []
comment-token = "#"
indent = { tab-width = 4, unit = " " }
auto-format = false
comment-token = "#"
indent = { tab-width = 4, unit = " " }

these keys are set to their defaults so they can be removed

Copy link
Member

Choose a reason for hiding this comment

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

The capture names here need to be adjusted to the ones we use: https://docs.helix-editor.com/master/themes.html#syntax-highlighting

For example @number should become @constant.numeric

(number) @number
(metric) @number

(regex) @regex
Copy link
Member

Choose a reason for hiding this comment

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

Let's highlight this as a string and add an injection for it in injections.scm to use the regex language:

((regex) @injection.content
 (#set! injection.language "regex"))

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants