Skip to content

Commit

Permalink
refactor: improve lazy config for spread.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
Allaman committed Jul 31, 2023
1 parent c039d9e commit 7d351ee
Showing 1 changed file with 16 additions and 20 deletions.
36 changes: 16 additions & 20 deletions lua/core/plugins/spread.lua
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
-- TODO: alternative: https://github.com/Wansmer/treesj
local M = {
return {
"aarondiel/spread.nvim",
event = "InsertEnter",
}

function M.config()
local spread = require("spread")
local wk = require("which-key")
local default_options = { silent = true }
wk.register({
m = {
S = {
name = "Spread",
c = { spread.combine, "Combine" },
s = { spread.out, "Split" },
event = { "BufReadPre", "BufNewFile" },
config = function()
local spread = require("spread")
local wk = require("which-key")
local default_options = { silent = true }
wk.register({
m = {
S = {
name = "Spread",
c = { spread.combine, "Combine" },
s = { spread.out, "Split" },
},
},
},
}, { prefix = "<leader>", mode = "n", default_options })
end

return M
}, { prefix = "<leader>", mode = "n", default_options })
end,
}

0 comments on commit 7d351ee

Please sign in to comment.