Consensys / vscode-solidity-auditor

Solidity language support and visual security auditor for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=tintinweb.solidity-visual-auditor
GNU General Public License v3.0
580 stars 61 forks source link

Disable "Solidity Language & Themes" only #140

Open 0xpolarzero opened 1 year ago

0xpolarzero commented 1 year ago

I would like to disable the extension "Solidity Language & Themes (only)", that is being installed with Visual Developer. Unfortunately, I can't:

Cannot disable 'Solidity Language & Themes (only)' extension alone. 'Solidity Visual Developer' extension depends on this. Do you want to disable all these extensions?

I find it very annoying, as for instance it started removing highlighting from Natspecs tags (e.g. @notice), although they are well-defined and work perfectly when disabling the whole extension suite.

image

This is the only syntax highlighting that seems to be overriden by the extension. I obviously tried redefining the custom highlighting in user settings, but nothing seems to do the trick.

Any way to still disable the language & themes extension? Or a trick at least?

Thanks!

tintinweb commented 1 year ago

ctrl + shift + p -> inspect editor tokens and scope - hover over @notice and post a screenshot here. for ref, this is mine. It shows a couple of scopes and depending on your theme they will be highlighted differently (I'm using the theme provided with this extension)

image
0xpolarzero commented 1 year ago

@tintinweb Thanks for answering.

Well I actually did that already, with the same scopes, but can't seem to get the same result anymore. See screenshot.

image

But regardless, I already re-defined these in my user settings file, just in case. And I eventually found out that the syntax highlighting works in some cases, for some files, and that I can tweak it.

For instance, in this library (lib/solady/src/tokens/ERC20.sol).

image

Or there (lib/forge-std/src/interfaces/IERC20.sol).

image

But none work in my root src file.

tintinweb commented 1 year ago

in your screenshot with the texmate profile it does not seem like the solidity language extension is installed, see missing storage.type.dev.natspec. I cannot really reproduce it here. can you check your theme's spec as to what @dev would be highlighted as and are there any other extensions installed that provide texmate labeling for natspec?

def. weird. also that it only highlights sometimes in your screenshot. what does the texmate profiler say if you hover over the highlighted and non highlighted one? must be different labels.

0xpolarzero commented 1 year ago

@tintinweb Indeed, I use the language extension from Nomic Foundation.

And you're right, that's definitely the issue:

image image

Although as soon as I disable "Solidity Visual Developer", then "Solidity Language & Themes (only)", it starts working again without any issue.

image