VSCode syntax highlighting for Hugo Shortcodes

2 Likes

There actually are a lot of helpful VS Code extensions for Hugo. The one on which I’ve relied most is from Bud Parr at The New Dynamic:

1 Like
1 Like

I can’t get that extension to work. In my html layout files none of the auto complete shortcuts ( x, xx) work.

Not sure what’s wrong.

You have to hit Tab after typing shortcut.

I realize that, nothing happens

Ok, so i turned on quickSuggestions in [html] and the hugo shortcuts work now in the templates. But for markdown, maybe it isn’t implemented yet. The listed shortcuts dont’ do anything and I don’t know how to do the shortcut for a Shortcode snippet because it isn’t described.

Edit: Ok so to use the markdown shortcuts for Shortcode snippets, you have to type the name of the shortcode and then it’ll show the option to tab-complete the shortcode. However, these only work on the built-in (internal) Hugo shortcodes, they don’t work on custom shortcodes.

1 Like