Giter VIP home page Giter VIP logo

art-stea1th / enhanced-syntax-highlighting Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 10.0 325 KB

[Marketplace] Lightweight "editor classifier extension" for Visual Studio based on the async Roslyn APIs to enhanced highlighting custom tags in C# code.

Home Page: https://marketplace.visualstudio.com/items?itemName=StanislavKuzmichArtStea1th.EnhancedSyntaxHighlighting

License: Other

C# 93.03% HTML 6.97%
code-analysis csharp roslyn visual-studio-extension vsix

enhanced-syntax-highlighting's People

Contributors

art-stea1th avatar flaengel avatar spaier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enhanced-syntax-highlighting's Issues

extension stops working after VS2019 16.5 update

First, I love this extension. With my custom colors I can see immediately whether I'm dealing with a property or field.

Yesterday I was still running VS2019 16.4.6 and ESH was working fine.
After the update ESH is not working at all anymore. The code highlighting has defaulted back to Visual Studio plain style. In the Font and Colors settings of VS my custom colors are still present but just not applied in the editor.

Further info: I'm using Resharper but with most features turned off. It worked before as well so can't imagine this being the issue.

Possible? New color for lambda parameters

First, thank's a lot for this extension. Now, the dark theme vor VS does make sense. Great work!

Is it possible to introduce a new color in lambda expressions?
For example in all LINQ extension methods the "variables" have the same color like normal function parameters ("public void SaySomething (string WHAT)" -> "WHAT" is correctly hightlighted as "User Tags - Parameters").

In
var qry = tblFoo.Where (foo => foo.whatever == 1);
the word "foo" is highlighted as "User Tags - Parameters"

The same goes for
myFunction (someParameter, (something, somethingelse) => something.bla = somethingelse.bla)
the "something" and "something else" are highlighted as "User Tags - Parameters"

Best regards

Using this outside of Visual Studio

I already know, the answer is no. But, can this code be used or modified to be used outside of Visual Studio? Building a C# Lexer for the ScintillaNet control. My efforts are here:

jacobslusser/ScintillaNET#444

I've been altering and adding to the Lexer posted on the Wiki for the control. As you can see, I need help with the code.

Adaptation to user color scheme

Currently default colors are only good for Black VS Theme. It would be nice to have presets for other color schemes (I personally prefer Blue)

Add: syntax highlight for a some "User Tag".

This issue was created to accommodate requests for adding syntax highlighting for specific user tags.

Syntax highlighting can be added for almost any custom cases, if it will not have a logical conflicts with existing ones. Good ideas are always welcome! Although... I could add even the "Unicorn", if this request received a lot of votes :)

However, I can't add everything for several reasons:

  • Adding unnecessary cases of choice will only complicate the interaction for most users who don't need this features.

  • The more cases it is the greater load for the syntax analyser. For small projects, the impact will not be noticeable, but for the largest projects, this can be a little different.

  • Finally, the request to add can be just spam or represent a sabbotage of the extension to clutter it with unnecessary functionality and take away my time :)

Therefore:

When you placing a request, please to describe at least in a few words, the cases in which you would benefit from the highlighting for this tag.

You, as well as others who uses of this extension, can vote for any request (including your own) by selecting the "thumbs up" icon as your reaction, in the upper right corner of the request message those you like. (please do not duplicate the request if it already exists, just vote for it, and please do not cheat the number of votes to your own request).

Order of consideration:

  • First of all, the requests that will gets the largest number of votes will be considered and also a just well-argumented requests (even if they don't have votes). This number of votes should exceed a certain threshold from the total number of users of the extension. This threshold is not yet decided, it's will fixed after a while.

  • Next - all remaining requests.

Hope for understanding. Regards.

c++ support

Does this work for c++?

Especially for consts

Text input lags

If the extension is installed and enabled, then coding on my VS2019 Community turns into a half nightmare.

If I type code text in a code window on my keyboard faster than 1 symbol per second, then the VS hangs right until it reaches that 1 symbol/sec speed, it hangs after rendering each new character input.

Using ctrl-z to undo has the same effect. It seems that any text-change event on the code window produces massive hang for around 1 second, on my Core i5 processor.

If the extension is disabled, then everything works fine and smooth, so there.

Slow performance on very large files

It would be awesome if there was a configuration option for Enhanced-Syntax-Highlighting to not work on very large files.
This way we can still use the extension and not have it struggle with files that have an exaggerated length.
Currently, the extension struggles a lot with very large files, characters typed, come-in one every 3 or 5 seconds.

Love the extension, but we can use a configuration option like the one suggested above.

Performance degradation on editing files of enormous size.

Because the classification is performed separately from the main thread - it shouldn't affect the performance.

To check the it - I have opened a large enough projects, such as ".NET Framework" sources, and the "Roslyn" sources in Visual Studio with this extension, it works out more quickly than the syntax highlighting built into the IDE.

I use this extension on all my devices and have not yet seen a performance degradation either on a workstation or a low-performance Windows-tablet.

However.
At the moment, there are already several reviews about performance degradation.

Therefore.
If you are observing the same issues yourself - it would be useful for me to learn more about some things:

  • In which situations is this observed?

For example: when you open a file, or when you open a project or edit a code, or when switching from one source file to another.

  • How exactly does this happen?

For example: the highlighting does not appear for a long time, but the IDE works smoothly, the highlighting does not appear for a long time, and the environment stops in this time or the highlighting does not appear until some correction is made to the code.

  • Also, some other details might be useful.

For example: Type of projects on which there is an issue (web, desktop, console, all etc.) or something else that you think is necessary.


  • UPD. Performance degradation probably occurs when you edit a files of enormous size. At the moment this is true for abnormally large files (larger than 700 lines).

At the moment, I physically have no time to fix it. As soon as I have a bit more free time - I'll fix this in the next update.

  • You could help to speed up this process by making your own fixes on GitHub. And I'll happy to merge it with the "master"-branch and include to release build.

Slowing VS down after upgrade to 16.6.4

I love this extension. However, after upgrading VS to 16.6.4, it's killing the IDE. I'll type a character, and it appears 1-2 seconds later. I even uninstalled and reinstalled the extension. No change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.