Skip to content

Commit

Permalink
feat: add keymap to config
Browse files Browse the repository at this point in the history
  • Loading branch information
tris203 committed Dec 1, 2023
1 parent 98c6b81 commit 5507afe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ The default config is below, but can be changed by passing a table in config wit
* leader is your current leader key (This will be automatic in future
* homerow is the numerical representation of the home row in your keyboard layout
* powerFingers contains which fingers are prefered for keystrokes, counted from a 0 index reading left to right. 0, 1, 2 ..9.
* Keyboard layout is the layout, currently on QWERTY is defined. More to follow
* keyboardLayout is the layout, currently only QWERTY is defined. More to follow
* keymap, duh

```lua
{
leader = " "
homerow = 2
powerFingers = { 2, 3, 6, 7 }
keyboardLayout = "qwerty"
keyboardLayout = "qwerty",
keymap = "<leader>hwt"
}
```

Expand Down
3 changes: 3 additions & 0 deletions lua/hawtkeys/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ function M.setup(config)
M.homerow = config.homerow or 2
M.powerFingers = config.powerFingers or { 2, 3, 6, 7 }
M.keyboardLayout = config.keyboardLayout or "qwerty"
M.keymap = config.keymap or "<leader>hwt"
vim.api.nvim_set_keymap('n', M.keymap, ':lua require("hawtkeys.ui").show()<CR>',
{ noremap = true, silent = true })
end

return M
1 change: 0 additions & 1 deletion plugin/hawtkeys.nivm/init.lua

This file was deleted.

0 comments on commit 5507afe

Please sign in to comment.