Skip to content

Commit

Permalink
feat(nvim): add more qmk.nvim formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
Diaoul committed Jul 28, 2024
1 parent f15f7d1 commit 3c6c07f
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion .config/nvim/lua/diaoul/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
end,
})

-- QMK dynamic configurations
-- qmk.nvim dynamic configurations
vim.api.nvim_create_autocmd("BufEnter", {
group = augroup("qmk_corne"),
pattern = "*/corne/*/keymap.c",
Expand All @@ -112,3 +112,41 @@ vim.api.nvim_create_autocmd("BufEnter", {
})
end,
})
vim.api.nvim_create_autocmd("BufEnter", {
group = augroup("qmk_skeletyl"),
pattern = "*/skeletyl/*/keymap.c",
callback = function()
require("qmk").setup({
name = "LAYOUT_split_3x5_3",
auto_format_pattern = "*/skeletyl/*/keymap.c",
comment_preview = {
position = "none",
},
layout = {
"x x x x x _ _ _ x x x x x",
"x x x x x _ _ _ x x x x x",
"x x x x x _ _ _ x x x x x",
"_ _ _ x x x _ x x x _ _ _",
},
})
end,
})
vim.api.nvim_create_autocmd("BufEnter", {
group = augroup("qmk_kyria"),
pattern = "*/kyria/*/keymap.c",
callback = function()
require("qmk").setup({
name = "LAYOUT_split_3x6_5",
auto_format_pattern = "*/kyria/*/keymap.c",
comment_preview = {
position = "none",
},
layout = {
"x x x x x x _ _ _ _ _ x x x x x x",
"x x x x x x _ _ _ _ _ x x x x x x",
"x x x x x x x x _ x x x x x x x x",
"_ _ _ x x x x x _ x x x x x _ _ _",
},
})
end,
})

0 comments on commit 3c6c07f

Please sign in to comment.