subdirectory filetype snippets aren't read
elig0n opened this issue · 4 comments
A snippets directory which is listed in my rtp
holds the file .../snippets/javascript/javascript.snippets
(from honza/vim-snippets) but it isn't loaded for a matching filetype (:SnipMateOpenSnippetsFiles
does not list the file).
Other top level files are loaded succesfully, i.e.: .../snippets/other.snippets
.
Temporarily I linked to my desired nested .snippets file in its parent directory and so the file is loaded successfully.
All files and directories have the required permissions and ownership to read them.
Linux, VIM 8.2, latest git vim-snipmate (via plugged)
Something's not right here, because other.js
won't be checked for snippets, regardless of where it's located. What are the actual filenames of your snippet files? They should follow one of the following templates (taken directly from the documentation):
.../snippets/<scope>.snippets
.../snippets/<scope>_<name>.snippets
.../snippets/<scope>/<name>.snippets
.../snippets/<scope>/<trigger>.snippet
.../snippets/<scope>/<trigger>/<description>.snippet
where <scope>
is the filetype or syntax you want to use (probably javascript
for you), <name>
is an arbitrary name that SnipMate doesn't actually use, <trigger>
is your trigger if you want to use a single snippet per file, and <description>
is a description for the trigger that can be used to differentiate it for multisnip (:h SnipMate-multisnip
) purposes.
I will say I love this line
Linux, VIM 8.2, latest git vim-snipmate (via plugged)
@ajzafar hey, I actually meant other.snippets
and javascript.snippets
(I've updated the original post). The snippets are from package vim-snippets. vim-snippets/snippets/javascript/javascript.snippets
and vim-snippets/snippets/coffee/coffee.snippets
aren't loaded automatically (nor manually) for their matching filetype.
@elig0n I am way busier right now than I anticipated, but I can confirm that the files are loaded as documented on my end. When I get some time I'll experiment a little to try and figure out what's different on your end, but until then if you are able to play with it, please do so and keep this issue updated. A good place to start would be to try and create a minimal vimrc that recreates the issue.