Skip to content
Discussion options

You must be logged in to vote

I had no idea file-types was so flexible. Thanks for the pointer!

For anyone else encountering this thread in the future, you can pass a list of tables to file-types with the key/column glob. Example from the docs (25.01.1):

file-types = ["toml", { glob = "Makefile" }, { glob = ".git/config" }, { glob = ".github/workflows/*.yaml" } ]

In my case, I'm trying to get JSON highlighting enabled for a particular config file that lacks the extension, so I'd add something like:

file-types = ["json", { glob = "~/.config/some-service/config" } ]

Thanks again @bojohnson5!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ChrisRenfrow
Comment options

Answer selected by ChrisRenfrow
@edwardloveall
Comment options

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