visual-studio-codevscode-snippets

How to setup HyperSnips Extension properly in VSCode?


I try to use HyperSnips but when I typed the snippet it won't be showed.

Another thing doesn't work when I typed Command + Shift + P and run HyperSnips: Open Snippets Directory, this is what I got

HyperSnips Error:

HyperSnips Error

Have you all ever found the same issue? Please any help from you would be great.


Solution

  • Have you created .hsnips files ?

    To use HyperSnips you shoud create .hsnips files on a directory. (A snippets file is a file with the .hsnips extension)

    Create .hsnips files on below directory:

    On Windows:

    %APPDATA%\Code\User\globalStorage\draivin.hsnips\hsnips\(language).hsnips

    On Mac:

    $HOME/Library/Application Support/Code/User/globalStorage/draivin.hsnips/hsnips/(language).hsnips

    On Linux:

    $HOME/.config/Code/User/globalStorage/draivin.hsnips/hsnips/(language).hsnips

    The .hsnips file should be named based on the language the snippets are meant for (e.g. latex.hsnips for snippets which will be available for LaTeX files). Additionally, you can create an all.hsnips file for snippets that should be available on all languages.

    You can read more about creating snippet files here`

    After completing above steps, you can run HyperSnips: Open Snippets Directory command