You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
* Changed the package to allow for external packages to provide additional checking. (Closes#74)
- Disabled the task-based handling because of passing plugins.
- Two default plugins are included: system-based dictionaries and "known words".
- Suggestions and "add to dictionary" are also provided via interfaces. (Closes#10)
- Modified various calls so they are aware of the where the buffer is located.
* Modified system to allow for multiple plugins/checkers to identify correctness.
- Incorrect words must be incorrect for all checkers.
- Any checker that treats a word as valid is considered valid for the buffer.
* Extracted system-based dictionary support into separate checker.
- System dictionaries can now check across multiple system locales.
- Locale selection can be changed via package settings. (Closes#21)
- Multiple locales can be selected. (Closes#11)
- External search paths can be used for Linux and OS X.
- Default language is based on the process environment, with a fallback to the browser, before finally using `en-US` as a fallback.
* Extracted hard-coded approved list into a separate checker.
- User can add additional "known words" via settings.
- Added an option to add more known words via the suggestion dialog.
* Updated ignore files and added EditorConfig settings for development.
* Various coffee-centric formatting.
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,3 +27,45 @@ for the _Spell Check_ package. Here are some examples: `source.coffee`,
27
27
## Changing the dictionary
28
28
29
29
Currently, only the English (US) dictionary is supported. Follow [this issue](https://github.com/atom/spell-check/issues/11) for updates.
30
+
31
+
## Writing Providers
32
+
33
+
The `spell-check` allows for additional dictionaries to be used at the same time using Atom's `providedServices` element in the `package.json` file.
34
+
35
+
"providedServices": {
36
+
"spell-check": {
37
+
"versions": {
38
+
"1.0.0": "nameOfFunctionToProvideSpellCheck"
39
+
}
40
+
}
41
+
}
42
+
43
+
The `nameOfFunctionToProvideSpellCheck` function may return either a single object describing the spell-check plugin or an array of them. Each spell-check plugin must implement the following:
44
+
45
+
* getId(): string
46
+
* This returns the canonical identifier for this plugin. Typically, this will be the package name with an optional suffix for options, such as `spell-check-project` or `spell-check:en-US`. This identifier will be used for some control plugins (such as `spell-check-project`) to enable or disable the plugin.
47
+
* getName(): string
48
+
* Returns the human-readable name for the plugin. This is used on the status screen and in various dialogs/popups.
49
+
* getPriority(): number
50
+
* Determines how significant the plugin is for information with lower numbers being more important. Typically, user-entered data (such as the config `knownWords` configuration or a project's dictionary) will be lower than system data (priority 100).
51
+
* isEnabled(): boolean
52
+
* If this returns true, then the plugin will considered for processing.
53
+
* getStatus(): string
54
+
* Returns a string that describes the current status or state of the plugin. This is to allow a plugin to identify why it is disabled or to indicate version numbers. This can be formatted for Markdown, including links, and will be displayed on a status screen (eventually).
55
+
* providesSpelling(buffer): boolean
56
+
* If this returns true, then the plugin will be included when looking for incorrect and correct words via the `check` function.
*`correct` and `incorrect` are both optional. If they are skipped, then it means the plugin does not contribute to the correctness or incorrectness of any word. If they are present but empty, it means there are no correct or incorrect words respectively.
59
+
* The `range` objects have a signature of `{ start: X, end: Y }`.
60
+
* providesSuggestions(buffer): boolean
61
+
* If this returns true, then the plugin will be included when querying for suggested words via the `suggest` function.
0 commit comments