Dotfiles/.config/nvim/lua/options.lua

25 lines
657 B
Lua
Raw Normal View History

2023-11-17 10:08:13 +00:00
local set = vim.opt
set.autoindent = true
set.tabstop = 2
set.shiftwidth = 2
set.softtabstop = 2
set.expandtab = true
set.number = true
set.relativenumber = true
set.cursorline = true
2024-02-08 19:57:09 +00:00
set.termguicolors = true
2024-04-30 07:49:51 +00:00
set.grepprg = 'rg --vimgrep --smart-case'
2023-11-17 10:08:13 +00:00
-- Improve terminal setup
vim.api.nvim_command("autocmd TermOpen * startinsert")
vim.api.nvim_command("autocmd TermOpen * setlocal nonumber norelativenumber")
vim.api.nvim_command("autocmd TermEnter * setlocal signcolumn=no")
vim.keymap.set('t', '<esc>', "<C-\\><C-n>")
-- Strip trailing spaces on save
vim.api.nvim_create_autocmd({"BufWritePre"}, {
pattern = { "*" },
command = [[%s/\s\+$//e]],
})