Skip to content

Commit

Permalink
feat: added leader-L to show the LazyVim changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 13, 2023
1 parent 8f9f76a commit 9387ab3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/lazyvim/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ if vim.fn.has("nvim-0.9.0") == 1 then
map("n", "<leader>ui", vim.show_pos, { desc = "Inspect Pos" })
end

-- LazyVim Changelog
map("n", "<leader>L", Util.changelog, {desc = "LazyVim Changelog"})

-- floating terminal
local lazyterm = function() Util.float_term(nil, { cwd = Util.get_root() }) end
map("n", "<leader>ft", lazyterm, { desc = "Terminal (root dir)" })
Expand Down
8 changes: 8 additions & 0 deletions lua/lazyvim/util/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,4 +277,12 @@ function M.on_load(name, fn)
end
end

function M.changelog()
local lv = require("lazy.core.config").plugins.LazyVim
local float = require("lazy.util").open(lv.dir .. "/CHANGELOG.md")
vim.wo[float.win].spell = false
vim.wo[float.win].wrap = false
vim.diagnostic.disable(float.buf)
end

return M

0 comments on commit 9387ab3

Please sign in to comment.