switch to chezmoi
This commit is contained in:
parent
3c5d00dbf3
commit
a8b0acd4db
76 changed files with 27 additions and 531 deletions
3
dot_config/nvim/init.lua
Normal file
3
dot_config/nvim/init.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
require('settings')
|
||||
require('maps')
|
||||
require('plugins')
|
31
dot_config/nvim/lua/maps.lua
Normal file
31
dot_config/nvim/lua/maps.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
vim.g.mapleader = ' '
|
||||
|
||||
function map(mode, key, action)
|
||||
vim.api.nvim_set_keymap(mode, key, action, {noremap = true})
|
||||
end
|
||||
function unmap(key)
|
||||
map('', key, '')
|
||||
end
|
||||
|
||||
-- some unmaps
|
||||
unmap(' ')
|
||||
unmap('q')
|
||||
unmap('<F1>')
|
||||
|
||||
-- option control
|
||||
map('n', '<Leader>c', ':setlocal cursorline!<CR>')
|
||||
map('n', '<Leader>l', ':setlocal list!<CR>')
|
||||
map('n', '<Leader>w', ':setlocal wrap!<CR>')
|
||||
|
||||
-- search
|
||||
map('n', '<Leader>/', ':noh<CR>')
|
||||
|
||||
-- copy / paste
|
||||
map('n', '<Leader>y', '"+y')
|
||||
map('n', '<Leader>d', '"+d')
|
||||
map('n', '<Leader>p', '"+p')
|
||||
map('n', '<Leader>P', '"+P')
|
||||
|
||||
-- keymap switch
|
||||
map('!', '<C-Space>', '<C-^>')
|
||||
map('!', '<C-@>', '<C-^>')
|
55
dot_config/nvim/lua/plugins.lua
Normal file
55
dot_config/nvim/lua/plugins.lua
Normal file
|
@ -0,0 +1,55 @@
|
|||
-- [[ plugins bootstrap ]]
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
local lazyurl = "https://github.com/folke/lazy.nvim.git"
|
||||
local lazycmd = {"git", "clone", "--filter=blob:none", "--branch=stable", lazyurl, lazypath}
|
||||
if not vim.loop.fs_stat(lazypath) then vim.fn.system(lazycmd) end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
--[[ plugins list ]]
|
||||
require('lazy').setup {
|
||||
{'ellisonleao/gruvbox.nvim', priority = 1000, config = true},
|
||||
{'w0rp/ale', cmd = 'ALEEnable', ft = {'bash', 'go', 'lua', 'python', 'sh', 'zsh'}},
|
||||
'smoka7/hop.nvim',
|
||||
'kdheepak/lazygit.nvim',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
'lewis6991/gitsigns.nvim',
|
||||
'lifepillar/vim-cheat40',
|
||||
'nvim-lualine/lualine.nvim',
|
||||
'tpope/vim-rsi',
|
||||
'tpope/vim-vinegar',
|
||||
{'nvim-lua/plenary.nvim', lazy = true},
|
||||
}
|
||||
|
||||
--[[ plugin configs and maps ]]
|
||||
require('hop').setup()
|
||||
require('gitsigns').setup()
|
||||
require('gruvbox').setup {
|
||||
italic = {strings = false},
|
||||
terminal_colors = true
|
||||
}
|
||||
require('nvim-treesitter.configs').setup {
|
||||
highlight = {
|
||||
enable = true
|
||||
}
|
||||
}
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
icons_enabled = false,
|
||||
section_separators = {left = nil, right = nil},
|
||||
component_separators = {left = "\u{2022}", right = "\u{2022}"}
|
||||
}
|
||||
}
|
||||
|
||||
map('n', '<Leader>f', '<cmd>HopWord<CR>')
|
||||
map('n', '<Leader>g', '<cmd>LazyGit<CR>')
|
||||
map('n', '<Leader>L', '<cmd>Lazy<CR>')
|
||||
map('n', '<Leader>?', '<cmd>Cheat40<CR>')
|
||||
map('n', '<Leader>.', '<cmd>Telescope git_files<CR>')
|
||||
map('n', '<Leader>,', '<cmd>Telescope buffers<CR>')
|
||||
|
||||
--[[ theme ]]
|
||||
vim.o.termguicolors = true
|
||||
vim.o.bg = 'dark'
|
||||
|
||||
vim.cmd [[colorscheme gruvbox]]
|
30
dot_config/nvim/lua/settings.lua
Normal file
30
dot_config/nvim/lua/settings.lua
Normal file
|
@ -0,0 +1,30 @@
|
|||
vim.o.modeline = false
|
||||
vim.o.foldmethod = 'marker'
|
||||
vim.o.cursorline = false
|
||||
vim.o.colorcolumn = '80'
|
||||
vim.o.relativenumber = true
|
||||
vim.o.breakindent = true
|
||||
vim.o.clipboard = 'unnamedplus'
|
||||
vim.o.statusline = '[%F] %R%H%W%M %=[%{&fenc}/%{&ff}] %y [%4l/%L:%3v]'
|
||||
|
||||
vim.o.list = true
|
||||
vim.o.listchars = 'tab:|_,nbsp:x,trail:*'
|
||||
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
|
||||
vim.o.scrolloff = 3
|
||||
vim.o.sidescrolloff = 15
|
||||
|
||||
vim.o.tabstop = 8
|
||||
vim.o.softtabstop = 3
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.expandtab = true
|
||||
|
||||
vim.o.keymap = 'russian-jcukenwintype'
|
||||
vim.o.iminsert = 0
|
||||
vim.o.imsearch = 0
|
||||
|
||||
local fsize = '11'
|
||||
if vim.loop.os_uname().sysname == 'Darwin' then fsize = '14' end
|
||||
vim.o.guifont = 'Vascadia Mono PL:h' .. fsize
|
Loading…
Add table
Add a link
Reference in a new issue