Home

When Intellisense Parameter Info works, but autocomplete does not

I have noticed occasions where autocomplete does not work due to a syntax error and the solution is to fix the error first. I have never been able to replicate it in a simple example, until now.

I was playing around with Plotly.Net (see https://forum.linqpad.net/discussion/2994/psa-plotly-net-supports-dump#latest) and was trying (and failing) to find a way of getting the chart to use the full width of the results tab.

This is a screenshot (just to show that I am not dreaming. As you can see, intellisense is correctly showing the parameter info for the method and shows that Autosizable is one of the parameters, but it is not in the auto-complete list.

To reproduce this, you can start from a working sample share.linqpad.net/tp67tp.linq which is basically

Plotly.NET.CSharp.Chart.Point<int, int, string>(x: Enumerable.Range(0, 11), y: Enumerable.Range(0, 11))
    .WithConfig(Config.init(Responsive: true))

.Dump();

with the correct nuget packages.

Then I wanted to change the parameter to Config.init and to do that I deleted everything on that line to the right of init and when I press the ( key the intellisense parameter info shows all the parameters, but when I continue typing Autos you can see that the autocomplete list is not correct and does not include this parameter (or indeed any of the parameters).

From testing, I get the same behaviour if I delete both closing parentheses at the end of the line.

However, the strange thing is that intellisense sometimes works even if the program does not compile. For example, if I delete only one of the closing parentheses (or if I delete both and I also delete the last line,) the program does not compile but intellisense works perfectly.

I can understand syntax errors confusing intellisense, but in this case it appears the parameter info part of intellisense is working, and knows about the parameters, so I am not sure why the autocomplete part is missing them.

Not sure if anything can be done about this.

Sign In or Register to comment.