Add neovim config; Remove things
This commit is contained in:
87
nvim/base.lua
Normal file
87
nvim/base.lua
Normal file
@ -0,0 +1,87 @@
|
||||
-------------------------
|
||||
-------- OPTIONS --------
|
||||
-------------------------
|
||||
vim.opt.mouse = 'a'
|
||||
vim.opt.history = 1000
|
||||
vim.opt.ruler = true
|
||||
vim.opt.ruler = true
|
||||
vim.opt.number = true
|
||||
vim.opt.showcmd = true
|
||||
vim.opt.ttimeoutlen = 100
|
||||
vim.opt.backspace = 'indent,eol,start'
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.autoindent = true
|
||||
vim.opt.showmatch = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.wrapscan = true
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
vim.opt.hidden = true
|
||||
vim.opt.splitright = true
|
||||
vim.opt.splitbelow = true
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.wildmode = 'longest,list'
|
||||
vim.opt.wildignore = vim.opt.wildignore + 'main,*.o,*.d,*.aux,*.bbl,*.lof,*.loa,*.blg,*.fdb_latexmk,*.fls,*.tdo,*.pdf,*.pyc'
|
||||
vim.opt.spell = false
|
||||
vim.opt.foldmethod = 'syntax'
|
||||
vim.opt.foldopen = vim.opt.foldopen - 'block'
|
||||
vim.opt.foldlevel = 99
|
||||
vim.opt.lazyredraw = true
|
||||
vim.opt.listchars = 'eol:¬,tab:▸ ,trail:·'
|
||||
vim.opt.fillchars = 'vert:|,fold: '
|
||||
vim.opt.list = true
|
||||
vim.opt.laststatus = 2
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.background = 'light'
|
||||
vim.opt.wrap = true
|
||||
vim.opt.showbreak = '..'
|
||||
-- vim.opt.clipboard = vim.opt.clipboard + 'unnamedplus'
|
||||
-- vim.opt.clipboard = 'unnamedplus'
|
||||
vim.opt.errorbells = false
|
||||
vim.opt.visualbell = false
|
||||
vim.opt.title = true
|
||||
vim.opt.autoread = true
|
||||
vim.opt.syntax = 'on'
|
||||
vim.opt.encoding = 'utf-8'
|
||||
vim.opt.completeopt = 'menu,menuone,noselect'
|
||||
|
||||
----------------------------
|
||||
-------- COMMANDS --------
|
||||
----------------------------
|
||||
--
|
||||
vim.cmd('filetype plugin indent on')
|
||||
|
||||
-- vim.cmd('colorscheme lucius')
|
||||
-- vim.cmd('LuciusWhite')
|
||||
|
||||
|
||||
----------------------------
|
||||
-------- AUTOGROUPs --------
|
||||
----------------------------
|
||||
|
||||
vim.api.nvim_create_augroup('VimIntern', { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({'FocusGained', 'BufEnter', 'CursorMoved', 'CursorMovedI', 'CursorHold', 'CursorHoldI'}, {
|
||||
group = 'VimIntern',
|
||||
pattern = '*',
|
||||
command = 'silent! checktime'
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('BufEnter', {
|
||||
group = 'VimIntern',
|
||||
pattern = '*',
|
||||
command = 'silent! lcd %:p:h'
|
||||
})
|
||||
|
||||
|
||||
---------------------------
|
||||
-------- FUNCTIONS --------
|
||||
---------------------------
|
||||
|
||||
vim.api.nvim_create_user_command('TrimWhiteSpace', function()
|
||||
vim.cmd('%s/\\s\\+$//e')
|
||||
end, {})
|
||||
Reference in New Issue
Block a user