Skip to content

.conf syntax highlighting #10776

Answered by yanniskatsaros
anoduck asked this question in Q&A
May 16, 2024 · 1 comments · 3 replies

You must be logged in to vote

@anoduck a quick search for "tree sitter nginx conf" on Google turned up this repo: https://gitlab.com/joncoole/tree-sitter-nginx

It is hosted on GitLab and I see most examples for [[grammar]] use GitHub links, but you can give it a shot. I'm not sure if this would work / haven't looked into the docs, but you could give something like this a shot:

[[grammar]]
name = "nginx.conf"
source = { git = "https://gitlab.com/joncoole/tree-sitter-nginx", rev = "b4b61db443602b69410ab469c122c01b1e685aa0" }

which should provide syntax highlighting for NGINX conf files.

Again, no idea if this would work since most grammar sections list a file extension, not a specific file name so you'd have to just giv…

Replies: 1 comment 3 replies

You must be logged in to vote
3 replies
@anoduck

@yanniskatsaros

Answer selected by anoduck
@anoduck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants