check if a file exist to determine if full_feature
This commit is contained in:
parent
80b82caf95
commit
12b66a5eda
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
/lazy-lock.json
|
/lazy-lock.json
|
||||||
|
/_full_feature
|
||||||
|
|
|
@ -9,3 +9,11 @@ Just clone this repository into directory `~/.config/nvim/` and start neovim. [l
|
||||||
```
|
```
|
||||||
git clone <url of this repo> ~/.config/nvim
|
git clone <url of this repo> ~/.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
|
||||||
|
```
|
||||||
|
|
6
init.lua
6
init.lua
|
@ -24,7 +24,11 @@ vim.keymap.set("n", "<F3>", "<cmd>bdelete<CR>", { silent = true })
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.g.maplocalleader = " "
|
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
|
-- Use lazy.nvim as plugin manager, and load plugin's config
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
Loading…
Reference in a new issue