Apply the interlink extended grammar only on valid notes

To do so, we need to activate the package on Atom startup.
This commit is contained in:
Seongjae Lee
2015-09-28 01:14:39 -07:00
parent ca7c14e3b7
commit 51f769a017
6 changed files with 65 additions and 74 deletions
+3
View File
@@ -7,6 +7,9 @@ class Interlink
constructor: ->
@subscriptions = new CompositeDisposable
@subscriptions.add atom.commands.add 'atom-workspace', 'nvatom:openInterlink': => Interlink.openInterlink()
@subscriptions.add atom.workspace.observeTextEditors (editor) ->
if Utility.isNote(editor.getPath())
editor.setGrammar(atom.grammars.grammarForScopeName('source.gfm.nvatom'))
destroy: ->
@subscriptions.dispose()