Request autocompletions for the find editor
MODIFY
lib/find.coffee
lib/find.coffee
@@ -122,6 +122,20 @@ module.exports =
new Disposable ->
FileIcons.resetService()
+ requestAutocompletions: ->
+ disposable = @autocompleteWatchEditor?(@findView.findEditor, ['default'])
+ if disposable?
+ @autocompleteSubscriptions.add(disposable)
+
+ consumeAutocompleteWatchEditor: (watchEditor) ->
+ @autocompleteSubscriptions = new CompositeDisposable
+ @autocompleteWatchEditor = watchEditor
+ if @findView?
+ requestAutocompletions()
+ new Disposable =>
+ @autocompleteSubscriptions.dispose()
+ @autocompleteWatchEditor = null
+
provideService: ->
resultsMarkerLayerForTextEditor: @findModel.resultsMarkerLayerForTextEditor.bind(@findModel)
@@ -139,6 +153,7 @@ module.exports =
options = {findBuffer, replaceBuffer, pathsBuffer, findHistoryCycler, replaceHistoryCycler, pathsHistoryCycler}
@findView = new FindView(@findModel, options)
+
@projectFindView = new ProjectFindView(@resultsModel, options)
@findPanel = atom.workspace.addBottomPanel(item: @findView, visible: false, className: 'tool-panel panel-bottom')
@@ -160,6 +175,8 @@ module.exports =
# See https://github.com/atom/find-and-replace/issues/63
ResultsPaneView.model = @resultsModel
+ @requestAutocompletions()
+
deactivate: ->
@findPanel?.destroy()
@findPanel = null
@@ -176,6 +193,8 @@ module.exports =
ResultsPaneView.model = null
@resultsModel = null
+ @autocompleteSubscriptions?.dispose()
+ @autocompleteManagerService = null
@subscriptions?.dispose()
@subscriptions = null

MODIFY
package.json
package.json
"versions": {
"1.0.0": "consumeFileIcons"
}
+ },
+ "autocomplete.watchEditor": {
+ "versions": {
+ "1.0.0": "consumeAutocompleteWatchEditor"
+ }
}
},
"providedServices": {

Request autocompletions for the find editor