mirror of
https://github.com/wassname/nvatom.git
synced 2026-09-09 11:27:39 +08:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user