Files
dots/.config/nvim/lua/options.lua

33 lines
784 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.laststatus = 3
-- opt.wrap = false
-- :JsonFormat command using jq
cmd 'autocmd FileType json :command! JsonFormat %!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'