{"id":13895985,"url":"https://github.com/orbitalquark/textadept-spellcheck","last_synced_at":"2025-05-01T18:30:30.338Z","repository":{"id":42375777,"uuid":"301852059","full_name":"orbitalquark/textadept-spellcheck","owner":"orbitalquark","description":"Spell checking module for Textadept.","archived":false,"fork":false,"pushed_at":"2025-04-24T13:44:48.000Z","size":141,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"default","last_synced_at":"2025-04-24T14:34:03.060Z","etag":null,"topics":["spell-checker","spellchecker","spelling","textadept","textadept-module"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orbitalquark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-06T20:53:21.000Z","updated_at":"2025-04-24T13:34:58.000Z","dependencies_parsed_at":"2024-11-12T12:13:01.788Z","dependency_job_id":"65ddcdea-d056-4a35-95f3-9b84b315004b","html_url":"https://github.com/orbitalquark/textadept-spellcheck","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-spellcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-spellcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-spellcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orbitalquark%2Ftextadept-spellcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orbitalquark","download_url":"https://codeload.github.com/orbitalquark/textadept-spellcheck/tar.gz/refs/heads/default","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251924562,"owners_count":21665991,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["spell-checker","spellchecker","spelling","textadept","textadept-module"],"created_at":"2024-08-06T18:02:35.951Z","updated_at":"2025-05-01T18:30:30.325Z","avatar_url":"https://github.com/orbitalquark.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"# Spellcheck\n\nSpell checking for Textadept.\n\nInstall this module by copying it into your *~/.textadept/modules/* directory or Textadept's\n*modules/* directory, and then putting the following in your *~/.textadept/init.lua*:\n\n```lua\nlocal spellcheck = require('spellcheck')\n```\n\nThere will be a \"Tools \u003e Spelling\" menu. Textadept automatically spell checks the buffer\neach time it is saved, highlighting any misspelled words in plain text, comments, and\nstrings. These options can be configured via [`spellcheck.check_spelling_on_save`](#spellcheck.check_spelling_on_save) and\n[`spellcheck.spellcheckable_styles`](#spellcheck.spellcheckable_styles), respectively. Left-clicking (not right-clicking) on\nmisspelled words shows suggestions.\n\nBy default, Textadept attempts to load a preexisting [Hunspell][] dictionary for the\ndetected locale. If none exists, or if the locale is not detected, Textadept falls back\non its own prepackaged US English dictionary. Textadept searches for dictionaries in\n[`spellcheck.hunspell_paths`](#spellcheck.hunspell_paths). User dictionaries are located in the *~/.textadept/dictionaries/*\ndirectory, and are loaded automatically.\n\nDictionary files are Hunspell dictionaries and follow the Hunspell format: the first line\nin a dictionary file contains the number of entries contained within, and each subsequent\nline contains a word.\n\n[Hunspell]: https://hunspell.github.io/\n\n## Compiling\n\nReleases include binaries, so building this modules should not be necessary. If you want\nto build manually, use CMake. For example:\n\n```bash\ncmake -S . -B build_dir\ncmake --build build_dir\ncmake --install build_dir\n```\n\n## Key Bindings\n\nWindows and Linux | macOS | Terminal | Command\n-|-|-|-\n**Tools**| | |\nCtrl+: | ⌘: | M-: | Check spelling interactively\nCtrl+; | ⌘; | M-; | Mark misspelled words\n\n\u003ca id=\"spellcheck.INDIC_SPELLING\"\u003e\u003c/a\u003e\n## `spellcheck.INDIC_SPELLING`\n\nThe spelling error indicator number.\n\n\u003ca id=\"_G.spell\"\u003e\u003c/a\u003e\n## `_G.spell`(*aff*, *dic*[, *key*])\n\nReturns a Hunspell spellchecker.\n\nThis is a low-level function. You probably want to use the higher-level [`spellcheck.load()`](#spellcheck.load).\n\nParameters:\n- *aff*:  String path to the Hunspell affix file to use.\n- *dic*:  String path to the Hunspell dictionary file to use.\n- *key*:  String key for encrypted *dic*.\n\nUsage:\n\n```lua\nspellchecker = spell('/usr/share/hunspell/en_US.aff', '/usr/share/hunspell/en_US.dic')\nspellchecker:spell('foo') --\u003e false\n```\n\n\u003ca id=\"spellcheck.check_spelling\"\u003e\u003c/a\u003e\n## `spellcheck.check_spelling`([*interactive*=false[, *wrapped*]])\n\nChecks the buffer for any spelling errors and marks them.\n\nParameters:\n- *interactive*:  Display suggestions for the next misspelled word.\n- *wrapped*:  Utility flag that indicates whether or not the spellchecker has\n\twrapped for displaying useful statusbar information. This flag is used and set internally,\n\tand should not be set otherwise.\n\n\u003ca id=\"spellcheck.check_spelling_on_save\"\u003e\u003c/a\u003e\n## `spellcheck.check_spelling_on_save`\n\nCheck spelling after saving files.\n\nThe default value is `true`.\n\n\u003ca id=\"spellcheck.hunspell_paths\"\u003e\u003c/a\u003e\n## `spellcheck.hunspell_paths`\n\nList of paths to search for Hunspell dictionaries in.\n\n\u003ca id=\"spellcheck.load\"\u003e\u003c/a\u003e\n## `spellcheck.load`(*lang*)\n\nLoads a language into the spellchecker.\n\nParameters:\n- *lang*:  String Hunspell language name to load.\n\nUsage:\n\n```lua\nspellcheck.load('en_US')\n```\n\n\u003ca id=\"spellcheck.misspelled_color_name\"\u003e\u003c/a\u003e\n## `spellcheck.misspelled_color_name`\n\nThe name of the theme color used to mark misspelled words.\n\nThe default value is 'red'. If your theme does not define that color, set this field to your\ntheme's equivalent.\n\n\u003ca id=\"spellcheck.spellcheckable_styles\"\u003e\u003c/a\u003e\n## `spellcheck.spellcheckable_styles`\n\nMap of spellcheckable style names to `true`.\n\nText with any of these styles is eligible for spellchecking.\n\nThe default styles are `lexer.DEFAULT`, `lexer.COMMENT`, and `lexer.STRING`.\n\nUsage:\n\n```lua\nspellcheck.spellcheckable_styles[lexer.HEADING] = true\n```\n\n\u003ca id=\"spellcheck.spellchecker\"\u003e\u003c/a\u003e\n## `spellcheck.spellchecker`\n\nThe Hunspell spellchecker object.\n\n\u003ca id=\"spellchecker.add_dic\"\u003e\u003c/a\u003e\n## `spellchecker:add_dic`(*dic*)\n\nAdds words from a dictionary file to the spellchecker.\n\nParameters:\n- *dic*:  String path to the Hunspell dictionary file to load.\n\n\u003ca id=\"spellchecker.add_word\"\u003e\u003c/a\u003e\n## `spellchecker:add_word`(*word*)\n\nAdds a word to the spellchecker.\n\nNote: this is not a permanent addition. It only persists for the life of this spellchecker\nand applies only to this spellchecker.\n\nParameters:\n- *word*:  String word to add.\n\n\u003ca id=\"spellchecker.get_dic_encoding\"\u003e\u003c/a\u003e\n## `spellchecker:get_dic_encoding`()\n\nReturns the dictionary's string encoding.\n\n\u003ca id=\"spellchecker.spell\"\u003e\u003c/a\u003e\n## `spellchecker:spell`(*word*)\n\nReturns whether or not a word is spelled correctly.\n\nParameters:\n- *word*:  String word to check spelling of.\n\n\u003ca id=\"spellchecker.suggest\"\u003e\u003c/a\u003e\n## `spellchecker:suggest`(*word*)\n\nReturns a list of spelling suggestions for a word.\n\nIf that word is spelled correctly, the returned list will be empty.\n\nParameters:\n- *word*:  String word to get spelling suggestions for.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitalquark%2Ftextadept-spellcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forbitalquark%2Ftextadept-spellcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forbitalquark%2Ftextadept-spellcheck/lists"}