-
Notifications
You must be signed in to change notification settings - Fork 98
Allow customization of which characters to automatically pair #121
Comments
This is also an issue in Clojure where This causes issues like the following: atom/language-clojure#9 It would be great if we could set this per character pair per grammar. If not, I'd settle for excluding grammars and leave it to someone to create a specialised package that deals exclusively with bracketing and quoting for that grammar a la https://github.com/MarcoPolo/atom-paredit. |
+1, in Rust a single fn something<'a>(&'a self) -> &'a u32 {}
struct Thing<X: 'a> {} Allowing the language packs to adjust the completion rules would be great. |
+1 driving me crazy editing markdown |
+1 on LaTeX. Driving me crazy because switching between coding (where I am physically dependent on bracket autocompletion) and LaTeX (which is undoable with buggy completion) is really getting annoying because I have to re-enable and disable the package. |
+1 for rust |
Does anyone have any ideas about how to achieve this? Could you add the ability to register a boolean function where returning false aborts the bracket add? Something like bracket_matcher.register_match_function(function(editor, other_params_that_are_useful) {
if(we_dont_want_a_matching_bracket) {
return false;
} else {
return true;
}
}); PS I'm from Rust |
It should at least be easy to add settings to configure which types of brackets should be matched |
+1 for the ability to configure matching character pairs with ease. That should probably include per-language-settings; those would probably optionally have to be made from the respective language-specific plugin. Also see https://discuss.atom.io/t/add-bracket-pairs-to-highlighting-auto-insertion/22673; not sure which of the forums is the appropriate one for discussions like this. |
+1 for Common Lisp, where single "bracket-matcher":
autocompleteBrackets: false |
@michaelsproul, @m-bra, @derekdreery : my frustrations with editing Rust code using Atom is what motivated me to write PR #249. I have some changes to make before it has any hope of acceptance, but wanted to let you know it's out there so you could at least benefit from it and give any feedback you may have. Given that bracket-matcher is so core to Atom, it stands to reason that it should be highly configurable and as performant as possible. |
Besides of programming and markup languages the configurability of the bracket matcher is also essential for natural language. Currently it only supports typographical quotation mark matching only for English and French and languages the two oft them share patterns with. For all the other languages there’s no matching at all or faulty matching. The latter is true for German: There are two sets of quotation marks »« and „“. Using the first one will trigger matching according to French rules at entering the closing mark, resulting in »...«», while using the second set will trigger matching according to English rules at entering the closing mark, resulting in „“” (and the same goes for the single quote variants). |
Fixed by #249. |
i'm currently maintaining an Atom language grammar for the PowerShell language, and i received an issue that complains about automatic quote insertion for the backtick character (`) in the language. In PowerShell the backtick is used for escapes, so backticks rarely surround a phrase of code, rendering this behavior a small annoyance.
i've started a discussion in the forum about this behavior, and it seems this can be an issue for the LaTeX grammar as well.
Is there a way to turn this behavior off for a particular character without losing automatic quote insertion (is that the term for this behavior?) for the other kinds of quotes? It's a nice feature and losing it for one exception is a bit of a bummer 😦
If not, would it be possible to bake this into some sort of language setting? and is this an addition you'd want in this package?
Relevant links
The text was updated successfully, but these errors were encountered: