fix(nvim): fix rainbow plugin
This commit is contained in:
parent
a7669555a8
commit
94e7f28282
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ sub/zsh/zshrc.d/*
|
||||
sub/vim/tmp/
|
||||
|
||||
sub/nvim/plugin
|
||||
sub/nvim/tmp/
|
||||
|
||||
2
Makefile
2
Makefile
@ -43,7 +43,7 @@ nvim:
|
||||
ln -s $(PWD)/sub/nvim ~/.config/nvim
|
||||
ln -s $(PWD)/functions/vim_askpass_helper ~/.local/bin
|
||||
git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
nvim +PackerCompile +PackerClean +PackerInstall +PackerUpdate +qall
|
||||
nvim +PackerCompile +PackerClean +PackerInstall +PackerUpdate +PackerUpdate +qall
|
||||
|
||||
ssh:
|
||||
cat $(PWD)/sub/ssh/config >> ~/.ssh/config
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
|
||||
local status, autosave = pcall(require, "gruvbox")
|
||||
if (not status) then return end
|
||||
|
||||
vim.api.nvim_exec('colorscheme gruvbox', true)
|
||||
|
||||
@ -1,10 +1,13 @@
|
||||
if (packer_plugins["vim-rainbow"] and packer_plugins["vim-rainbow"].loaded) then
|
||||
return
|
||||
end
|
||||
|
||||
vim.api.nvim_exec([[
|
||||
let g:rainbow_active = 1
|
||||
]], true)
|
||||
|
||||
vim.api.nvim_create_autocmd('FileType',
|
||||
{
|
||||
pattern = {"*"},
|
||||
command = 'RainbowToggle'
|
||||
})
|
||||
{
|
||||
pattern = {"*"},
|
||||
command = 'RainbowToggle'
|
||||
})
|
||||
|
||||
@ -47,22 +47,24 @@ vim.opt.swapfile = false
|
||||
vim.opt.undofile = true
|
||||
vim.opt.history = 1000
|
||||
vim.opt.undoreload = 1000
|
||||
vim.opt.backupdir = '~/.vim/tmp/backup/'
|
||||
vim.opt.undodir = '~/.vim/tmp/undo/'
|
||||
vim.opt.directory = '~/.vim/tmp/swap/'
|
||||
|
||||
local prefix = vim.env.XDG_CONFIG_HOME or vim.fn.expand("~/.config")
|
||||
|
||||
vim.opt.undodir = { prefix .. "/nvim/tmp/.undo//"}
|
||||
vim.opt.backupdir = {prefix .. "/nvim/tmp/.backup//"}
|
||||
vim.opt.directory = { prefix .. "/nvim/tmp/.swp//"}
|
||||
|
||||
vim.api.nvim_exec([[
|
||||
function! MakeDirIfNoExists(path)
|
||||
if !isdirectory(expand(a:path))
|
||||
call mkdir(expand(a:path), "p")
|
||||
endif
|
||||
endfunction
|
||||
function! MakeDirIfNoExists(path)
|
||||
if !isdirectory(expand(a:path))
|
||||
call mkdir(expand(a:path), "p")
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
" make this dirs if no exists previously
|
||||
silent! call MakeDirIfNoExists(&undodir)
|
||||
silent! call MakeDirIfNoExists(&backupdir)
|
||||
silent! call MakeDirIfNoExists(&directory)
|
||||
" make this dirs if no exists previously
|
||||
silent! call MakeDirIfNoExists(&undodir)
|
||||
silent! call MakeDirIfNoExists(&backupdir)
|
||||
silent! call MakeDirIfNoExists(&directory)
|
||||
]], true)
|
||||
|
||||
vim.opt.ffs = 'unix,mac'
|
||||
|
||||
@ -9,7 +9,7 @@ return require('packer').startup(function(use)
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||
}
|
||||
|
||||
use 'morhetz/gruvbox'
|
||||
use 'ellisonleao/gruvbox.nvim'
|
||||
use 'tpope/vim-surround'
|
||||
use 'tpope/vim-commentary'
|
||||
use 'ap/vim-css-color'
|
||||
@ -35,7 +35,7 @@ return require('packer').startup(function(use)
|
||||
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { 'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build', opt = false }
|
||||
requires = { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make', opt = false }
|
||||
}
|
||||
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user