Skip to content

Commit

Permalink
feat: hint gutter - custom icon path (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
usernamehw committed Jul 14, 2023
1 parent 50d1772 commit 60aaaab
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ the entire line wherever a diagnostic is generated by the language and also prin
|errorLens.disableLine|Error Lens: Add a comment to disable line for linter rule. Comment format is controlled by `"errorLens.disableLineComments"` setting.|
<!-- COMMANDS_END -->
<!-- SETTINGS_START -->
## Settings (57)
## Settings (58)

> **Error Lens** extension settings start with `errorLens.`
Expand Down Expand Up @@ -90,6 +90,7 @@ the entire line wherever a diagnostic is generated by the language and also prin
|errorGutterIconPath|""|Absolute path to error gutter icon.|
|warningGutterIconPath|""|Absolute path to warning gutter icon.|
|infoGutterIconPath|""|Absolute path to info gutter icon.|
|hintGutterIconPath|""|Absolute path to hint gutter icon.|
|errorGutterIconColor|"\#e45454"|Error color of `circle` & `square` gutter icons.|
|warningGutterIconColor|"\#ff942f"|Warning color of `circle` & `square` gutter icons.|
|infoGutterIconColor|"\#00b7e4"|Info color of `circle` & `square` gutter icons.|
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,11 @@
"description": "Absolute path to info gutter icon.",
"default": ""
},
"errorLens.hintGutterIconPath": {
"type": "string",
"description": "Absolute path to hint gutter icon.",
"default": ""
},
"errorLens.errorGutterIconColor": {
"type": "string",
"default": "#e45454",
Expand Down
6 changes: 6 additions & 0 deletions src/gutter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export function getGutterStyles(extensionContext: ExtensionContext): Gutter {
if ($config.light.infoGutterIconPath || $config.infoGutterIconPath) {
gutter.infoIconPathLight = $config.light.infoGutterIconColor || $config.infoGutterIconPath;
}
if ($config.hintGutterIconPath) {
gutter.hintIconPath = $config.hintGutterIconPath;
}
if ($config.light.hintGutterIconPath || $config.hintGutterIconPath) {
gutter.hintIconPathLight = $config.light.hintGutterIconColor || $config.hintGutterIconPath;
}

return {
errorIconPath: gutter.errorIconPath,
Expand Down
4 changes: 4 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ interface ExtensionConfigType {
* Absolute path to info gutter icon.
*/
infoGutterIconPath: string;
/**
* Absolute path to hint gutter icon.
*/
hintGutterIconPath: string;
/**
* Error color of `circle` & `square` gutter icons.
*/
Expand Down

0 comments on commit 60aaaab

Please sign in to comment.