32 lines
764 B
Lua
32 lines
764 B
Lua
local cmd = vim.cmd
|
|
local opt = vim.opt
|
|
local g = vim.g
|
|
|
|
-- sensible settings
|
|
opt.autoread = true
|
|
opt.clipboard = 'unnamedplus'
|
|
opt.conceallevel = 0
|
|
opt.hlsearch = false
|
|
opt.lazyredraw = true
|
|
opt.mouse = 'a'
|
|
opt.nu = true
|
|
opt.rnu = true
|
|
opt.scrolloff = 10
|
|
opt.shortmess = 'c'
|
|
opt.showcmd = true
|
|
opt.showmode = false
|
|
opt.sw = 4
|
|
opt.swapfile = false
|
|
opt.timeoutlen = 500
|
|
opt.ts = 4
|
|
-- opt.wrap = false
|
|
|
|
-- :FormatJson command using jq
|
|
cmd 'autocmd FileType json :command! FormatJson %!jq .'
|
|
|
|
-- trigger autoread on file change
|
|
cmd "autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif"
|
|
|
|
-- neovim-qt font
|
|
opt.guifont = 'DejaVu\\ Sans\\ Mono:h14'
|