Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add request handlers for document formatting #516

Merged
merged 27 commits into from
Jun 14, 2017

Conversation

kapilmb
Copy link

@kapilmb kapilmb commented Jun 13, 2017

No description provided.

@@ -200,7 +204,8 @@ protected Task Stop()
SignatureHelpProvider = new SignatureHelpOptions
{
TriggerCharacters = new string[] { " " } // TODO: Other characters here?
}
},
DocumentFormattingProvider = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be true? Or are you doing this as a workaround to the FormattingOptions issue?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw the answer to my question in the other PR :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this is part of the workaround - when I started working on this I had set it to true, only to run into the FormattingOptions issue later. So I set to to false, which is redundant as the it would be false by default.

@daviwil
Copy link
Contributor

daviwil commented Jun 13, 2017

Missing a couple of XML comments, otherwise looks good!

Analysis\AnalysisService.cs(256,23): error CS1573: Parameter 'settings' has no matching param tag in the XML comment for 'AnalysisService.Format(string, Hashtable, int[])' (but other parameters do) [C:\projects\powershelleditorservices\src\PowerShellEditorServices\PowerShellEditorServices.csproj]
Analysis\AnalysisService.cs(257,19): error CS1573: Parameter 'rangeList' has no matching param tag in the XML comment for 'AnalysisService.Format(string, Hashtable, int[])' (but other parameters do) [C:\projects\powershelleditorservices\src\PowerShellEditorServices\PowerShellEditorServices.csproj]

@daviwil
Copy link
Contributor

daviwil commented Jun 13, 2017

Could you also remove the old formatting message type handlers you were using if they aren't being used anymore?

@kapilmb
Copy link
Author

kapilmb commented Jun 14, 2017

Fixed both the issues!

@daviwil
Copy link
Contributor

daviwil commented Jun 14, 2017

Something weird is going on with the tests... They're failing in ways that should be irrelevant to your changes. I'll clone your code and see if I can reproduce the issue locally but I may not get to it until tomorrow morning. In the meantime you could try running the Host tests on your machine to see if you see an issue and then check the logs in .\PowerShellEditorServices\test\PowerShellEditorServices.Test.Host\bin\Debug\net452\logs\LanguageServerTests

The tests were failing because the LanguageServerSettingsWrapper class was not gettings initialized propertly in LanguageServerTests.SendConfigurationRequest method.
@daviwil
Copy link
Contributor

daviwil commented Jun 14, 2017

Great, thanks for fixing the tests! Didn't think that this would be the problem, good to know there was an explanation.

@daviwil daviwil added this to the June 2017 milestone Jun 14, 2017
@daviwil daviwil merged commit 7fa57e3 into PowerShell:master Jun 14, 2017
@daviwil daviwil modified the milestones: June 2017, 1.4.0 Jun 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants