diff --git a/.gitignore b/.gitignore index b2ccb21..ef5a10d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /lazy-lock.json +/_full_feature diff --git a/README.md b/README.md index dfe2746..9146be5 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,11 @@ Just clone this repository into directory `~/.config/nvim/` and start neovim. [l ``` git clone ~/.config/nvim ``` + +By default, this config will only include a few plugins, which suit for mataining other than editing frequently. + +If you want to use the full feature this config provided, create a file named `_full_feature` under the root of this repo (usually `~/.config/nvim`. + +``` +touch ~/.config/nvim/_full_feature +``` diff --git a/init.lua b/init.lua index dfe497a..acf7272 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,11 @@ vim.keymap.set("n", "", "bdelete", { silent = true }) vim.g.mapleader = " " vim.g.maplocalleader = " " -full_feature = false +function file_exists(name) + local f=io.open(name,"r") + if f~=nil then io.close(f) return true else return false end +end +full_feature = file_exists(vim.fn.stdpath("config") .. "/_full_feature") -- Use lazy.nvim as plugin manager, and load plugin's config local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"