nixhome/rcfiles/neovim.lua

42 lines
1.2 KiB
Lua

vim.opt.ignorecase = true -- search case insensitive
vim.opt.smartcase = true -- search matters if capital letter
vim.opt.inccommand = "split" -- "for incsearch while sub
vim.g.mapleader = ","
vim.opt.ruler = true -- cursor position all the time
vim.opt.autowrite = true -- save before commands
-- softtabs, 2 spaces
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.shiftround = true
vim.optexpandtab = true
-- listchars (show tabs and trailing whitespace)
vim.opt.list = true
vim.opt.listchars.tab = "»·"
vim.opt.listchars.trail= "·"
vim.opt.listchars.nbsp = "·"
-- width and height indications
vim.opt.textwidth = 80
vim.opt.colorcolumn = "+1"
vim.opt.number = true
vim.opt.numberwidth = 5
-- textwidth but don't wrap
vim.opt.formatoptions:remove { "t" }
-- ctrl-p with ripgrep
vim.opt.grepprg="rg --color=never"
vim.g.ctrlp_user_command='rg %s --files --color=never --glob ""'
vim.g.ctrlp_use_caching=0
-- vimsense (rich presence) options
vim.g.vimsense_small_text = "NeoVim"
vim.g.vimsense_small_image = "neovim"
vim.g.vimsense_editing_details = "Editing: {}"
vim.g.vimsense_editing_state = "Working on: {}"
vim.g.vimsense_file_explorer_text = "In file manager"
vim.g.vimsense_file_explorer_details = "Looking for files"