OmniSharp / omnisharp-vim

Vim omnicompletion (intellisense) and more for C#
http://www.omnisharp.net
MIT License
1.72k stars 168 forks source link

In some contexts, Code action "Wrap every parameter -> Indent all parameters" eats characters #816

Closed Melandel closed 2 years ago

Melandel commented 2 years ago

I'm also glad I was able to find a way to reproduce this because it doesn't happen all the time.

Here's how to reproduce systematically (on my Windows 10 using the latest omnisharp-vim version and gvim 8):

Expected Behavior

            public abstract Task<RunTestResponse> RunTestAsync(string methodName, string runSettings, string testFrameworkName, string targetFrameworkVersion, CancellationToken cancellationToken);

becomes

            public abstract Task<RunTestResponse> RunTestAsync(
                string methodName,
                string runSettings,
                string testFrameworkName,
                string targetFrameworkVersion,
                CancellationToken cancellationToken);

Actual Behavior

            public abstract Task<RunTestResponse> RunTestAsync(string methodName, string runSettings, string testFrameworkName, string targetFrameworkVersion, CancellationToken cancellationToken);

becomes

public abstract Task<RunTestResponse> RunTestAsync(string m
            ethodName, string 
           runSettings, string 
           testFrameworkName, string 
           targetFrameworkVersion,
           ationToken cancellationToken);

(note the change in indentation, my gut feeling also says it has something to do with the issue. Maybe the editor-config has something to do with this?)

Melandel commented 2 years ago

Closing because after investigating further, I found that it was my configuration at fault, namely

autocmd FileType cs setlocal indentexpr=CSharpIndent()