You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add language configuration file for brace/quote completion (etc.) #3
Do you know if there's documentation on this? It's the first I've seen of one and I can't find much info about it. I can obviously set the values in that one, but it there are more options it'd be good to know the full schema!
changed the title [-]you probably want a language configuration file[/-][+]Add language configuration file for brace/quote completion (etc.)[/+]on Aug 4, 2016
The July update is out. The release notes don't suggest this is new (only changes to it) so I'm confused why this didn't seem to work. In any case, I'll give it another crack soon :-)
Actually, the autoClosingPairs thing sounds new, and that was actually the thing I was using to test the file; so the other stuff maybe would've worked (if I knew exactly what each of the other settings was doing!).
selecting a char matching the one your cursor is on
auto-closing things like braces
if you have some text selected, and type one of the specified chars (', (, {, ...), the editor will surround the text with those chars instead of replacing the text
What does it do with comments (other than disabling autoClosingPairs, but maybe that's all)
What's the difference between things in brackets and surroundingPairs?
I'll put a file in and have a play around and see what I can figure out. I suspect starting with the TS one and tweaking will probably give reasonable behaviour.
Comments I suspect controls things like cmd-/ (line comment and uncomment). But I also don't have any real sense of exactly what things do. Perhaps a bug against VSCode to provide some docs?
comments.lineComment is used as you say for commenting out
blockComment unsure ??
brackets will automatically cause indents if you press enter between a pair (surroundingPairs don't)
autoClosingPairs obviously provides closing character automatically and can be excluded from strings and comments (not sure if there are any other options allowed here?)
surroundingPars highlights the other part of the pair (but without adding the indent functionality that brackets get)
I raised microsoft/vscode#10198 (I suspect MS are sick of me this week ;)) asking about docs.
I couldn't actually find anything to change about the typescript one; it all seemed correct (to me, a Dart noob). Can you see anything missing/wrong?
I couldn't actually find anything to change about the typescript one; it all seemed correct (to me, a Dart noob). Can you see anything missing/wrong?
No, not really :) backticks only really mean something to dart in dartdoc comments, but it can't hurt to have them act like single or double quotes elsewhere - it'd be useful to the user and consistent w/ the other types of quotes.
heh, I got confused that thought they were used for string interpolation but I guess my TS/Dart is blurring somewhat having two Code windows open, writing one in each!
Activity
DanTup commentedon Aug 4, 2016
Do you know if there's documentation on this? It's the first I've seen of one and I can't find much info about it. I can obviously set the values in that one, but it there are more options it'd be good to know the full schema!
devoncarew commentedon Aug 4, 2016
I don't know of any docs unfortunately, but I did find a whole bunch of examples in the languages impls here: https://github.com/Microsoft/vscode/tree/master/extensions.
DanTup commentedon Aug 4, 2016
This stuff doesn't work for me, but in this PR it suggests that this has changed in the July release. The current stable version is the June release.
I'll wait until the next update before doing anything with this (trying to keep on the stable branch for now).
devoncarew commentedon Aug 4, 2016
Ah, cool.
[-]you probably want a language configuration file[/-][+]Add language configuration file for brace/quote completion (etc.)[/+]DanTup commentedon Aug 5, 2016
The July update is out. The release notes don't suggest this is new (only changes to it) so I'm confused why this didn't seem to work. In any case, I'll give it another crack soon :-)
DanTup commentedon Aug 5, 2016
Actually, the
autoClosingPairsthing sounds new, and that was actually the thing I was using to test the file; so the other stuff maybe would've worked (if I knew exactly what each of the other settings was doing!).devoncarew commentedon Aug 5, 2016
I think it's things like:
',(,{, ...), the editor will surround the text with those chars instead of replacing the textDanTup commentedon Aug 5, 2016
The things that I wasn't sure about where:
comments(other than disablingautoClosingPairs, but maybe that's all)bracketsandsurroundingPairs?I'll put a file in and have a play around and see what I can figure out. I suspect starting with the TS one and tweaking will probably give reasonable behaviour.
devoncarew commentedon Aug 5, 2016
Comments I suspect controls things like
cmd-/(line comment and uncomment). But I also don't have any real sense of exactly what things do. Perhaps a bug against VSCode to provide some docs?DanTup commentedon Aug 5, 2016
Think I figured most out:
comments.lineCommentis used as you say for commenting outblockCommentunsure ??bracketswill automatically cause indents if you press enter between a pair (surroundingPairs don't)autoClosingPairsobviously provides closing character automatically and can be excluded from strings and comments (not sure if there are any other options allowed here?)surroundingParshighlights the other part of the pair (but without adding the indent functionality thatbracketsget)I raised microsoft/vscode#10198 (I suspect MS are sick of me this week ;)) asking about docs.
I couldn't actually find anything to change about the typescript one; it all seemed correct (to me, a Dart noob). Can you see anything missing/wrong?
Add language configuration for auto-closing/indenting/etc.
devoncarew commentedon Aug 5, 2016
No, not really :) backticks only really mean something to dart in dartdoc comments, but it can't hurt to have them act like single or double quotes elsewhere - it'd be useful to the user and consistent w/ the other types of quotes.
DanTup commentedon Aug 5, 2016
heh, I got confused that thought they were used for string interpolation but I guess my TS/Dart is blurring somewhat having two Code windows open, writing one in each!
Thanks!