Skip to content

Instantly share code, notes, and snippets.

@MariusRumpf
Last active November 23, 2021 02:35
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MariusRumpf/aeb2cfd5ba595e6a6f1ac089bfb3d592 to your computer and use it in GitHub Desktop.
Save MariusRumpf/aeb2cfd5ba595e6a6f1ac089bfb3d592 to your computer and use it in GitHub Desktop.
Detect irregular whitespace in visual studio code with whitespace+ extension
// Whitespace+ irregular whitespace detection
// https://marketplace.visualstudio.com/items?itemName=davidhouchin.whitespace-plus
// Inspired by eslint https://github.com/eslint/eslint/blob/master/lib/rules/no-irregular-whitespace.js
{
"mode": "all",
"autoStart": true,
"refreshRate": 100,
"elements":
[{
"name": "space",
"enabled": true,
"pattern": "(\u0085|\ufeff|\u00a0|\u1680|\u180e|\u2000|\u2001|\u2002|\u2003|\u2004|\u2005|\u2006|\u2007|\u2008|\u2009|\u200a|\u200b|\u202f|\u205f|\u3000|\u2028|\u2029)",
"style": {
"borderWidth": "1px",
"borderRadius": "2px",
"borderStyle": "solid",
"light": {
"backgroundColor": "rgba(212, 0, 0, 0.3)",
"borderColor": "rgba(212, 0, 0, 0.4)"
},
"dark": {
"backgroundColor": "rgba(212, 0, 0, 0.3)",
"borderColor": "rgba(212, 0, 0, 0.4)"
}
}
}]
}
@renatodeleao
Copy link

Thank you 🙌 and internet!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment