Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Hope this extension helps you as well.

*NOTICE*

Many report that the `List highlighted annotations` command is not working, make sure you have the file types included via `todohighlight.include`.

Many report that the `List Highlighted Annotations` command is not working, make sure you have the file types included via `todohighlight.include`.

### Preview

Expand Down Expand Up @@ -41,7 +40,6 @@ To customize the keywords and other stuff, <kbd>command</kbd> + <kbd>,</kbd> (Wi
| todohighlight.maxFilesForSearch | number | 5120 | Max files for searching, mostly you don't need to configure this. |
| todohighlight.toggleURI | boolean | false | If the file path within the output channel not clickable, set this to true to toggle the path patten between `<path>#<line>` and `<path>:<line>:<column>`. |


an example of customizing configuration:

```js
Expand Down Expand Up @@ -113,17 +111,15 @@ an example of customizing configuration:

This extension contributes the following commands to the Command palette.

- `Toggle highlight` : turn on/off the highlight
- `Toggle Highlight` : turn on/off the highlight
![](https://github.com/wayou/vscode-todo-highlight/raw/master/assets/toggle-highlight.gif)
- `List highlighted annotations` : list annotations and reveal from corresponding file
- `List Highlighted Annotations` : list annotations and reveal from corresponding file
![](https://github.com/wayou/vscode-todo-highlight/raw/master/assets/list-annotations.gif)

### Known Issue

### Known issue

The clickable file pattern within the output channel differs from OS platform(`<path>#<line>` for Mac/Windows and `<path>:<line>:<column>` for Linux, for details see this [issue](https://github.com/Microsoft/vscode/issues/586) ).
The clickable file pattern within the output channel differs from OS platform(`<path>#<line>` for Mac/Windows and `<path>:<line>:<column>` for Linux, for details see this [issue](https://github.com/Microsoft/vscode/issues/586) ).

Basically the extension auto detects the OS platform.
Basically the extension auto detects the OS platform.

If you find that the file path is not clickable, set `todohighlight.toggleURI` to `true` to toggle the file pattern.

If you find that the file path is not clickable, set `todohighlight.toggleURI` to `true` to toggle the file pattern.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
"contributes": {
"commands": [
{
"title": "Toggle highlight",
"title": "Toggle Highlight",
"category": "TODO-Highlight",
"command": "todohighlight.toggleHighlight"
},
{
"title": "List highlighted annotations",
"title": "List Highlighted Annotations",
"category": "TODO-Highlight",
"command": "todohighlight.listAnnotations"
}
Expand Down
22 changes: 17 additions & 5 deletions src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,29 @@ var zapIcon = '$(zap)';
var defaultMsg = '0';

var DEFAULT_KEYWORDS = {
"TODO:": {
text: "TODO:",
'TODO:': {
text: 'TODO:',
color: '#fff',
backgroundColor: '#ffbd2a',
overviewRulerColor: 'rgba(255,189,42,0.8)'
},
"FIXME:": {
text: "FIXME:",
'FIXME:': {
text: 'FIXME:',
color: '#fff',
backgroundColor: '#f06292',
overviewRulerColor: 'rgba(240,98,146,0.8)'
},
'INFO:': {
text: 'INFO:',
color: '#fff',
backgroundColor: '#4dabf7',
overviewRulerColor: 'rgba(77,171,247,0.8)'
},
'NOTE:': {
text: 'NOTE:',
color: '#fff',
backgroundColor: '#69db7c',
overviewRulerColor: 'rgba(105,219,124,0.8)'
}
};

Expand All @@ -38,7 +50,7 @@ function getAssembledData(keywords, customDefaultStyle, isCaseSensitive) {
text = text.toUpperCase();
}

if (text == 'TODO:' || text == 'FIXME:') {
if (text == 'TODO:' || text == 'FIXME:' || text == 'INFO:' || text == 'NOTE:') {
v = Object.assign({}, DEFAULT_KEYWORDS[text], v);
}
result[text] = Object.assign({}, DEFAULT_STYLE, customDefaultStyle, v);
Expand Down