draivin / hsnips

HyperSnips: a powerful snippet engine for VS Code, inspired by vim's UltiSnips
MIT License
148 stars 23 forks source link

Using global storage to store hsnippets #142

Closed mfederczuk closed 1 year ago

mfederczuk commented 1 year ago

This PR changes the directory where the hsnippet files are stored from the hardcoded directory to use the globalStorage directory instead.

To help updating users migrate, if the old directory exists, it will be moved into the new globalStorage directory.

This change should fix issue #131.

How the "hsnips.hsnipsPath" configuration is interpreted also changed. If the path starts with "~" or "${workspaceFolder}" then it is replaced with the user's home directory or the workspace folder, respectively.
Relative paths will still be joined with the workspace folder, to keep backwards compatibility.