{"id":15673927,"url":"https://github.com/dmtrkovalenko/caps-word.nvim","last_synced_at":"2025-05-05T21:44:58.677Z","repository":{"id":250762820,"uuid":"835359635","full_name":"dmtrKovalenko/caps-word.nvim","owner":"dmtrKovalenko","description":"Much better way to type SCREAMING_SNAKE_CASE words aka constants ","archived":false,"fork":false,"pushed_at":"2024-07-31T17:39:14.000Z","size":841,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T21:16:29.765Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/dmtrKovalenko.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":"2024-07-29T17:10:54.000Z","updated_at":"2025-03-29T16:02:15.000Z","dependencies_parsed_at":"2024-07-30T01:19:59.024Z","dependency_job_id":"ce1c53d6-04dd-4015-abc3-8bcca41748f2","html_url":"https://github.com/dmtrKovalenko/caps-word.nvim","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.21052631578947367","last_synced_commit":"564548ef557e4f873b2e67f0ea91f25042cedfe8"},"previous_names":["dmtrkovalenko/caps-word.nvim"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Fcaps-word.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Fcaps-word.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Fcaps-word.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmtrKovalenko%2Fcaps-word.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmtrKovalenko","download_url":"https://codeload.github.com/dmtrKovalenko/caps-word.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252582275,"owners_count":21771639,"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":"2024-10-03T15:43:06.631Z","updated_at":"2025-05-05T21:44:58.649Z","avatar_url":"https://github.com/dmtrKovalenko.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Caps Word for neovim\n\nAdoption of [QMK caps word feature](https://docs.qmk.fm/features/caps_word) for neovim. Provides a better experience for typing SCREAMING_SNAKE_CASE words automatically disables at the end of the word.\n\n\u003cdiv align=\"left\"\u003e\u003cp\u003e\n    \u003ca href=\"https://github.com/dmtrKovalenko/caps-word.nvim/pulse\"\u003e\n      \u003cimg alt=\"Last commit\" src=\"https://img.shields.io/github/last-commit/dmtrKovalenko/caps-word.nvim?style=for-the-badge\u0026logo=starship\u0026color=8bd5ca\u0026logoColor=D9E0EE\u0026labelColor=302D41\"/\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/dmtrKovalenko/caps-word.nvim/blob/main/LICENSE\"\u003e\n      \u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/dmtrKovalenko/caps-word.nvim?style=for-the-badge\u0026logo=starship\u0026color=ee999f\u0026logoColor=D9E0EE\u0026labelColor=302D41\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/dmtrKovalenko/caps-word.nvim\"\u003e\n      \u003cimg alt=\"Repo Size\" src=\"https://img.shields.io/github/repo-size/dmtrKovalenko/caps-word.nvim?color=%23DDB6F2\u0026label=SIZE\u0026logo=pagespeedinsights\u0026style=for-the-badge\u0026logoColor=D9E0EE\u0026labelColor=302D41\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://twitter.com/intent/follow?screen_name=neogoose_btw\"\u003e\n      \u003cimg alt=\"follow on Twitter\" src=\"https://img.shields.io/twitter/follow/neogoose_btw?style=for-the-badge\u0026user=neogoose_btw\u0026logo=x\u0026color=8aadf3\u0026logoColor=D9E0EE\u0026labelColor=302D41\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\nhttps://github.com/user-attachments/assets/be198aac-2c3a-4415-aff0-9f8913e45480\n\n## ✨ Features\n\nAutomatically disables at the end of the word using [vim.o.iskeyword](https://neovim.io/doc/user/options.html#'iskeyword')\n\n- Automatically disables on exiting insert mode\n- Replaces \"-\" with \"\\_\" so you can type snake-case words instead\n\n## 📦 Installation\n\nThe plugin is optimized for lazy loading. You can use any plugin manager you want.\n\nlazy.nvim:\n\n```lua\n  {\n    \"dmtrKovalenko/caps-word.nvim\",\n    lazy = true,\n    opts = {},\n    keys = {\n      {\n        mode = { \"i\", \"n\" },\n        \"\u003cC-s\u003e\",\n        \"\u003ccmd\u003elua require('caps-word').toggle()\u003cCR\u003e\",\n      },\n    },\n  },\n\n```\n\n## ⚙️ Configuration\n\nList of options you can use with default values:\n\n```lua\n{\n  -- Automatically changes `-` to `_` when caps word is activated\n  auto_underscore_inject = true,\n  -- Does not turn the caps mode off on number input\n  enable_numbers_in_caps = true,\n  -- Provide custom vim match regex for detecting end of the word (default is vim.o.iskeyword)\n  match_word_string = nil,\n  -- Callback when caps word mode is activated\n  enter_callback = nil,\n  -- Callback when caps word mode is deactivated\n  exit_callback = nil,\n}\n\n```\n\n## 🚀 Usage\n\nSimply use a keybinding to toggle the caps word mode, type your constant and press `\u003cspace\u003e`, or any other non-word character. The mode will be ✨ automatically ✨ disabled and you can continue typing as usual.\n\n![demo gif](./demo.gif)\n\n## ❓ FAQ\n\n### How can I see when the plugin turns on and off?\n\nYou can use the callbacks provided in the options to send a notifications or print messages in the status line.\n\n```lua\n  {\n    \"dmtrKovalenko/caps-word.nvim\",\n    dir = \"~/dev/caps-word.nvim\",\n    lazy = true,\n    opts = {\n      enter_callback = function()\n        vim.notify(\"Caps Word: On\", \"info\", { title = \"Caps Word\" })\n      end,\n      exit_callback = function()\n        vim.notify(\"Caps Word: Off\", \"info\", { title = \"Caps Word\" })\n      end,\n    },\n    keys = {\n      {\n        mode = { \"i\", \"n\" },\n        \"\u003cC-s\u003e\",\n        \"\u003ccmd\u003elua require('caps-word').toggle()\u003cCR\u003e\",\n      },\n    },\n  },\n\n```\n\n### Should I try it if I already use QMK caps word?\n\nNo, if you absolutely like it, but I did because:\n\n- QMK caps word does not know about your keybindings in insert mode and breaks them by changing the emitted keys\n- it can't disable itself on insert leave, which is useful\n- this plugin is buffer-local which helps when jumping between splits\n\n## 🏆 Self-promotion\n\nIf you like this little tool subscribe to my [Twitter/X](https://x.com/neogoose_btw) for more updates on my open source work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmtrkovalenko%2Fcaps-word.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmtrkovalenko%2Fcaps-word.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmtrkovalenko%2Fcaps-word.nvim/lists"}