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

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

@software-opal

Description

@software-opal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions