Closed GiancarloAparicio closed 3 years ago
This may not work for all scenarios, because sometimes we may not have filetype defined for the file we are working on. E.g. for sample.test.js
filetype will be Javascript but people might want to initialize it with different template since it is a test file.
I would suggest you to look at the fileparts. Right now it only considers sample.test.js
(file name with extension) and js
(file extension). We can modify it to also consider test.js
. So basically all substring starting with a dot and the substring will have decreasing priority from left to right.
This may not work for all scenarios, because sometimes we may not have filetype defined for the file we are working on. E.g. for
sample.test.js
filetype will be Javascript but people might want to initialize it with different template since it is a test file. I would suggest you to look at the fileparts. Right now it only considerssample.test.js
(file name with extension) andjs
(file extension). We can modify it to also considertest.js
. So basically all substring starting with a dot and the substring will have decreasing priority from left to right.
If you are right, I focus on my problem with the filetype that not my account that the general solution is to handle all extensions or substrings separate and execute them in order of priority
By default it behaves normal taking the file extension, but in those cases as file.blade.php or with the modified filetype (file.jsx -> javascriptreact), it would be enough to activate the variable 'vt_use_filetype', so that it takes the file: file.blade.php -> blade.template, file.jsx -> javascriptreact.template