forked from atom/symbols-view
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
currently puppet support is "broken" for tokens with ':' in their names.
I can't currently fork the project to submit PR as I've submitted similar fix to upstream project and github won't allow two forks of the same originating project :(
fix is in file-view.cofee:67-77 :
cursor = editor.getLastCursor()
if cursor.getScopeDescriptor().getScopesArray().indexOf('source.ruby') isnt -1
# Include ! and ? in word regular expression for ruby files
range = cursor.getCurrentWordBufferRange(wordRegex: /[\w!?]*/g)
else if cursor.getScopeDescriptor().getScopesArray().indexOf('source.clojure') isnt -1
range = cursor.getCurrentWordBufferRange(wordRegex: /[\w\*\+!\-_'\?<>]([\w\*\+!\-_'\?<>\.:]+[\w\*\+!\-_'\?<>]?)?/g)
if cursor.getScopeDescriptor().getScopesArray().indexOf('source.puppet') isnt -1
range = cursor.getCurrentWordBufferRange(wordRegex: /[\w!?:]*/g)
else
range = cursor.getCurrentWordBufferRange()
return editor.getTextInRange(range)
note the inclusion of the source.puppet
block. Pretty crude but tested to work.
sample data: https://gist.github.com/droopy4096/cf5ed9254d9ac76cdee4f395528ad06c
Metadata
Metadata
Assignees
Labels
No labels