{"id":13412109,"url":"https://github.com/sontungexpt/stcursorword","last_synced_at":"2025-04-22T20:22:16.926Z","repository":{"id":196357246,"uuid":"695822600","full_name":"sontungexpt/stcursorword","owner":"sontungexpt","description":"A concise, precise, and high-performance cursor word highlighting plugin for Neovim, implemented in Lua.","archived":false,"fork":false,"pushed_at":"2024-07-28T11:14:13.000Z","size":920,"stargazers_count":76,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T18:36:29.308Z","etag":null,"topics":["cursorline","cursorword","lua","neovim","neovim-colorscheme","neovim-dotfiles","neovim-plugin","nvim","plugin"],"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/sontungexpt.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}},"created_at":"2023-09-24T10:38:22.000Z","updated_at":"2025-03-13T13:56:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"fe1e5098-17a1-4a7b-a8a8-e8b8fe7dcfb9","html_url":"https://github.com/sontungexpt/stcursorword","commit_stats":null,"previous_names":["sontungexpt/stcursorword"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fstcursorword","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fstcursorword/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fstcursorword/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sontungexpt%2Fstcursorword/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sontungexpt","download_url":"https://codeload.github.com/sontungexpt/stcursorword/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316233,"owners_count":21410501,"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":["cursorline","cursorword","lua","neovim","neovim-colorscheme","neovim-dotfiles","neovim-plugin","nvim","plugin"],"created_at":"2024-07-30T20:01:21.085Z","updated_at":"2025-04-22T20:22:16.907Z","avatar_url":"https://github.com/sontungexpt.png","language":"Lua","funding_links":[],"categories":["Bars and Lines","Lua"],"sub_categories":["Cursorline"],"readme":"## STCursorword\n\nA concise, precise, and high-performance cursor word highlighting plugin for Neovim, implemented in Lua.\n\n- ❓ [Reasons for creating](#reason)\n- 👀 [Installation](#installation)\n- 💻 [Configuration](#configuration)\n- 😆 [Usage](#usage)\n- 😁 [Contributing](#contributing)\n- ✌️ [License](#license)\n\n## Reasons \u003ca name = \"reason\"\u003e\u003c/a\u003e for creating this plugin\n\n🎉 There are many plugins that do this, but none of them support disabling for certain filetypes. So, If I accidentally open a binary file such as .png file it gives me an error\n\n🛠️ Other plugins always reset highlighting when the cursor moves, whereas this plugin does not. It only resets the highlighting when the cursor moves to a new word.\n\nFor example, if the cursor is on the character `h` in the word `hello`, and you move the cursor to `e`, other plugins will remove the highlighting from the word `hello` and then highlight it again, even though the cursor is still on that word. Consequently, when you move to the `o`, it will undergo highlighting five times.\n\n🍕 Easily to disable and enable when needed.\n\n🚀 And a subjective reason is that I used to use the [nvim-cursorline](https://github.com/yamatsum/nvim-cursorline) plugin before, but I don't use the cursorline feature. Another plugins i found that [nvim-cursorword](https://github.com/xiyaowong/nvim-cursorword), it works quite similar to this plugin, but its setup method is not like the plugins I usually use. So this is the reason for this plugin.\n\n## Preview\n\nhttps://github.com/sontungexpt/stcursorword/assets/92097639/2beb58cf-d6f9-44f9-979d-dea280a52b4d\n\nCompare with nvim cursorline\n\nNvim cursorline error when accidentally open a binary file\n\n![nvim-cursorline error](./docs/readme/compare1.png)\n\nThis plugin fixed this error.\n\nhttps://github.com/sontungexpt/stcursorword/assets/92097639/d00be822-dfcf-47e8-8e97-a2a6ae0b6abf\n\n## Installation\n\n```lua\n    -- lazy\n    {\n        \"sontungexpt/stcursorword\",\n        event = \"VeryLazy\",\n        config = true,\n    },\n```\n\n## Configuration\n\n```lua\n    -- default configuration\n    require(\"stcursorword\").setup({\n        max_word_length = 100, -- if cursorword length \u003e max_word_length then not highlight\n        min_word_length = 2, -- if cursorword length \u003c min_word_length then not highlight\n        excluded = {\n            filetypes = {\n                \"TelescopePrompt\",\n            },\n            buftypes = {\n                -- \"nofile\",\n                -- \"terminal\",\n            },\n            patterns = { -- the pattern to match with the file path\n                -- \"%.png$\",\n                -- \"%.jpg$\",\n                -- \"%.jpeg$\",\n                -- \"%.pdf$\",\n                -- \"%.zip$\",\n                -- \"%.tar$\",\n                -- \"%.tar%.gz$\",\n                -- \"%.tar%.xz$\",\n                -- \"%.tar%.bz2$\",\n                -- \"%.rar$\",\n                -- \"%.7z$\",\n                -- \"%.mp3$\",\n                -- \"%.mp4$\",\n            },\n        },\n        highlight = {\n            underline = true,\n            fg = nil,\n            bg = nil,\n        },\n    })\n```\n\n## Usage\n\n`:Cursorword` command\n\n| **Args**  | **Description**                             |\n| --------- | ------------------------------------------- |\n| `toggle`  | Toggle highlight the word under the cursor  |\n| `enable`  | Enable highlight the word under the cursor  |\n| `disable` | Disable highlight the word under the cursor |\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsontungexpt%2Fstcursorword","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsontungexpt%2Fstcursorword","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsontungexpt%2Fstcursorword/lists"}