yoavbls / pretty-ts-errors

🔵 Make TypeScript errors prettier and human-readable in VSCode 🎀
https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors
MIT License
13.29k stars 89 forks source link

Make highlighted types selectable and copyable #29

Open yoavbls opened 1 year ago

yoavbls commented 1 year ago

We need a change in VSCode to allow that. I opened a PR and Issue there: https://github.com/microsoft/vscode/issues/180496 any other ideas will be welcomed

costamatheus97 commented 1 year ago

We would need to replace the codicon with some other solution, any ideas?

jonlepage commented 1 year ago

a btn to copytoclipboard ?

navigator.clipboard.writeText(text);
      console.log('Content copied to clipboard');
navigator.permissions.query({ name: "write-on-clipboard" }).then((result) => {
  if (result.state == "granted" || result.state == "prompt") {
    alert("Write access granted!");
  }
});
yoavbls commented 1 year ago

@costamatheus97 VSCode HTML sanitization is very strict. I don't see any other options that they'll make it less strict. I opened an issue and PR for that: https://github.com/microsoft/vscode/issues/180496

@djmisterjon If they'll reject the PR it's a good option. Does it work with the VSCode command link?

jonlepage commented 1 year ago

@costamatheus97 VSCode HTML sanitization is very strict. I don't see any other options that they'll make it less strict. I opened an issue and PR for that: microsoft/vscode#180496

@djmisterjon If they'll reject the PR it's a good option. Does it work with the VSCode command link?

idk sry, it work on my nwjs app, never tested with electron (used by vscode)

yoavbls commented 1 month ago

Until things will be changed you can use the hack here: https://github.com/yoavbls/pretty-ts-errors/blob/main/docs/hide-original-errors.md