{"id":28203694,"url":"https://github.com/redsuperbat/rustproof","last_synced_at":"2025-10-17T17:12:03.364Z","repository":{"id":286118503,"uuid":"952163150","full_name":"redsuperbat/rustproof","owner":"redsuperbat","description":"Spellchecker for code","archived":false,"fork":false,"pushed_at":"2025-05-15T19:36:14.000Z","size":388,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T12:43:45.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/redsuperbat.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":"2025-03-20T20:44:47.000Z","updated_at":"2025-05-15T19:36:17.000Z","dependencies_parsed_at":"2025-04-04T13:26:48.501Z","dependency_job_id":"8d9dc773-cee5-4a97-a9a2-3f8500be6a71","html_url":"https://github.com/redsuperbat/rustproof","commit_stats":null,"previous_names":["redsuperbat/rustproof"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/redsuperbat/rustproof","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsuperbat%2Frustproof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsuperbat%2Frustproof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsuperbat%2Frustproof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsuperbat%2Frustproof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redsuperbat","download_url":"https://codeload.github.com/redsuperbat/rustproof/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redsuperbat%2Frustproof/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265500292,"owners_count":23777457,"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":[],"created_at":"2025-05-17T02:12:13.376Z","updated_at":"2025-10-17T17:12:03.284Z","avatar_url":"https://github.com/redsuperbat.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rustproof\n\nA fast, extensible code checker written in Rust. Rustproof uses the Language Server Protocol (LSP) to communicate with your editor and detect spelling mistakes in your code. It handles a multitude of casings by breaking words into individual components. It supports multiple natural and programming languages. Rustproof is built on top of [Hunspell](https://hunspell.github.io/), the spellchecker that powers LibreOffice. While Rustproof is primarily built for Neovim, it can be used in any editor that supports the Language Server Protocol.\n\n![rustproof](https://github.com/user-attachments/assets/ad313dcb-fac7-4df7-afbb-47f95ecf2e2f)\n\n## Why use this and not [cspell](https://cspell.org/)?\n\nSince Rustproof is written in rust and the implementation is fairly simple it makes the server quite fast. It's also much easier to add more dictionaries when using an editor such as Neovim.\n\n## Installation\n\nThe easiest is probably to clone the repository and build from source:\n\n```sh\ngit clone https://github.com/redsuperbat/rustproof.git\ncd rustproof\ncargo build --release\n```\n\nThere are also binaries available which are built when a new release happens. Those can be found under the releases section on [github](https://github.com/redsuperbat/rustproof/releases).\n\n## How It Works\n\nThe concept is simple: split camelCase, PascalCase, and snake_case words before checking them against a list of known words.\n\n- **camelCase** → camel case\n- **PascalCase** → pascal case\n- **snake_case_words** → snake case words\n- **kebab-case-words** → kebab case words\n- **JSONParser** → json parser\n- **DataJSON** → data json\n- **DataJSONParser** → data json parser\n\n## Things to Note\n\n- The local dictionary is **case-insensitive**. It will not catch errors like \"english,\" which should be \"English.\" Hunspell dictionaries will flag these errors though!\n- The spellchecker uses **dictionaries stored locally** and does **not** send data outside your machine.\n- **Dictionaries may contain errors** and missing words.\n- Only words longer than **three characters** are checked. For example, \"jsj\" is ignored, while \"jsja\" is checked.\n- **Symbols and punctuation are ignored.** Except for single quotes in words such as `it's` and `wouldn't`\n\n## Adding Dictionaries\n\n- Since Rustproof is based on Hunspell, you can add many additional dictionaries. See [this repository](https://github.com/wooorm/dictionaries/tree/main/dictionaries) for more options.\n- If Rustproof detects that the dictionaries provided are not available on the local machine it will download and cache them using the reqwest library\n\n## LSP Initialization Options (`init_options`)\n\nConfiguration options passed during LSP initialization.\n\n| Name                  | Type                     | Default                                   | Description                                                                                                                                                                          |\n| --------------------- | ------------------------ | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `dict_path`           | `string`                 | `\u003csystem-config-path\u003e/rustproof/dict.txt` | Specifies the path to a local dictionary file. Words added via LSP actions (like \"add to dictionary\") will be saved here.                                                            |\n| `diagnostic_severity` | `string`                 | `error`                                   | Sets the severity level reported for spelling diagnostics in the editor. Values: `\"error\"`, `\"warning\"`, `\"info\"`, `\"hint\"`.                                                         |\n| `dictionaries`        | `table` (list of tables) | _See default below_                       | A list of dictionaries to load for spellchecking. Each dictionary requires a `language`, `aff` (affix file URL), and `dic` (dictionary file URL). LSP will download/cache as needed. |\n\n**Default dictionaries**:\n\n```lua\n[\n  {\n    language = \"en-code\",\n    aff = \"https://raw.githubusercontent.com/redsuperbat/rustproof/refs/heads/main/dictionaries/en-code/index.aff\",\n    dic = \"https://raw.githubusercontent.com/redsuperbat/rustproof/refs/heads/main/dictionaries/en-code/index.dic\",\n  },\n  {\n    language = \"en\",\n    aff = \"https://raw.githubusercontent.com/redsuperbat/rustproof/refs/heads/main/dictionaries/en/index.aff\",\n    dic = \"https://raw.githubusercontent.com/redsuperbat/rustproof/refs/heads/main/dictionaries/en/index.dic\",\n  },\n]\n```\n\n---\n\n## Example Neovim configuration\n\n\u003e [!NOTE]\n\u003e The lsp configuration file can be placed in /lsp/rustproof.lua\n\n```lua\nreturn {\n  cmd = { \"rustproof\" },\n  -- Specify which filetypes to spellcheck\n  -- This is just a subset, rustproofs lexer supports a range of programming languages\n  filetypes = { \"rust\", \"lua\", \"ruby\", \"javascript\", \"toml\", \"vue\" },\n  init_options = {\n    -- You can add words to a local dictionary, here you can specify a path for that dictionary\n    dict_path = \"~/.config/nvim/lsp/rustproof-dict.txt\",\n    -- Severity of the diagnostics in the editor\n    diagnostic_severity = \"warning\",\n    -- List of dictionaries to include in your spellchecker.\n    -- Rustproof will automatically download and cache the dictionaries when you first start the lsp\n    dictionaries = {\n      {\n        language = \"sv\",\n        aff = \"https://raw.githubusercontent.com/wooorm/dictionaries/refs/heads/main/dictionaries/sv/index.aff\",\n        dic = \"https://raw.githubusercontent.com/wooorm/dictionaries/refs/heads/main/dictionaries/sv/index.dic\",\n      },\n    },\n  },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsuperbat%2Frustproof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredsuperbat%2Frustproof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredsuperbat%2Frustproof/lists"}