{
"files.associations": {
"*": "mydefaulttype"
}
}
This changes the file association for absolutely all files. Should be possible to set a file association only for files that have no extension. So it would match somefilename but not somefilename.txt and not even .somefilename.
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
@rightaway does it not work when you set:
{
"files.associations": {
"somefilename": "mydefaulttype"
}
}
Yes, that works fine on the files named exactly somefilename. But can't figure out any way to set a default file type for files with no extension to work.
still open?
Is it not possible to have a special syntax instead of that "*" which actually matches every extensions?
/[^.]+/ maybe allow regular expressions?
Or how about reading the header, shell scripts often don't have an extension but they do have a header e.g. #!/bin/sh or #!/usr/bin/env bash
According to VSCode Programming Languages Documentation the glob pattern should be supported, right?
But I wonder why these don't work:
"files.associations": {
"**/!(*.*)": "markdown",
"**/+([^.])": "markdown"
}
You can test them on Digital Ocean | Glob Tool
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
:slightly_smiling_face: This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.
Happy Coding!
Most helpful comment
Yes, that works fine on the files named exactly
somefilename. But can't figure out any way to set a default file type for files with no extension to work.