Open bigteejay opened 8 years ago
Did you try restarting VS after the change?
I have, several times. Even (unrelated) restarted my PC a couple of times now.
The entry made it into the index xml file without my adding it manually (at the very end, but appears)...
// $fileName$.js
(function $functionName$() {
```
"use strict";
//START HERE
```
})();
...yet, it still won't show if it's in my custom folder.
Interestingly, none of the SnippetIndexItem items in the index xml appear to contain the shortcut value (or equivalent) that triggers the snippet. Is that expected?
They should contain shortcut if you set it in the snipper designer
It doesn't, and moving it to the system default location enables it (without editing the snippet file or rebuilding the index.)
None of the system generated/identified snippets that appear in the index file have it either.
I have the same problem. Add my folder, that contains .snippet files, to IndexedSnippetDirectories and it will not load. Also, if I create a new snippet file from visual studio and just save the snippet in the default location that pops up in the save dialog that doesn't show up in the snippet explorer either. I have tried rebuilding the index, opening and closing visual studio.
Tools... Options... General Options... IndexedSnippetDirectories, expand the collection with the ellipses button on the right of the field. Then click the Add button, then set the path to my own preferred snippet folder for the value on the right... "C:\Users{USERNAME}\OneDrive for Business\Code\SnippetsDesigner\Snippets" ...(tried enclosed in quotes too.)
Go back to my .js file, type the shortcut, no autocomplete/suggestion pops up (not recognized.) Also tried the rebuild index button.
If I copy the exact same file, no alterations, to the default snippet path (currently "D:{USERNAME}\Documents\Visual Studio 2015\Code Snippets\JavaScript\My Code Snippets" on my system) and go back to VS (without rebuilding the index or restarting or anything) it will instantly recognize/suggest the snippet as I start to type the shortcut.
Ideas?