diff --git a/README.md b/README.md index 246147f2..bf2d374e 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,8 @@ possible keymaps starting with ``. | `nl` | [noice.nvim](https://github.com/folke/noice.nvim.git) Noice Last Message | **n** | | `nh` | [noice.nvim](https://github.com/folke/noice.nvim.git) Noice History | **n** | | `na` | [noice.nvim](https://github.com/folke/noice.nvim.git) Noice All | **n** | +| `` | [noice.nvim](https://github.com/folke/noice.nvim.git) Scroll forward | **n** | +| `` | [noice.nvim](https://github.com/folke/noice.nvim.git) Scroll backward | **n** | | `nd` | [nvim-notify](https://github.com/rcarriga/nvim-notify.git) Delete all Notifications | **n** | | `sr` | [nvim-spectre](https://github.com/windwp/nvim-spectre.git) Replace in files (Spectre) | **n** | | `qs` | [persistence.nvim](https://github.com/folke/persistence.nvim.git) Restore Session | **n** | @@ -196,10 +198,11 @@ possible keymaps starting with ``. +
Core Plugins + - [alpha-nvim](https://github.com/goolord/alpha-nvim) - [catppuccin](https://github.com/catppuccin/nvim) - [cmp-buffer](https://github.com/hrsh7th/cmp-buffer) -- [cmp-emoji](https://github.com/hrsh7th/cmp-emoji) - [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp) - [cmp-path](https://github.com/hrsh7th/cmp-path) - [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip) @@ -209,7 +212,6 @@ possible keymaps starting with ``. - [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) - [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) - [lazy.nvim](https://github.com/folke/lazy.nvim) -- [LazyVim](https://github.com/LazyVim/LazyVim) - [leap.nvim](https://github.com/ggandor/leap.nvim) - [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) - [LuaSnip](https://github.com/L3MON4D3/LuaSnip) @@ -247,4 +249,64 @@ possible keymaps starting with ``. - [vim-startuptime](https://github.com/dstein64/vim-startuptime) - [which-key.nvim](https://github.com/folke/which-key.nvim) +
+ +
Extras: lang.json + +To use this, add it to your **lazy.nvim** imports: + +```lua +require("lazy").setup({ + spec = { + { "folke/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.json" }, + { import = "plugins" }, + }, +}) +``` + +- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) +- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) +- [schemastore.nvim](https://github.com/b0o/schemastore.nvim) + +
+ +
Extras: lang.typescript + +To use this, add it to your **lazy.nvim** imports: + +```lua +require("lazy").setup({ + spec = { + { "folke/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.lang.typescript" }, + { import = "plugins" }, + }, +}) +``` + +- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) +- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) +- [typescript.nvim](https://github.com/jose-elias-alvarez/typescript.nvim) + +
+ +
Extras: ui.mini-starter + +To use this, add it to your **lazy.nvim** imports: + +```lua +require("lazy").setup({ + spec = { + { "folke/LazyVim", import = "lazyvim.plugins" }, + { import = "lazyvim.plugins.extras.ui.mini-starter" }, + { import = "plugins" }, + }, +}) +``` + +- [mini.starter](https://github.com/echasnovski/mini.starter) + +
+ diff --git a/lua/lazyvim/util/build.lua b/lua/lazyvim/util/build.lua index 4b28c0b5..1d629afa 100644 --- a/lua/lazyvim/util/build.lua +++ b/lua/lazyvim/util/build.lua @@ -1,9 +1,11 @@ -- Ugly code to generate some things for the readme +local Util = require("lazy.util") local M = {} +local root = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":h:h:h:h") +---@return ReadmeBlock function M.keymaps() - local root = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":h:h:h:h") local keymap_set = vim.keymap.set ---@type table local keymaps = {} @@ -42,7 +44,7 @@ function M.keymaps() group = "Plugins" - require("lazy.util").foreach(require("lazy.core.config").plugins, function(name, plugin) + Util.foreach(require("lazy.core.config").plugins, function(name, plugin) for _, key in ipairs(plugin.keys or {}) do if type(key) == "table" and key.desc then local desc = key.desc or "" @@ -85,14 +87,58 @@ function M.keymaps() lines[#lines + 1] = "" lines[#lines + 1] = "" end - return table.concat(lines, "\n") + return { content = table.concat(lines, "\n") } end function M.update() local Docs = require("lazy.docs") - Docs.plugins() - Docs.save({ keymaps = M.keymaps() }) - vim.cmd.checktime() + ---@type table + local data = { + keymaps = M.keymaps(), + } + + local core = require("lazy.core.plugin").Spec.new({ import = "lazyvim.plugins" }) + + ---@type string[] + local plugins = { + "
Core Plugins", + "", + Docs.plugins(core.plugins).content, + "", + "
", + "", + } + + Util.walk(root .. "/lua/lazyvim/plugins/extras", function(path, name, type) + if type == "file" and name:find("%.lua$") then + local modname = path:gsub(".*/lua/", ""):gsub("/", "."):gsub("%.lua$", "") + local spec = require("lazy.core.plugin").Spec.new({ import = modname }) + spec:fix_disabled() + vim.list_extend(plugins, { + ("
Extras: %s"):format(modname:gsub(".*extras%.", "")), + "", + ([[ +To use this, add it to your **lazy.nvim** imports: + +```lua +require("lazy").setup({ + spec = { + { "folke/LazyVim", import = "lazyvim.plugins" }, + { import = "%s" }, + { import = "plugins" }, + }, +}) +``` +]]):format(modname), + Docs.plugins(spec.plugins).content, + "", + "
", + "", + }) + end + end) + data.plugins = { content = table.concat(plugins, "\n") } + Docs.save(data) end M.update()