Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tex files open with text.tex.latex.beamer grammar #176

Closed
exploide opened this issue Sep 13, 2018 · 10 comments
Closed

tex files open with text.tex.latex.beamer grammar #176

exploide opened this issue Sep 13, 2018 · 10 comments
Labels

Comments

@exploide
Copy link

Just noticed that spell check stopped working. I took a look why and noticed that tex files intended for inclusion (i.e. without \documentclass) are opened with text.tex.latex.beamer grammar by default.

Don't know why exactly beamer documents have their own grammar at all, but maybe this isn't intended behavior?! If it is, then maybe add to the relevant section in README that text.tex.latex.beamer is also a reasonable grammar when enabling spell check for LaTeX.

@ashthespy
Copy link
Owner

Sorry, this is an artefact of 788796b
There are some workaround on how to fix it, but if nothing comes up, shall revert that commit for now.

@ashthespy ashthespy added the bug label Sep 13, 2018
@Aerijo
Copy link

Aerijo commented Sep 17, 2018

@ashthespy So I think it was you on Slack... anyway, I've made a PR to first-mate that should give a way to resolve the issue. I don't know if it will get accepted (stability seems very important to nowadays), but it seems harmless enough.

@ashthespy
Copy link
Owner

@Aerijo Indeed was me, thanks!

@lsfinn
Copy link

lsfinn commented Oct 15, 2018

I note that "Latex Memoir.cson" grammar is also missing fileTypes "tex".
Would it be reasonable to add a contentRegex along the lines of "^%[ ]-\-[ ][bB]eamer[ ]-\-" to "Latex Memoir.cson", (mutatis mutants "Latex Beamer.cson") so that a comment of the form
% -
- memoir -*-
would select the desired grammar (or, if absent entirely, fall-back to the latex grammar)?

I've been trying to make this work; however, I'm not sufficiently adept at all the escaping needed to correctly specify the regular expression .

@HDembinski
Copy link

I am also here for this bug. I am new atom user, and this was really confusing and almost turned me away.

@ashthespy
Copy link
Owner

@lsfinn contentRegex needs atom/first-mate#109 to be merged for it work, hopefully it gets merged soon!

@gwylanscheeren
Copy link

Sorry, this is an artefact of 788796b
There are some workaround on how to fix it, but if nothing comes up, shall revert that commit for now.

Is there any progress on this? Is there indeed a workaround you suggest to use in the meantime?

@JackSwett
Copy link

Hey guys, this was fixed right away when I moved \documentclass to the top of the .tex file. For me, I'm using the IEEE template you can find online and it has comments before the \documentclass, which was messing with how the grammar was being categorized.

I know its not a great fix, but its a decent workaround. If not, just add text.tex.latex.beamer to your grammar.

@shadyaristotelessnail
Copy link

With the package file-types you can set up that all .tex files are in text.tex.latex grammar .
For me, who is only use latex and no latex.beamer, this is perfect.
https://atom.io/packages/file-types

My config looks like this and works fine:
core: "file-types": "*.tex": "text.tex.latex"

I personally think this is an easy and pleasant workaround.

@ashthespy
Copy link
Owner

Should be fixed with d53027c that lands in v0.8.6

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

No branches or pull requests

8 participants