benwhalley / atom-language-stata

5 stars 5 forks source link

Autocomplete single-quotes for local macros #15

Open BertLloyd opened 8 years ago

BertLloyd commented 8 years ago

Is it possible for the stata language to override atom's autocomplete for open-single-quote to give open-single-quote close-single-quote rather than the current default of open-single-quote open-single-quote?

nickeubank commented 8 years ago

I think that'd be great, though I'm afraid I'm not sure how that would be implemented. A PR on this would be welcome if you'd like to give it a shot!

BertLloyd commented 8 years ago

Unfortunately this is way beyond my abilities.

nickeubank commented 8 years ago

:) well we'll leave it open and see if anyone picks it up On Mon, Jul 18, 2016 at 8:56 AM BertLloyd notifications@github.com wrote:

Unfortunately this is way beyond my abilities.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/benwhalley/atom-language-stata/issues/15#issuecomment-233372433, or mute the thread https://github.com/notifications/unsubscribe-auth/AJPC7YUc3gvhl-eCvivcU4MqK9DmTOvvks5qW6JEgaJpZM4JNbJY .

BertLloyd commented 8 years ago

A simple half-workaround would be if I could figure out how to turn off atom's autocomplete for open-single-quote.

kylebarron commented 7 years ago

I discovered this while writing code that I'll submit for a pull request soon. It's handled by the bracket-matcher package, not a language package. Add the below to your config.cson (the key is the `' line; you can choose what other characters you want it to autocomplete).

".source.stata":
  "bracket-matcher":
    autocompleteCharacters: [
      "()"
      "[]"
      "{}"
      "''"
      "`'"
      "\"\""
    ]
kylebarron commented 7 years ago

This is resolved by default and without user input in my PR: https://github.com/benwhalley/atom-language-stata/pull/19