should the filetype be interpreted as a lua pattern to match with the actual filetype ...
However, the default is based on the file type.
For example, if I wanted to create a lua pattern for files that end with .nelua I wouldn't be able to do so because there is no syntax for files with that extension and its buf:FileType() will be unknown. In this scenario, the match would be ('unknown'):match(v.filetype).
The suggestion would be to change the match to pattern lua to use regex using the regexp.MatchString function.
And that this match is already made in the name of the complete file.
I believe that the change in the code would be the import of the regex local regex = import(regex) and it is on line 118:
if v.domatch then
ftmatch = regex.MatchString(v.filetype, buf.AbsPath)
end
The default linter plugin has the domatch option:
However, the default is based on the file type.
For example, if I wanted to create a lua pattern for files that end with
.nelua
I wouldn't be able to do so because there is no syntax for files with that extension and itsbuf:FileType()
will beunknown
. In this scenario, the match would be('unknown'):match(v.filetype)
.The suggestion would be to change the match to pattern lua to use regex using the
regexp.MatchString
function. And that this match is already made in the name of the complete file.I believe that the change in the code would be the import of the regex
local regex = import(regex)
and it is on line 118: