nvim: Clean up init

This commit is contained in:
Sanchayan Maity 2021-01-08 21:36:19 +05:30
parent 94865fce59
commit fa18abaf65

View file

@ -1,4 +1,3 @@
-- Global vim options
vim.o.laststatus = 2 vim.o.laststatus = 2
vim.o.updatetime = 100 vim.o.updatetime = 100
vim.o.scrolloff = 3 vim.o.scrolloff = 3
@ -32,6 +31,20 @@ vim.o.fileformat = 'unix'
vim.o.inccommand = 'split' vim.o.inccommand = 'split'
vim.o.switchbuf = 'useopen' vim.o.switchbuf = 'useopen'
vim.o.encoding = 'utf-8' vim.o.encoding = 'utf-8'
vim.o.mouse = ''
vim.o.completeopt = 'menuone,noinsert,noselect'
vim.o.backspace = 'indent,eol,start'
vim.o.wildmenu = true
vim.o.wildmode = 'longest:full,full'
vim.o.wildoptions = 'pum'
vim.o.pumblend = 30
vim.o.backup = false
vim.o.writebackup = false
vim.o.sessionoptions = 'buffers,curdir,tabpages,winsize'
vim.o.shada = ''
vim.o.diffopt = 'filler,internal,algorithm:histogram,indent-heuristic'
vim.bo.swapfile = false
vim.bo.formatoptions = "crqn1j"
vim.g.python3_host_prog = '/usr/bin/python3' vim.g.python3_host_prog = '/usr/bin/python3'
-- Disable providers we do not give a shit about -- Disable providers we do not give a shit about
@ -79,22 +92,6 @@ vim.api.nvim_command('let g:sneak#use_ic_scs = 0')
-- We do this to prevent the loading of the system fzf.vim plugin. This is -- We do this to prevent the loading of the system fzf.vim plugin. This is
-- present at least on Arch/Manjaro -- present at least on Arch/Manjaro
vim.api.nvim_command('set rtp-=/usr/share/vim/vimfiles') vim.api.nvim_command('set rtp-=/usr/share/vim/vimfiles')
vim.api.nvim_command('set shada="NONE"')
vim.api.nvim_command('set mouse-=a')
vim.api.nvim_command('set formatoptions+=o')
vim.api.nvim_command('set formatoptions+=j')
vim.api.nvim_command('set completeopt=menuone,noinsert,noselect')
vim.api.nvim_command('set wildmenu')
vim.api.nvim_command('set wildmode=longest:full,full')
vim.api.nvim_command('set wildoptions=pum')
vim.api.nvim_command('set pumblend=30')
vim.api.nvim_command('set sessionoptions-=blank')
vim.api.nvim_command('set backspace=indent,eol,start')
vim.api.nvim_command('set diffopt=filler,internal,algorithm:histogram,indent-heuristic')
-- Do not create any backups or swap file
vim.api.nvim_command('set nobackup')
vim.api.nvim_command('set nowritebackup')
vim.api.nvim_command('set noswapfile')
require 'plugins' require 'plugins'
require 'autocmd' require 'autocmd'