diff --git a/.config/nvim/lua/plugins/qmk.lua b/.config/nvim/lua/plugins/qmk.lua index 5ff708c7..d635d580 100644 --- a/.config/nvim/lua/plugins/qmk.lua +++ b/.config/nvim/lua/plugins/qmk.lua @@ -1,9 +1,3 @@ -local corne = { - "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 _ _ _", -} return { { "nvim-treesitter/nvim-treesitter", @@ -15,10 +9,17 @@ return { }, { "codethread/qmk.nvim", - opts = { - name = "corne", - layout = corne, - variant = "zmk", - }, + ft = "dts", + opts = function() + local corne = { + "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 _ _ _", + } + local o = { name = "corne", layout = corne, variant = "zmk" } + vim.keymap.set({ "n" }, "f", "QMKFormat", { desc = "Format keymap." }) + return o + end, }, }