-
Notifications
You must be signed in to change notification settings - Fork 789
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
Brace Highlighting Should Activate at more positions #2092
Milestone
Comments
+500 for this. |
cartermp
added
Area-LangService-API
Impact-Medium
(Internal MS Team use only) Describes an issue with moderate impact on existing code.
labels
Dec 26, 2016
dsyme
added
Feature Request
and removed
Impact-Medium
(Internal MS Team use only) Describes an issue with moderate impact on existing code.
labels
Feb 2, 2017
With my latest PR (#3313), we're returning the correct braces to Roslyn. However, Roslyn explicitly ignores them. See http://source.roslyn.io/#Microsoft.CodeAnalysis.EditorFeatures/Implementation/BraceMatching/BraceHighlightingViewTaggerProvider.cs,3ee09e525b0037c8 /// Given code like ()^() (where ^ is the caret position), returns the two pairs of
/// matching braces on the left and the right of the position. Note: a brace matching
/// pair is only returned if the position is on the left-side of hte start brace, or the
/// right side of end brace. So, for example, if you have (^()), then only the inner
/// braces are returned as the position is not on the right-side of the outer braces.
///
/// This function also works for multi-character braces i.e. ([ ]) In this case,
/// the rule is that the position has to be on the left side of the start brace, or
/// inside the start brace (but not at the end). So, ^([ ]) will return this
/// as a brace match, as will (^[ ]). But ([^ ]) will not.
///
/// The same goes for the braces on the the left of the caret. i.e.: ([ ])^
/// will return the braces on the left, as will ([ ]^). But ([ ^]) will not. You need to raise the issue with Roslyn, as they explicitly do not allow what you're asking (I agree it's counterintuitive). |
saul
added a commit
to saul/fsharp
that referenced
this issue
Sep 2, 2017
nosami
pushed a commit
to xamarin/visualfsharp
that referenced
this issue
Jan 26, 2022
…et#3313) * Add editor formatting service for auto-deindent * Minor refactor of the indentation service - do not indent after 'function' * Only use smart indentation if indent style is set to 'Smart' * Fix broken unit test build * Implement review comments, fix build * Fix some broken brace matching tests Still WIP, other tests still broken * Fix failing indentation tests * Add formatting service tests * Add more brace matching tests Fixes dotnet#2092
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I marked out the columns where brace matching activates and where it does not
o
means it activates on the following col,x
means it doesn't i.e.I think brace matching should activate on either side of the brace and at all positions inside of the brace for multi column braces
It doesn't activate at all for -
(*
*)
begin
end
struct
end
class
end
interface
end
<
>
for generics[ vs2017 rc2 with latest tools built from master ]
The text was updated successfully, but these errors were encountered: