highlight-words icon indicating copy to clipboard operation
highlight-words copied to clipboard

Running the contributed command: 'highlightwords.addHighlight' failed.

Open isaleo opened this issue 4 years ago • 5 comments

what's the problem?

isaleo avatar Jan 04 '21 10:01 isaleo

I don't understand the question, is the title an error message you recieved? What are the steps to reproduce?

rsbondi avatar Jan 05 '21 15:01 rsbondi

I also met this problem when I want to highlight word in a large file.

JRolly avatar Jan 06 '21 09:01 JRolly

Command 'Highlight Toggle Sidebar' resulted in an error (Running the contributed command: 'highlightwords.toggleSidebar' failed.)

Command 'Highlight Toggle Current' resulted in an error (Running the contributed command: 'highlightwords.addHighlight' failed.)


Also met this problem while running ''Highlight Toggle Current'. 'Set Highlight Mode' command running fine.

vscode version info: Version: 1.52.1 Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523 Date: 2020-12-16T16:30:02.420Z Electron: 9.3.5 Chrome: 83.0.4103.122 Node.js: 12.14.1 V8: 8.3.110.13-electron.0 OS: Darwin x64 19.6.0

QQ图片20210119164752

cygarm avatar Jan 19 '21 08:01 cygarm

I can not recreate these issues, if someone could please provide the steps to recreate, thanks.

rsbondi avatar Jan 19 '21 23:01 rsbondi

I follow the Microsoft VSCode Extension dev guide, and setup a dev environment with your source code. I got these Errors while debugging:

node_modules/@types/node/index.d.ts(66,11): error TS2300: Duplicate identifier 'IteratorResult'. src/tree.ts(51,6): error TS2611: 'tooltip' is defined as a property in class 'TreeItem', but is overridden here in 'HighlightNode' as an accessor. ../../../../usr/local/lib/node_modules/typescript/lib/lib.es2015.iterable.d.ts(41,6): error TS2300: Duplicate identifier 'IteratorResult'.


After doing these changes, i can run the extension well:

  1. Comment the 'tooltip()' function, for skip 'tooltip' funciton error
  2. Add '"skipLibCheck": true' into "compilerOptions" of 'tsconfig.json' file, for fix Duplicate identifier 'IteratorResult' error

I'm not familiar with typescript, hope these info can be helpful, thanks.

cygarm avatar Jan 21 '21 10:01 cygarm