https://github.com/jellydn/cspell-tool
Keep your project's spelling in check with cspell-tool.
https://github.com/jellydn/cspell-tool
cli cspell spell-check
Last synced: 6 months ago
JSON representation
Keep your project's spelling in check with cspell-tool.
- Host: GitHub
- URL: https://github.com/jellydn/cspell-tool
- Owner: jellydn
- License: mit
- Created: 2023-10-15T16:17:54.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-09T18:38:54.000Z (6 months ago)
- Last Synced: 2025-04-09T19:40:23.265Z (6 months ago)
- Topics: cli, cspell, spell-check
- Language: TypeScript
- Homepage:
- Size: 697 KB
- Stars: 12
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cspell-tool
[](https://npmjs.org/package/cspell-tool)
[](https://npmjs.org/package/cspell-tool)
[](https://github.com/jellydn/cspell-tool/blob/master/package.json)
[](https://twitter.com/jellydn)
Keep your project's spelling in check with cspell-tool.[![IT Man - Eliminate Typos in Your Code with Neovim [Vietnamese]](https://i.ytimg.com/vi/3IwMd77_P8E/hqdefault.jpg)](https://www.youtube.com/watch?v=3IwMd77_P8E)
## Table of Contents
- [Usage](#usage)
- [Features](#features)
- [Usage with Neovim and null-ls](#usage-with-neovim-and-null-ls)
- [Contributing](#contributing)
- [License](#license)
- [Acknowledgements](#acknowledgements)
- [Author](#author)
- [Show Your Support](#show-your-support)## Usage
Run the following command in your project's root directory to check for spelling issues:
```sh
npx cspell-tool@latest
```[](https://gyazo.com/b045cd1e89712ee2268fe27d9786fdfe)
## Features
- Supports common programming languages.
- Easily customizable via `cspell.json`.
- Extends your project-specific dictionary.### Usage with Neovim and null-ls
This assumes you have [`mason.nvim`](https://github.com/williamboman/mason.nvim) and [`null-ls.nvim`](https://github.com/nvimtools/none-ls.nvim) installed.
1. **Installing cSpell with Mason**
Make sure your `mason.nvim` configuration in your `init.lua` includes `cspell` under `ensure_installed`:
```lua
ensure_installed = {
-- code spell
"codespell",
"misspell",
"cspell",
},
```2. **Setting Up null-ls**
Add the following code to your `init.lua` to set up `null-ls` for spell checking:
```lua
local cspell = require("cspell")
local ok, none_ls = pcall(require, "null-ls")
if not ok then
return
endlocal b = none_ls.builtins
local sources = {
-- spell check
b.diagnostics.codespell,
b.diagnostics.misspell,
-- cspell
cspell.diagnostics.with({
diagnostics_postprocess = function(diagnostic)
diagnostic.severity = vim.diagnostic.severity["HINT"]
end,
}),
cspell.code_actions,
}return {
sources = sources,
debounce = 200,
debug = true,
}
```More details can be found in [`cspell example config with lazyvim`](./cspell.lua).
[](https://gyazo.com/99f48ffbd1d3577d45e3474a98801120)
## Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request## License
Distributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.
## Acknowledgements
- [zx](https://github.com/google/zx) for making scripting easier.
- [cspell](https://github.com/streetsidesoftware/cspell) for being the backbone of this tool.
- [cspell.nvim](https://github.com/davidmh/cspell.nvim) a companion plugin for null-ls, adding support for CSpell diagnostics and code actions.## Author
👤 **Huynh Duc Dung**
- Website: [productsway.com](https://productsway.com)
- Twitter: [@jellydn](https://twitter.com/jellydn)
- GitHub: [@jellydn](https://github.com/jellydn)## Show Your Support
If this guide has been helpful, please give it a ⭐️.
[](https://ko-fi.com/dunghd)
[](https://paypal.me/dunghd)
[](https://www.buymeacoffee.com/dunghd)