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

53 lines
1.4 KiB
Lua
Raw Normal View History

2021-11-25 22:10:31 +01:00
local indent = 4
2024-08-12 16:10:35 +02:00
vim.opt.shiftwidth = indent
vim.opt.tabstop = indent
vim.opt.softtabstop = indent
vim.opt.scrolloff = indent
vim.opt.wildmode = 'list:longest,list:full'
vim.opt.expandtab = true
vim.opt.smartindent = true
vim.opt.hidden = true
vim.opt.ignorecase = true
vim.opt.shiftround = true
vim.opt.smartcase = true
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.number = true
vim.opt.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.errorformat:prepend('%f|%l col %c|%m')
vim.opt.fileformat = 'unix'
vim.opt.undofile = true
2023-09-26 02:25:19 +02:00
2024-08-12 16:10:35 +02:00
vim.opt.background = 'light'
-- 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
vim.api.nvim_create_autocmd('InsertEnter', {
callback = function()
vim.cmd.hi('clear RedundantSpaces')
end,
pattern = '*',
})
vim.api.nvim_create_autocmd({'InsertLeave', 'BufEnter'}, {
callback = function()
vim.cmd.hi('RedundantSpaces ctermbg=red guibg=red')
end,
pattern = '*',
})
2024-03-20 12:49:43 +01:00
vim.cmd([[
2024-08-12 16:10:35 +02:00
set noautoread
autocmd CursorHold * checktime
autocmd TextYankPost * lua vim.highlight.on_yank {on_visual = false}
autocmd BufRead,BufNewFile *.bu,*.yml.example,*.yaml.example set filetype=yaml
2024-03-20 12:49:43 +01:00
autocmd BufRead,BufNewFile *.ign set filetype=json
match RedundantSpaces /\s\+$/
let g:airline_theme='papercolor'
2024-03-20 12:49:43 +01:00
]])