How do I get the Visual Code Studio Yassnippet extension to pick up my snippets?

422 views Asked by At

I've started to experiment with Visual Studio Code.

I've built up a large library of snippets managed by Yassnippet. I want to use them with VSC. A third-party developer, Mads Hartmann has published an extension that offers to connect an existing yassnippet library to VSC.

Following the instructions in the readme, I copied the following to my user settings. (This is the sole contents of my user settings)

{
    "editor.tabCompletion": false,
    "editor.snippetSuggestions": "none",
    "yassnippet.path": "/home/me/.emacs.d/list/yasnippet/snippets" 
}

This appears to be inadequate. Snippets are not being picked up.

Also, if I look under the 'Contributions' tab in the Yassnippet extensions dialogues, I can see that the setting remains set to it's default.

What do I need to do to get this extension working?

1

There are 1 answers

0
Hadrián On

You also need to define a map between the languages and the folders inside Yassnippet.

For example, in order to include the python snippets (located inside the python-mode folder) you should add to your settings:

"yassnippet.mapping":{
    "python": "python-mode"
}