add vim-plug and couple more settings

nix-components
pegasust 2022-08-14 01:57:04 -07:00
parent bdda612d66
commit 2d84a6c1d9
1 changed files with 27 additions and 1 deletions

View File

@ -1,8 +1,34 @@
-- Basic settings of vim
vim.cmd([[
set number relativenumber
set tabstop=4 softtabstop=4
set expandtab
set shiftwidth=4
set smartindent
set exrc
set incsearch
set scrolloff=7
set signcolumn=yes
set colorcolumn=80
set background=light
]])
vim.opt.termguicolors = true
-- vim-plug
vim.cmd([[
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
]])
local Plug = vim.fn['plug#']
vim.call('plug#begin', '~/.config/nvim/plugged')
Plug('nvim-lua/plenary.nvim')
Plug('nvim-telescope/telescope.nvim', {tag = '0.1.0'})
Plug('gruvbox-community/gruvbox')
vim.call('plug#end')
vim.cmd.colorscheme('gruvbox')