Comments (32)
what was added in this beta version then?
The new beta has supported highlight of collection expression, primary constructor of base type and the Quick Info of lambda expression return value.
The recently uploaded beta has added more language types to Comment Tagger and fixed some bugs.
from codist.
@laicasaane
You'd been bugged by the aforementioned VS highlight problem.
Somehow the identifier
takes higher precedence than interface name
.
Please re-enable the syntax highlight feature and clear the foreground color of the identifier
in the Syntax Highlight Customization Window.
from codist.
Shouldn't
=>
be categorized as operator instead ofC#: Method
? Is this the bug in VS highlight too?
I deliberately changed the style of =>
operators in member declarations to indicate the declaration type.
from codist.
There's a new beta version for test.
The configuration window for syntax highlight has simplified the punctuation highlight options.
from codist.
In the latest beta operator overloading does not seem to work
It is a bug in VS.
You can reproduce the problem with Codist disabled.
from codist.
Hi, everybody.
There's a new beta which enhances highlight (three more syntax styles for customization) and editing of Markdown documents.
from codist.
There is a new test version which addresses VS startup slowdown caused by Codist, reported from the Performance Manager.
from codist.
The previous 9788 build could crash VS. Please download the newly uploaded 9798 build.
from codist.
Oops, 9808 should fix the crash.
from codist.
They only seem to find the cases of direct casts, with implict casts not being returned
It is a known issue. It never works.
You can use the following snippet:
struct Foo
{
public static implicit operator Foo(int i) => new Foo();
}
class Usage
{
void Explicit() {
Foo foo1 = (Foo)25; //This is found
}
void Implicit() {
Foo foo2 = 34; //This will not be found
}
}
Right click the Foo
in the implicit operator declaration and execute the Find All References command in VS.
Only the Explicit
method will be in the result list.
from codist.
@fitdev
You are welcome.
It takes quite some considerable calculation to find out implicit conversion occurences.
In short, use implicit conversion sparingly and do not do expensive or complicate works within it.
from codist.
for "smart" arguments
It is possible to detect this type of situations in the Find Parameter Assignment function though.
Please try the new beta.
It adds a type cast icon to the occurrence if the parameter is taken via implicit type conversion.
Please check whether the detection hurts the performance of that function.
from codist.
I've just upgraded to VS 17.9 and observed that Codist interferes with the default colorization. Disabling Codist will bring back the behaviour. My temporary solution is enabling syntax highlight of Codist.
from codist.
With Codist syntax highlight enabled these types lose their color.
- non-nested types are correctly categorized by Codist syntax selector. But their color is wrong, as in the screenshot.
- nested types are incorrectly categorized. Being either interface, struct or class they're all listed as "C#: Nested type member".
- tested with both 7.8 release and 7.9 beta versions.
from codist.
It is strange. I've been working with the 17.9 preview versions for quite a few months and things were fine after Codist 7.8. Does restarting your VS can make things work?
The following screenshot is taken after that I reset my Codist syntax highlight to default.
The following screenshot is taken after that I applied my Codist syntax highlight settings.
Could you post a sample solution and let me test it?
from codist.
@fitdev
There's a new beta version here which supports C# 12. Please help test it.
from codist.
Thank you for the new release! I will try it soon.
BTW, I have been using C# 12 for some time now, and have not noticed any issues with Codist C#-wise. Out of curiosity - what was added in this beta version then?
Also, regarding syntax highlights being messed up - it happened to me on and off for the last 2 or so years - almost every time I would update VS. I am still on an older VS 17.9 preview for the time being, so I don;t know if the issue would affect me were I to upgrade top their latest 17.10 preview released yesterday.
from codist.
Weird, it works now, and I've done nothing.
from codist.
Hi, it's acting up again. You can try this solution. It's just a source generator solution and you don't need Unity.
https://github.com/Zitga-Tech/ZBase.Foundation.Aliasing/tree/main/Packages/ZBase.Foundation.Aliasing/Source~
After opening the solution in VS, I open this file AliasDeclaration+WriteCode.cs
then scroll up and down for a bit then colorization just disappears altogether.
from codist.
@laicasaane
Could you zip that solution files and upload it here?
from codist.
Here is the solution:
ZBase.Foundation.Aliasing.SourceGen.zip
And the recent screen recording:
https://github.com/wmjordan/Codist/assets/1594982/b6fdc4ba-ff3a-4f0a-9d59-f3c9340043c5
from codist.
For completeness, this is my Codist settings:
Codist.json
from codist.
@laicasaane
With your configuration file, I managed to reproduce your issue.
Some part of the advance syntax highlight procedure in Codist was ran despite of the disabled feature control.
And a bug in VS's highlight was triggered after that procedure.
At this moment, you have to enable the Syntax Highlight feature in Codist and try your luck.
from codist.
I'm OK with enabling Codist syntax highlight feature atm. However, this happens: #316 (comment)
from codist.
Shouldn't =>
be categorized as operator instead of C#: Method
? Is this the bug in VS highlight too?
from codist.
So does the new behavior extend the previous options to also apply to operators? Previously it was only for "Braces and Parentheses".
from codist.
In the latest beta operator overloading does not seem to work:
from codist.
three more syntax styles for customization
Which ones are those?
from codist.
I am not sure if has worked correctly in Codist before, and perhaps is no longer working now, but there seems to be an issue with "Find Referrers" command for implicit operators. They only seem to find the cases of direct casts, with implict casts not being returned:
struct Foo {
public static implicit operator Foo(int i) => new Foo();
}
class Usage {
void Test() {
Foo foo1 = (Foo)25; //This is found
Foo foo2 = 34; //This will not be found
}
}
Also there is a slight issue where implicit/explicit operators do not have super quick infos for them, they are only selectable using NaviBar.
from codist.
Oh I see - it is a Roslyn issue. Sorry for the comment then. Hopefully they will address it soon.
from codist.
In short, use implicit conversion sparingly and do not do expensive or complicate works within it.
I find them extremely useful, especially for "smart" arguments, where the caller may use several different types depending on the need - like an int, or a string, or an enum (in this example for a user-defined TextEncoding type which can be initialized from a set of known encodings, a codepage, and encoding name for example) - all of which get auto-converted to the proper type though these implicit operators. So I wish Roslyn would fix it and allow one to see all instances of implicit conversion taking place.
from codist.
It is possible to detect this type of situations in the Find Parameter Assignment function though.
Thank you for the new beta! I am not sure though if it is of much help in finding implicit operator usages, since typically there would be 10s of methods - all accepting the same "Smart"-Struct-Typed argument with possibly 100s of usages across all these methods. But being able to see such implicit conversion in the Parameter Assignment list is very nice nonetheless, thank you!
from codist.
Related Issues (20)
- Broken syntax highlighting with latest Codist and VS 17.9.0 Preview 1.1 HOT 4
- 有计划推出Jetbrains Rider版的Codist嘛? HOT 1
- Codist Beta 7.8 HOT 38
- Quick info does not show uo. HOT 4
- [Feature request] Ability to 'export' colors to the VS color settings HOT 3
- The outer class of a nested class is missing from Quick Info HOT 1
- 在查看Resharper反编译的代码时,有可能会抛出异常IndexOutOfRangeException HOT 5
- Feature Request: Add Ability To Search Properties For Windforms HOT 1
- 主题共享 HOT 1
- Add support for changing Inline Hits HOT 9
- 方向键失效 HOT 2
- 小问题:为什么 IDisposable 接口图标是带警告的⚠️ HOT 7
- Syntax highlight colors are becoming too dark HOT 8
- Super Quick Info中文XML注释有锯齿 HOT 2
- Suggestion: Search for Optional Method Parameter Usage HOT 24
- [Feature] Quick Info 给 xml <code><example> 代码提供语法着色和外框 HOT 3
- XmlDoc Custom Link Text Not Working For cref in see and seealso HOT 3
- Suggestion: Support Comment Tagger in web-related files: razor, cshtml, js, css HOT 20
- Conflicts in tooltip when using Codist and Enhanced Tooltip HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codist.