This repository has been archived on 2024-10-06. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/lua/settings.lua

42 lines
1.2 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)
2024-04-18 14:45:57 +02:00
utils.opt('o', 'scrolloff', 4)
2021-11-25 22:10:31 +01:00
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)
2024-04-18 14:45:57 +02:00
utils.opt('o', 'clipboard', 'unnamed,unnamedplus')
2021-11-25 22:10:31 +01:00
2024-03-20 12:49:43 +01:00
vim.opt.autoindent = false
vim.opt.smartindent = false
vim.opt.background = 'light'
vim.opt.errorformat:prepend('%f|%l col %c|%m')
vim.opt.fileformat = 'unix'
vim.opt.undofile = true
2023-09-26 02:25:19 +02:00
-- Enable vimrc files per project and disable unsafe commands in project vimrc
vim.opt.exrc = true
vim.opt.secure = true
2024-03-20 12:49:43 +01:00
-- unknown filetypes mappings
vim.cmd([[
autocmd BufRead,BufNewFile *.bu set filetype=yaml
autocmd BufRead,BufNewFile *.ign set filetype=json
]])