First, please do not mix the old Pygments configuration options with the newer (as of Hugo v0.28) Chroma configuration options. If you want to generate classes instead of inline styles, do this:
markup:
highlight:
noClasses: false
Second, you are correct that the tabWidth
configuration option is ignored when generating classes instead of inline styles. For example, when you do this…
markup:
highlight:
noClasses: false
tabWidth: 4
…tabs will be displayed as 8 spaces. To work around this, add this to your CSS:
pre.chroma {
-moz-tab-size:4;-o-tab-size:4;tab-size:4;
}