71 lines
1.7 KiB
Lua
71 lines
1.7 KiB
Lua
vim.g.mapleader = ' '
|
|
|
|
vim.opt.shortmess:append('I')
|
|
vim.opt.nu = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.wrap = true
|
|
vim.opt.scrolloff = 8
|
|
vim.opt.laststatus = 2
|
|
vim.opt.colorcolumn = '120'
|
|
vim.opt.signcolumn = 'no'
|
|
vim.opt.tabstop = 4
|
|
vim.opt.softtabstop = 4
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.expandtab = true
|
|
vim.opt.smartindent = true
|
|
vim.opt.smarttab = true
|
|
vim.opt.swapfile = false
|
|
vim.opt.backup = false
|
|
vim.opt.undodir = os.getenv('HOME') .. '/.vim/undodir'
|
|
vim.opt.undofile = true
|
|
vim.opt.hlsearch = true
|
|
vim.opt.incsearch = true
|
|
vim.opt.winborder = 'single'
|
|
|
|
vim.cmd.colorscheme'habamax'
|
|
|
|
vim.keymap.set('v', 'K', ':m \'<-2<CR>gv=gv')
|
|
vim.keymap.set('v', 'J', ':m \'>+1<CR>gv=gv')
|
|
|
|
vim.keymap.set('n', '<C-d>', '<C-d>zz')
|
|
vim.keymap.set('n', '<C-u>', '<C-u>zz')
|
|
|
|
vim.keymap.set('n', 'n', 'nzzzv')
|
|
vim.keymap.set('n', 'N', 'Nzzzv')
|
|
|
|
vim.diagnostic.config({
|
|
virtual_text = true,
|
|
severity_sort = true,
|
|
float = {
|
|
border = 'single',
|
|
source = 'if_many',
|
|
},
|
|
})
|
|
|
|
local gh = function(x) return 'https://github.com/' .. x end
|
|
|
|
vim.pack.add {
|
|
{
|
|
src=gh('junegunn/fzf'),
|
|
build = function()
|
|
vim.fn.system("./install --all")
|
|
end
|
|
},
|
|
{ src=gh('junegunn/fzf.vim')},
|
|
|
|
{ src=gh('numToStr/Comment.nvim')},
|
|
{ src=gh('andymass/vim-matchup')},
|
|
{ src=gh('windwp/nvim-autopairs')},
|
|
|
|
{ src=gh('mbbill/undotree')},
|
|
|
|
{ src=gh('max397574/better-escape.nvim')},
|
|
|
|
{ src=gh('tzachar/highlight-undo.nvim')},
|
|
{ src=gh('folke/which-key.nvim')},
|
|
{ src=gh('folke/noice.nvim')},
|
|
{ src=gh('tpope/vim-fugitive') }, -- git client
|
|
{ src=gh('tpope/vim-sensible') }, -- 'sensible' vim defaults
|
|
{ src=gh('tpope/vim-vinegar') }, -- netrw changes
|
|
}
|