Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Lifetimes are treated as a char incorrectly #8

Closed
wycats opened this issue Aug 1, 2014 · 3 comments
Closed

Lifetimes are treated as a char incorrectly #8

wycats opened this issue Aug 1, 2014 · 3 comments
Labels

Comments

@wycats
Copy link

wycats commented Aug 1, 2014

fn foo<'' // typing a single `'` produces a second `'` incorrectly
@wycats wycats changed the title Lifetimes are highlighted incorrectly Lifetimes are treated as a char incorrectly Aug 1, 2014
@zargony zargony added the bug label Aug 16, 2014
@zargony
Copy link
Owner

zargony commented Aug 16, 2014

I think this is a behavior of the core editor (producing a second ' or " if you type the first). I don't think that a plugin can change this based on the context of an expected lifetime (at least I'm not aware of a way to do this)

@bombless
Copy link
Contributor

bombless commented May 1, 2015

I can fix it by deleting one line of bracket-matcher, but I cannot find a way to add an option for bracket-matcher, the callback hell is too complex for me to understand :D.

Also given the name here I don't understand why bracket-matcher does this, is it handling some behavior inside Atom?

Highlight the matching bracket for the (){}[] character under the cursor. Move the cursor to the matching bracket with ctrl-m. (91297 downloads, 74 stars)

Maybe I should open an issue on bracket-matcher suggesting adding the desired option, but I'm not sure.

@zargony
Copy link
Owner

zargony commented Jun 27, 2017

Since Atom's bracket-matcher can be configured now, I added a configuration that excludes single quotes from being autocompleted. This fixes the annoying autocompletion of a second single quote whenever you want to type a lifetime parameter. However this unfortunately completely disables autocompletion for single quotes, i.e. also for character literals where it was actually useful.
I guess this is still better than before. Feedback welcome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants