neovim/lua/settings.lua

37 lines
1.1 KiB
Lua
Raw Normal View History

2021-11-25 22:10:31 +01:00
local utils = require('utils')
local indent = 4
vim.cmd 'syntax enable'
vim.cmd 'filetype plugin indent on'
--
-- Highlight on yank
vim.cmd 'au TextYankPost * lua vim.highlight.on_yank {on_visual = false}'
2021-11-25 22:10:31 +01:00
utils.opt('b', 'expandtab', true)
utils.opt('b', 'shiftwidth', indent)
utils.opt('b', 'tabstop', indent)
utils.opt('b', 'softtabstop', indent)
utils.opt('b', 'smartindent', true)
2021-11-25 22:10:31 +01:00
utils.opt('o', 'hidden', true)
utils.opt('o', 'ignorecase', true)
utils.opt('o', 'scrolloff', 4 )
utils.opt('o', 'shiftround', true)
utils.opt('o', 'smartcase', true)
utils.opt('o', 'splitbelow', true)
utils.opt('o', 'splitright', true)
utils.opt('o', 'wildmode', 'list:longest')
utils.opt('w', 'number', true)
utils.opt('o', 'clipboard','unnamed,unnamedplus')
-- see smartindent
-- vim.opt.autoindent = true
vim.opt.background = 'light'
vim.opt.errorformat:prepend('%f|%l col %c|%m')
vim.opt.fileformat = 'unix'
vim.opt.pastetoggle = '<F2>'
vim.opt.textwidth = 79
vim.opt.undofile = true
-- Enable vimrc files per project and disable unsafe commands in project vimrc
vim.opt.exrc = true
vim.opt.secure = true