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

Commit

Permalink
Move config schema to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbrunsfeld committed Dec 8, 2015
1 parent 96d3772 commit 7ede7ed
Show file tree
Hide file tree
Showing 2 changed files with 151 additions and 128 deletions.
128 changes: 0 additions & 128 deletions lib/main.coffee
@@ -1,134 +1,6 @@
{CompositeDisposable} = require 'atom'

module.exports =
config:
enableAutoActivation:
title: 'Show Suggestions On Keystroke'
description: 'Suggestions will show as you type if this preference is enabled. If it is disabled, you can still see suggestions by using the keymapping for autocomplete-plus:activate (shown below).'
type: 'boolean'
default: true
order: 1
autoActivationDelay:
title: 'Delay Before Suggestions Are Shown'
description: 'This prevents suggestions from being shown too frequently. Usually, the default works well. A lower value than the default has performance implications, and is not advised.'
type: 'integer'
default: 100
order: 2
maxVisibleSuggestions:
title: 'Maximum Visible Suggestions'
description: 'The suggestion list will only show this many suggestions.'
type: 'integer'
default: 10
minimum: 1
order: 3
confirmCompletion:
title: 'Keymap For Confirming A Suggestion'
description: 'You should use the key(s) indicated here to confirm a suggestion from the suggestion list and have it inserted into the file.'
type: 'string'
default: 'tab and enter'
enum: ['tab', 'enter', 'tab and enter']
order: 4
useCoreMovementCommands:
title: 'Use Core Movement Commands'
description: 'Disable this if you want to bind your own keystrokes to move around the suggestion list. You will also need to add definitions to your keymap. See: https://github.com/atom/autocomplete-plus#remapping-movement-commands'
type: 'boolean'
default: true
order: 5
fileBlacklist:
title: 'File Blacklist'
description: 'Suggestions will not be provided for files matching this list, e.g. *.md for Markdown files. To blacklist more than one file extension, use comma as a separator, e.g. *.md, *.txt (both Markdown and text files).'
type: 'array'
default: ['.*']
items:
type: 'string'
order: 6
scopeBlacklist:
title: 'Scope Blacklist'
description: 'Suggestions will not be provided for scopes matching this list. See: https://atom.io/docs/latest/behind-atom-scoped-settings-scopes-and-scope-descriptors'
type: 'array'
default: []
items:
type: 'string'
order: 7
includeCompletionsFromAllBuffers:
title: 'Include Completions From All Buffers'
description: 'For grammars with no registered provider(s), the default provider will include completions from all buffers, instead of just the buffer you are currently editing.'
type: 'boolean'
default: true
order: 8
strictMatching:
title: 'Use Strict Matching For Built-In Provider'
description: 'Fuzzy searching is performed if this is disabled; if it is enabled, suggestions must begin with the prefix from the current word.'
type: 'boolean'
default: false
order: 9
minimumWordLength:
description: "Only autocomplete when you've typed at least this many characters. Note: May not affect external providers."
type: 'integer'
default: 3
order: 10
enableBuiltinProvider:
title: 'Enable Built-In Provider'
description: 'The package comes with a built-in provider that will provide suggestions using the words in your current buffer or all open buffers. You will get better suggestions by installing additional autocomplete+ providers. To stop using the built-in provider, disable this option.'
type: 'boolean'
default: true
order: 11
builtinProviderBlacklist:
title: 'Built-In Provider Blacklist'
description: 'Don\'t use the built-in provider for these selector(s).'
type: 'string'
default: '.source.gfm'
order: 12
backspaceTriggersAutocomplete:
title: 'Allow Backspace To Trigger Autocomplete'
description: 'If enabled, typing `backspace` will show the suggestion list if suggestions are available. If disabled, suggestions will not be shown while backspacing.'
type: 'boolean'
default: false
order: 13
enableAutoConfirmSingleSuggestion:
title: 'Automatically Confirm Single Suggestion'
description: 'If enabled, automatically insert suggestion on manual activation with autocomplete-plus:activate when there is only one match.'
type: 'boolean'
default: true
order: 14
suggestionListFollows:
title: 'Suggestions List Follows'
description: 'With "Cursor" the suggestion list appears at the cursor\'s position. With "Word" it appears at the beginning of the word that\'s being completed.'
type: 'string'
default: 'Word'
enum: ['Word', 'Cursor']
order: 15
defaultProvider:
description: 'Using the Symbol provider is experimental. You must reload Atom to use a new provider after changing this option.'
type: 'string'
default: 'Symbol'
enum: ['Fuzzy', 'Symbol']
order: 16
suppressActivationForEditorClasses:
title: 'Suppress Activation For Editor Classes'
description: 'Don\'t auto-activate when any of these classes are present in the editor.'
type: 'array'
default: ['vim-mode.command-mode', 'vim-mode.visual-mode', 'vim-mode.operator-pending-mode']
items:
type: 'string'
order: 17
consumeSuffix:
title: 'Consume suggestion text following the cursor'
description: 'Completing a suggestion consumes text following the cursor matching the suffix of the chosen suggestion.'
type: 'boolean'
default: true
order: 18
useAlternateScoring:
description: "Prefers runs of consecutive characters, acronyms and start of words. (Experimental)"
type: 'boolean'
default: false
order: 19
useLocalityBonus:
description: "Gives words near the cursor position a higher score than those far away"
type: 'boolean'
default: true
order: 20

autocompleteManager: null
subscriptions: null

Expand Down
151 changes: 151 additions & 0 deletions package.json
Expand Up @@ -37,5 +37,156 @@
"0.1.0": "consumeSnippets"
}
}
},
"configSchema": {
"enableAutoActivation": {
"title": "Show Suggestions On Keystroke",
"description": "Suggestions will show as you type if this preference is enabled. If it is disabled, you can still see suggestions by using the keymapping for 'autocomplete-plus:activate' (shown below).",
"type": "boolean",
"default": true,
"order": 1
},
"autoActivationDelay": {
"title": "Delay Before Suggestions Are Shown",
"description": "This prevents suggestions from being shown too frequently. Usually, the default works well. A lower value than the default has performance implications, and is not advised.",
"type": "integer",
"default": 100,
"order": 2
},
"maxVisibleSuggestions": {
"title": "Maximum Visible Suggestions",
"description": "The suggestion list will only show this many suggestions.",
"type": "integer",
"default": 10,
"minimum": 1,
"order": 3
},
"confirmCompletion": {
"title": "Keymap For Confirming A Suggestion",
"description": "You should use the key(s) indicated here to confirm a suggestion from the suggestion list and have it inserted into the file.",
"type": "string",
"default": "tab and enter",
"enum": ["tab", "enter", "tab and enter"],
"order": 4
},
"useCoreMovementCommands": {
"title": "Use Core Movement Commands",
"description": "Disable this if you want to bind your own keystrokes to move around the suggestion list. You will also need to add definitions to your keymap. See: https://github.com/atom/autocomplete-plus#remapping-movement-commands",
"type": "boolean",
"default": true,
"order": 5
},
"fileBlacklist": {
"title": "File Blacklist",
"description": "Suggestions will not be provided for files matching this list, e.g. *.md for Markdown files. To blacklist more than one file extension, use comma as a separator, e.g. *.md, *.txt (both Markdown and text files).",
"type": "array",
"default": [".*"],
"items": {
"type": "string"
},
"order": 6
},
"scopeBlacklist": {
"title": "Scope Blacklist",
"description": "Suggestions will not be provided for scopes matching this list. See: https://atom.io/docs/latest/behind-atom-scoped-settings-scopes-and-scope-descriptors",
"type": "array",
"default": [],
"items": {
"type": "string"
},
"order": 7
},
"includeCompletionsFromAllBuffers": {
"title": "Include Completions From All Buffers",
"description": "For grammars with no registered provider(s), the default provider will include completions from all buffers, instead of just the buffer you are currently editing.",
"type": "boolean",
"default": true,
"order": 8
},
"strictMatching": {
"title": "Use Strict Matching For Built-In Provider",
"description": "Fuzzy searching is performed if this is disabled; if it is enabled, suggestions must begin with the prefix from the current word.",
"type": "boolean",
"default": false,
"order": 9
},
"minimumWordLength": {
"description": "Only autocomplete when you've typed at least this many characters. Note: May not affect external providers.",
"type": "integer",
"default": 3,
"order": 10
},
"enableBuiltinProvider": {
"title": "Enable Built-In Provider",
"description": "The package comes with a built-in provider that will provide suggestions using the words in your current buffer or all open buffers. You will get better suggestions by installing additional autocomplete+ providers. To stop using the built-in provider, disable this option.",
"type": "boolean",
"default": true,
"order": 11
},
"builtinProviderBlacklist": {
"title": "Built-In Provider Blacklist",
"description": "Don't use the built-in provider for these selector(s).",
"type": "string",
"default": ".source.gfm",
"order": 12
},
"backspaceTriggersAutocomplete": {
"title": "Allow Backspace To Trigger Autocomplete",
"description": "If enabled, typing `backspace` will show the suggestion list if suggestions are available. If disabled, suggestions will not be shown while backspacing.",
"type": "boolean",
"default": false,
"order": 13
},
"enableAutoConfirmSingleSuggestion": {
"title": "Automatically Confirm Single Suggestion",
"description": "If enabled, automatically insert suggestion on manual activation with 'autocomplete-plus:activate' when there is only one match.",
"type": "boolean",
"default": true,
"order": 14
},
"suggestionListFollows": {
"title": "Suggestions List Follows",
"description": "With 'Cursor' the suggestion list appears at the cursor's position. With 'Word' it appears at the beginning of the word that's being completed.",
"type": "string",
"default": "Word",
"enum": ["Word", "Cursor"],
"order": 15
},
"defaultProvider": {
"description": "Using the Symbol provider is experimental. You must reload Atom to use a new provider after changing this option.",
"type": "string",
"default": "Symbol",
"enum": ["Fuzzy", "Symbol"],
"order": 16
},
"suppressActivationForEditorClasses": {
"title": "Suppress Activation For Editor Classes",
"description": "Don't auto-activate when any of these classes are present in the editor.",
"type": "array",
"default": ["vim-mode.command-mode", "vim-mode.visual-mode", "vim-mode.operator-pending-mode"],
"items": {
"type": "string"
},
"order": 17
},
"consumeSuffix": {
"title": "Consume suggestion text following the cursor",
"description": "Completing a suggestion consumes text following the cursor matching the suffix of the chosen suggestion.",
"type": "boolean",
"default": true,
"order": 18
},
"useAlternateScoring": {
"description": "Prefers runs of consecutive characters, acronyms and start of words. (Experimental)",
"type": "boolean",
"default": false,
"order": 19
},
"useLocalityBonus": {
"description": "Gives words near the cursor position a higher score than those far away",
"type": "boolean",
"default": true,
"order": 20
}
}
}

0 comments on commit 7ede7ed

Please sign in to comment.