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

Does not detect and doesn't auto-reload development grammars #84

Open
software-opal opened this issue Jan 5, 2017 · 0 comments
Open

Comments

@software-opal
Copy link

software-opal commented Jan 5, 2017

I was writing a custom grammar for an internal file format(named source.tks) on my local machine. I'd installed the package with apm link; but the grammar was not loaded. Instead I needed to force it to be added using the developer console.

Additionally any edits I made to the grammar file were not synchronised in the editor; requiring me to remove the grammar and re-add it.

I used this command:

atom.grammars.getGrammars().forEach(
  (g) => g.scopeName == 'source.tks' ? atom.grammars.removeGrammar(g) : 0);
atom.grammars.addGrammar(
  atom.grammars.readGrammarSync(
    '/home/lee/Scratchpad/language-tks/grammars/tks.cson'))

At first I thought that the problem was with my code/layout; however once I published it on APM it worked perfectly.

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

No branches or pull requests

1 participant