-
Notifications
You must be signed in to change notification settings - Fork 223
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
Conversation
The format method now takes start/end line/column numbers to allow formatting in a given range. We cannot use Range type in AnalysisService form some strange reason, probably because it leads to circular dependency. Therefore we resort to passing in the integer parameters.
@@ -200,7 +204,8 @@ protected Task Stop() | |||
SignatureHelpProvider = new SignatureHelpOptions | |||
{ | |||
TriggerCharacters = new string[] { " " } // TODO: Other characters here? | |||
} | |||
}, | |||
DocumentFormattingProvider = false |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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.
Missing a couple of XML comments, otherwise looks good!
|
Could you also remove the old formatting message type handlers you were using if they aren't being used anymore? |
Fixed both the issues! |
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 |
The tests were failing because the LanguageServerSettingsWrapper class was not gettings initialized propertly in LanguageServerTests.SendConfigurationRequest method.
Great, thanks for fixing the tests! Didn't think that this would be the problem, good to know there was an explanation. |
No description provided.