Atom-LaTeX icon indicating copy to clipboard operation
Atom-LaTeX copied to clipboard

Feature request: option to disable auto-completition

Open gilbertohasnofb opened this issue 6 years ago • 9 comments

Feature request: when this package is enabled, it seems to override the characters set for auto-completition in the package bracket-matcher. For instance, I do not want automatically close any ' nor ` since I use those for quotation marks in Latex. The package bracket-matcher allows scoped settings for specific types of extension, but because this package seems to be overriding it that is not working for me either.

gilbertohasnofb avatar Feb 12 '19 14:02 gilbertohasnofb

Yeah, this is a pretty obnoxious bug. I almost posted an issue on the bracket-matcher page before realizing the problem was with atom-latex instead. I'm not sure why atom-latex is enforcing its own matching, but it should at least have a way to define which characters to match, especially since latex lets you define new characters. For example, I'm using two vertical bars || to denote code and that's not a default pair.

StructByLightning avatar Feb 16 '19 19:02 StructByLightning

@James-Yu Would it be possible to let these options be enabled/disabled/customized by the users instead of being on by default? Another auto-completition option that is imposed by default with no option to toggle it off is to autoclose any \begin{environment} with an \end{environment}. I personally find that more often than not it is adding closures where I don't need them and it's a hassle to fight with the autocompletition.

gilbertohasnofb avatar Feb 17 '19 13:02 gilbertohasnofb

Yeah, I just tried to get atom here als alternativ LaTeX environment, this was a killer issue of that endeavor.

You can remove the annoying (non)brackets in the file ".atom/packages/atom-latex/settings/language-latex.cson"...

However, for this I guess it's too late, once a negative opinion is set, it's done.

axkibe avatar Feb 21 '19 11:02 axkibe

@axkibe Thanks for the info, I see that that file overwrites my preferences for the bracket-matcher. Editing it did solve the annoying behaviour with the brackets. Now I just need some time to go through the rest of the code to spot where the annoying \begin{environment} and \end{environment} autocompletition code is defined.

gilbertohasnofb avatar Feb 21 '19 22:02 gilbertohasnofb

The package bracket-matcher allows scoped settings for specific types of extension, but because this package seems to be overriding it that is not working for me either.

Yeah, this is a pretty obnoxious bug. I almost posted an issue on the bracket-matcher page before realizing the problem was with atom-latex instead.

Hmm, I didn't realise scoped settings for bracket-matcher doesn't really mean scoped settings, and just overrides the global settings. Any suggested workarounds? I don't have much time these days - so PR's are welcome! :-)

ashthespy avatar Mar 08 '19 15:03 ashthespy

@ashthespy Possibly a simple, quick, and dirty way of fixing this would be to simply add a toggle in the configuration options of your package for enabling/disabling all autocompletitions for your package. This way, people who wants to use their own custom bracket-matcher settings can simply disable that toggle, otherwise everyone who is happy with your package remain happy. I would also suggest that this toggle would disable not only the bracket matching but also other things like the autocompletition of \end{environment} when typing \begin{environment} and hitting enter.

gilbertohasnofb avatar Mar 08 '19 16:03 gilbertohasnofb

End/begin autocompletion should be a separate toggle.

StructByLightning avatar Mar 08 '19 16:03 StructByLightning

@ashthespy Apologies for bumping this, but is there any chance you would consider implementing this feature?

gilbertohasnofb avatar Mar 01 '20 12:03 gilbertohasnofb

@gilbertohasnofb PR's are welcome - don't have the time right now to jump into this. In the ideal world, this should be an issue/handled over at bracket-matcher, so that these settings don't override your defaults..

ashthespy avatar Mar 04 '20 22:03 ashthespy