Code Monkey home page Code Monkey logo

Comments (12)

DanTup avatar DanTup commented on May 27, 2024

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!

from dart-code.

devoncarew avatar devoncarew commented on May 27, 2024

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.

from dart-code.

DanTup avatar DanTup commented on May 27, 2024

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

from dart-code.

devoncarew avatar devoncarew commented on May 27, 2024

Ah, cool.

from dart-code.

DanTup avatar DanTup commented on May 27, 2024

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

from dart-code.

DanTup avatar DanTup commented on May 27, 2024

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

from dart-code.

devoncarew avatar devoncarew commented on May 27, 2024

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

from dart-code.

DanTup avatar DanTup commented on May 27, 2024

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.

from dart-code.

devoncarew avatar devoncarew commented on May 27, 2024

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?

from dart-code.

DanTup avatar DanTup commented on May 27, 2024

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?

from dart-code.

devoncarew avatar devoncarew commented on May 27, 2024

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.

from dart-code.

DanTup avatar DanTup commented on May 27, 2024

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!

from dart-code.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.