74 lines
1.8 KiB
Lua
74 lines
1.8 KiB
Lua
|
|
-- define default variables
|
|
|
|
vim.opt.clipboard = { "unnamed", "unnamedplus" }
|
|
vim.opt.number = true
|
|
vim.opt.relativenumber = true
|
|
vim.opt.scrolloff = 5
|
|
vim.opt.autoindent = true
|
|
vim.opt.smartindent = true
|
|
|
|
-- def tab
|
|
|
|
vim.opt.expandtab = true
|
|
vim.opt.smarttab = true
|
|
vim.opt.shiftwidth = 4
|
|
vim.opt.tabstop = 4
|
|
|
|
-- define colorscheme
|
|
|
|
vim.cmd 'colorscheme vim'
|
|
|
|
-- redefine controls
|
|
--
|
|
|
|
-- ctrl windows
|
|
|
|
vim.keymap.set('n', '<c-j>', '<c-w>j')
|
|
vim.keymap.set('n', '<c-k>', '<c-w>k')
|
|
vim.keymap.set('n', '<c-h>', '<c-w>h')
|
|
vim.keymap.set('n', '<c-l>', '<c-w>l')
|
|
|
|
-- ctrl nerdtree
|
|
|
|
vim.keymap.set('n', '<C-t>', ':NERDTreeToggle<cr>')
|
|
|
|
require('plugins')
|
|
|
|
require('lualine').setup {
|
|
options = { theme = 'codedark'}
|
|
}
|
|
|
|
-- default config:
|
|
require('peek').setup({
|
|
auto_load = true, -- whether to automatically load preview when
|
|
-- entering another markdown buffer
|
|
close_on_bdelete = true, -- close preview window on buffer delete
|
|
|
|
syntax = true, -- enable syntax highlighting, affects performance
|
|
|
|
theme = 'dark', -- 'dark' or 'light'
|
|
|
|
update_on_change = true,
|
|
|
|
app = 'webview', -- 'webview', 'browser', string or a table of strings
|
|
-- explained below
|
|
|
|
filetype = { 'markdown' },-- list of filetypes to recognize as markdown
|
|
|
|
-- relevant if update_on_change is true
|
|
throttle_at = 200000, -- start throttling when file exceeds this
|
|
-- amount of bytes in size
|
|
throttle_time = 'auto', -- minimum amount of time in milliseconds
|
|
-- that has to pass before starting new render
|
|
})
|
|
|
|
vim.api.nvim_create_user_command('PeekOpen', require('peek').open, {})
|
|
vim.api.nvim_create_user_command('PeekClose', require('peek').close, {})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|