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

Commit 8b5cdf9

Browse files
authored
Merge pull request #961 from ariasuni/fix-extra-word-characters
fix using autocomplete instead of autocomplete-plus to retrieve config
2 parents edf3db3 + 35d0de9 commit 8b5cdf9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/get-additional-word-characters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const POSSIBLE_WORD_CHARACTERS = '/\\()"\':,.;<>~!@#$%^&*|+=[]{}`?_-…'.split('
33
module.exports =
44
function getAdditionalWordCharacters (scopeDescriptor) {
55
const nonWordCharacters = atom.config.get('editor.nonWordCharacters', {scope: scopeDescriptor})
6-
let result = atom.config.get('autocomplete.extraWordCharacters', {scope: scopeDescriptor})
6+
let result = atom.config.get('autocomplete-plus.extraWordCharacters', {scope: scopeDescriptor})
77
POSSIBLE_WORD_CHARACTERS.forEach(character => {
88
if (!nonWordCharacters.includes(character)) {
99
result += character

spec/subsequence-provider-spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('SubsequenceProvider', () => {
112112

113113
it('does not return the prefix as a suggestion', () => {
114114
atom.config.set('editor.nonWordCharacters', '-')
115-
atom.config.set('autocomplete.extraWordCharacters', '-')
115+
atom.config.set('autocomplete-plus.extraWordCharacters', '-')
116116

117117
editor.moveToBottom()
118118
editor.insertText('--qu')
@@ -256,7 +256,7 @@ describe('SubsequenceProvider', () => {
256256
)
257257

258258
describe('when editor.nonWordCharacters changes', () => {
259-
it('includes characters that are included in the `autocomplete.extraWordCharacters` setting or not excluded in the `editor.nonWordCharacters` setting', () => {
259+
it('includes characters that are included in the `autocomplete-plus.extraWordCharacters` setting or not excluded in the `editor.nonWordCharacters` setting', () => {
260260
waitsForPromise(async () => {
261261
const scopeSelector = editor.getLastCursor().getScopeDescriptor().getScopeChain()
262262
editor.insertText('good$noodles good-beef ')
@@ -266,7 +266,7 @@ describe('SubsequenceProvider', () => {
266266
expect(sugs).not.toContain('good$noodles')
267267
expect(sugs).not.toContain('good-beef')
268268

269-
atom.config.set('autocomplete.extraWordCharacters', '-', {scopeSelector})
269+
atom.config.set('autocomplete-plus.extraWordCharacters', '-', {scopeSelector})
270270
sugs = await suggestionsForPrefix(provider, editor, 'good')
271271
expect(sugs).toContain('good-beef')
272272
expect(sugs).not.toContain('good$noodles')

0 commit comments

Comments
 (0)