From 48da3203bf2b55afd3d6bb8031a4b281af4b7a29 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 23 Jun 2024 19:12:43 +0200 Subject: [PATCH] docs: shorten install instructions --- docs/configuration/index.md | 7 ++++++- docs/installation.mdx | 40 +++++++++++++------------------------ lua/tpl/install.lua | 20 +++++++------------ 3 files changed, 27 insertions(+), 40 deletions(-) diff --git a/docs/configuration/index.md b/docs/configuration/index.md index 56d91ca..475669e 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -11,8 +11,13 @@ sidebar_position: 5 { root = vim.fn.stdpath("data") .. "/lazy", -- directory where plugins will be installed defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. lazy = false, -- should plugins be lazy-loaded? - version = nil, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = nil, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver -- default `cond` you can use to globally disable a lot of plugins -- when running inside vscode for example cond = nil, ---@type boolean|fun(self:LazyPlugin):boolean|nil diff --git a/docs/installation.mdx b/docs/installation.mdx index 06be076..b733ff8 100644 --- a/docs/installation.mdx +++ b/docs/installation.mdx @@ -44,10 +44,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- Make sure to setup `mapleader` before loading lazy.nvim +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct -vim.g.maplocalleader = "\\" -- Same for `maplocalleader` +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ @@ -57,18 +58,11 @@ require("lazy").setup({ { import = "plugins" }, }, -- highlight-end - defaults = { - -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. - -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. - lazy = false, - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = false, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - }, + -- Configure any other settings here. See the documentation for more details. -- colorscheme that will be used when installing plugins. install = { colorscheme = { "habamax" } }, - checker = { enabled = true }, -- automatically check for plugin updates + -- automatically check for plugin updates + checker = { enabled = true }, }) ``` @@ -106,10 +100,11 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- Make sure to setup `mapleader` before loading lazy.nvim +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct -vim.g.maplocalleader = "\\" -- Same for `maplocalleader` +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ @@ -118,18 +113,11 @@ require("lazy").setup({ -- add your plugins here }, -- highlight-end - defaults = { - -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. - -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. - lazy = false, - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = false, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - }, + -- Configure any other settings here. See the documentation for more details. -- colorscheme that will be used when installing plugins. install = { colorscheme = { "habamax" } }, - checker = { enabled = true }, -- automatically check for plugin updates + -- automatically check for plugin updates + checker = { enabled = true }, }) ``` diff --git a/lua/tpl/install.lua b/lua/tpl/install.lua index d6d9f56..2ad800d 100644 --- a/lua/tpl/install.lua +++ b/lua/tpl/install.lua @@ -6,26 +6,20 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- Make sure to setup `mapleader` before loading lazy.nvim +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. -- This is also a good place to setup other settings (vim.opt) -vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct -vim.g.maplocalleader = "\\" -- Same for `maplocalleader` +vim.g.mapleader = " " +vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ -- highlight-start spec = {}, -- highlight-end - defaults = { - -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. - -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. - lazy = false, - -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, - -- have outdated releases, which may break your Neovim install. - version = false, -- always use the latest git commit - -- version = "*", -- try installing the latest stable version for plugins that support semver - }, + -- Configure any other settings here. See the documentation for more details. -- colorscheme that will be used when installing plugins. install = { colorscheme = { "habamax" } }, - checker = { enabled = true }, -- automatically check for plugin updates + -- automatically check for plugin updates + checker = { enabled = true }, })