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/vim/tmp/
|
||||||
|
|
||||||
sub/nvim/plugin
|
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)/sub/nvim ~/.config/nvim
|
||||||
ln -s $(PWD)/functions/vim_askpass_helper ~/.local/bin
|
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
|
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:
|
ssh:
|
||||||
cat $(PWD)/sub/ssh/config >> ~/.ssh/config
|
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)
|
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([[
|
vim.api.nvim_exec([[
|
||||||
let g:rainbow_active = 1
|
let g:rainbow_active = 1
|
||||||
]], true)
|
]], true)
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('FileType',
|
vim.api.nvim_create_autocmd('FileType',
|
||||||
{
|
{
|
||||||
pattern = {"*"},
|
pattern = {"*"},
|
||||||
command = 'RainbowToggle'
|
command = 'RainbowToggle'
|
||||||
})
|
})
|
||||||
|
|||||||
@ -47,22 +47,24 @@ vim.opt.swapfile = false
|
|||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.history = 1000
|
vim.opt.history = 1000
|
||||||
vim.opt.undoreload = 1000
|
vim.opt.undoreload = 1000
|
||||||
vim.opt.backupdir = '~/.vim/tmp/backup/'
|
|
||||||
vim.opt.undodir = '~/.vim/tmp/undo/'
|
local prefix = vim.env.XDG_CONFIG_HOME or vim.fn.expand("~/.config")
|
||||||
vim.opt.directory = '~/.vim/tmp/swap/'
|
|
||||||
|
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([[
|
vim.api.nvim_exec([[
|
||||||
function! MakeDirIfNoExists(path)
|
function! MakeDirIfNoExists(path)
|
||||||
if !isdirectory(expand(a:path))
|
if !isdirectory(expand(a:path))
|
||||||
call mkdir(expand(a:path), "p")
|
call mkdir(expand(a:path), "p")
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" make this dirs if no exists previously
|
||||||
" make this dirs if no exists previously
|
silent! call MakeDirIfNoExists(&undodir)
|
||||||
silent! call MakeDirIfNoExists(&undodir)
|
silent! call MakeDirIfNoExists(&backupdir)
|
||||||
silent! call MakeDirIfNoExists(&backupdir)
|
silent! call MakeDirIfNoExists(&directory)
|
||||||
silent! call MakeDirIfNoExists(&directory)
|
|
||||||
]], true)
|
]], true)
|
||||||
|
|
||||||
vim.opt.ffs = 'unix,mac'
|
vim.opt.ffs = 'unix,mac'
|
||||||
|
|||||||
@ -9,7 +9,7 @@ return require('packer').startup(function(use)
|
|||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||||
}
|
}
|
||||||
|
|
||||||
use 'morhetz/gruvbox'
|
use 'ellisonleao/gruvbox.nvim'
|
||||||
use 'tpope/vim-surround'
|
use 'tpope/vim-surround'
|
||||||
use 'tpope/vim-commentary'
|
use 'tpope/vim-commentary'
|
||||||
use 'ap/vim-css-color'
|
use 'ap/vim-css-color'
|
||||||
@ -35,7 +35,7 @@ return require('packer').startup(function(use)
|
|||||||
|
|
||||||
use {
|
use {
|
||||||
'nvim-telescope/telescope.nvim',
|
'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' }
|
use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user