Skip to content

Add language configuration file for brace/quote completion (etc.) #3

Closed

Description

@devoncarew

Activity

  1. added
    is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.
    on Aug 4, 2016
  2. added this to the milestone on Aug 4, 2016
  3. self-assigned this
    on Aug 4, 2016
  4. DanTup commented on Aug 4, 2016

    @DanTup
    Member

    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!

  5. devoncarew commented on Aug 4, 2016

    @devoncarew
    ContributorAuthor

    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.

  6. DanTup commented on Aug 4, 2016

    @DanTup
    Member

    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).

  7. devoncarew commented on Aug 4, 2016

    @devoncarew
    ContributorAuthor

    Ah, cool.

  8. changed the title [-]you probably want a language configuration file[/-] [+]Add language configuration file for brace/quote completion (etc.)[/+] on Aug 4, 2016
  9. modified the milestones: , on Aug 4, 2016
  10. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    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 :-)

  11. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    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!).

  12. devoncarew commented on Aug 5, 2016

    @devoncarew
    ContributorAuthor

    I think it's things like:

    • 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
  13. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    The things that I wasn't sure about where:

    • 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.

  14. modified the milestones: , on Aug 5, 2016
  15. devoncarew commented on Aug 5, 2016

    @devoncarew
    ContributorAuthor

    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?

  16. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    Think I figured most out:

    • 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?

  17. devoncarew commented on Aug 5, 2016

    @devoncarew
    ContributorAuthor

    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.

  18. DanTup commented on Aug 5, 2016

    @DanTup
    Member

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

is enhancementAn enhancement or improvement that should be listed in release notes but is not a bug fix.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions