From d38c6a5b97788b9cff3de64e59d76e7e3c207096 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 14 Feb 2025 23:10:05 +0800 Subject: [PATCH] docs(readme): update installation --- bundle/nvim-plug/README.md | 39 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/bundle/nvim-plug/README.md b/bundle/nvim-plug/README.md index 2de41cf2a..057558764 100644 --- a/bundle/nvim-plug/README.md +++ b/bundle/nvim-plug/README.md @@ -10,6 +10,9 @@ - [Intro](#intro) - [Features](#features) - [Usage](#usage) + - [Installation](#installation) + - [Setup nvim-plug](#setup-nvim-plug) + - [Add plugins](#add-plugins) - [Plugin Spec](#plugin-spec) - [Commands](#commands) - [Default UI](#default-ui) @@ -33,7 +36,39 @@ There is also a [Chinese introduction](https://wsdjeg.net/neovim-plugin-manager- ## Usage -setup nvim-plug: +### Installation + +Clone this repository. + +``` +git clone https://github.com/wsdjeg/nvim-plug.git D:/bundle_dir/wsdjeg/nvim-plug +``` + +and append the path of this repository to your neovim neovim runtimepath option: + +init.lua + +```lua +vim.opt.runtimepath:append('D:/bundle_dir/wsdjeg/nvim-plug') +``` + +To install nvim-plug automatically: + +```lua +if vim.fn.isdirectory('D:/bundle_dir/wsdjeg/nvim-plug') == 0 then + vim.fn.system({ + 'git', + 'clone', + '--depth', + '1', + 'https://github.com/wsdjeg/nvim-plug.git', + 'D:/bundle_dir/wsdjeg/nvim-plug', + }) +end +vim.opt.runtimepath:append('D:/bundle_dir/wsdjeg/nvim-plug') +``` + +### Setup nvim-plug ```lua require('plug').setup({ @@ -57,7 +92,7 @@ require('plug').setup({ }) ``` -add plugins: +### Add plugins ```lua require('plug').add({