Order of suggestions of code-fixes is not really optimized, especially with imports
See original GitHub issueConsider the following code:
a/Class1.cs
namespace A
{
public class Class1
{
// code
}
}
b/Class2.cs
namespace B
{
public class Class2
{
var instance = new Class1();
}
}
Then put your cursor on Class1()
and invoke M-x lsp-execute-code-action
in Emacs, or similar action in other editor.
Observed that
You will be provided several different options:
(Screenshot for demonstrationg-purposes. Does not match example code 1-to-1)
Expected that
Generally, in my experience, some actions are almost always “more” preferred than others.
In this particular case I almost always want to have using
-statements as first suggestion, explicit-namespacing as second and create new class as third and expect to find code-fixes in that order.
Does the LSP protocol provide any sort of … priority for the code actions or is it up to the LSP-client itself to determine how to present them?
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ElvUI will be pushing an update to performance profiling ...
Can someone give me the ELI5 regarding what optimization issues ElvUI has/how this update should address what Naowh has complaints about in ...
Read more >Pitch: Implicit Pointer Conversion for C Interoperability
The mechanism being used is implicit conversions in Swift, but effectively this is a bug fix that makes imported C API conform to...
Read more >How to efficiently (performance) remove many items from ...
Disadventage: this approach changes order of items in list. ... return value are really to prevent JVM optimization // - just to be...
Read more >BakeMyScan - Open Source toolbox for asset optimization
BakeMyScan is a 100% free, opensource, and powerful blender addon to optimize your models for Photogrammetry, 3D scanning, Sculpting, ...
Read more >Upgrading Optimizely CMS 11 to 12 and Commerce 13 to 14
Background. There are many great resources for learning how to build a new solution using CMS 12 and Commerce 14.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
pending on https://github.com/ionide/LanguageServerProtocol/pull/4
This works 100% as I described in the “expected” section in the issue, so I guess I have no choice but consider this 100% resolved 😄