fix(nvim): fix rainbow plugin

This commit is contained in:
TheK4n 2023-01-15 19:57:52 +03:00
parent a7669555a8
commit 94e7f28282
6 changed files with 28 additions and 20 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@ sub/zsh/zshrc.d/*
sub/vim/tmp/
sub/nvim/plugin
sub/nvim/tmp/

View File

@ -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

View File

@ -1,3 +1,5 @@
local status, autosave = pcall(require, "gruvbox")
if (not status) then return end
vim.api.nvim_exec('colorscheme gruvbox', true)

View File

@ -1,3 +1,6 @@
if (packer_plugins["vim-rainbow"] and packer_plugins["vim-rainbow"].loaded) then
return
end
vim.api.nvim_exec([[
let g:rainbow_active = 1

View File

@ -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)
function! MakeDirIfNoExists(path)
if !isdirectory(expand(a:path))
call mkdir(expand(a:path), "p")
endif
endfunction
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'

View File

@ -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' }