1
0
Fork 0

nvim packer and init update

This commit is contained in:
Von Random 2022-12-26 01:31:15 +02:00
parent aeb129a621
commit b7698eab01
4 changed files with 45 additions and 24 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
doom/config.el doom/config.el
nvim/plugin/packer_compiled.lua

View file

@ -10,8 +10,7 @@ end
-- some unmaps -- some unmaps
unmap(' ') unmap(' ')
unmap('q') unmap('q')
map('', '<F1>', '<Esc>') unmap('<F1>')
map('!', '<F1>', '<Esc>')
-- option control -- option control
map('n', '<Leader>c', ':setlocal cursorline!<CR>') map('n', '<Leader>c', ':setlocal cursorline!<CR>')

17
nvim/lua/packer_init.lua Normal file
View file

@ -0,0 +1,17 @@
local ensure_packer = function()
local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system {'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
require('packer').startup(plugins)
if packer_bootstrap then
require('packer').sync()
return true
end
return false

View file

@ -1,40 +1,44 @@
local ensure_packer = function() -- [[ plugins list ]]
local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' plugins = function(use)
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
require('packer').startup(function(use)
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
use 'lifepillar/vim-gruvbox8'
use 'lifepillar/vim-gruvbox8'
use 'hoob3rt/lualine.nvim'
use 'mhinz/vim-signify' use 'mhinz/vim-signify'
use 'tpope/vim-fugitive' use 'tpope/vim-fugitive'
use 'tpope/vim-rsi' use 'tpope/vim-rsi'
use 'tpope/vim-vinegar' use 'tpope/vim-vinegar'
use 'hoob3rt/lualine.nvim' use 'nvim-lua/plenary.nvim'
use 'nvim-telescope/telescope.nvim'
use { use {
'w0rp/ale', 'w0rp/ale',
ft = { 'sh', 'zsh', 'lua', 'python' }, ft = { 'sh', 'zsh', 'lua', 'python' },
cmd = 'ALEEnable' cmd = 'ALEEnable'
} }
end)
if packer_bootstrap then
require('packer').sync()
return
end end
require('lualine').setup { options = { icons_enabled = false } } --[[ init packer if missing ]]
if require('packer_init') then return end
--[[ plugins config ]]
require('lualine').setup {
options = {
icons_enabled = false,
section_separators = { left = nil, right = nil },
component_separators = { left = '|', right = '|' }
}
}
--[[ telescope maps ]]
map('n', '<Leader>ff', '<cmd>Telescope find_files<CR>')
map('n', '<Leader>fb', '<cmd>Telescope buffers<CR>')
--[[ theme ]]
vim.o.bg = 'dark' vim.o.bg = 'dark'
vim.o.termguicolors = true vim.o.termguicolors = true
vim.g.gruvbox_transp_bg = 1 vim.g.gruvbox_transp_bg = 1
vim.g.gruvbox_plugin_hi_groups = 1 vim.g.gruvbox_plugin_hi_groups = 1
vim.g.gruvbox_filetype_hi_groups = 1 vim.g.gruvbox_filetype_hi_groups = 1
vim.cmd('colorscheme gruvbox8')
vim.cmd [[colorscheme gruvbox8]]