nvim/lua/options.lua

41 lines
872 B
Lua
Raw Normal View History

2024-02-21 09:07:58 +00:00
-- Better file reading
vim.opt.autoread = true
2023-12-12 12:16:58 +00:00
vim.opt.autowrite = true
2024-02-21 09:07:58 +00:00
-- Line number
2023-12-12 12:16:58 +00:00
vim.opt.cursorline = true
2024-02-21 09:07:58 +00:00
vim.opt.number = true
vim.opt.relativenumber = true
2023-12-12 12:16:58 +00:00
2024-02-21 09:07:58 +00:00
-- Mouse
vim.cmd([[
aunmenu PopUp.How-to\ disable\ mouse
aunmenu PopUp.-1-
]])
vim.opt.mouse = "a"
2023-12-12 12:16:58 +00:00
2024-02-21 09:07:58 +00:00
-- System integration
vim.cmd([[ set noswapfile ]])
vim.opt.clipboard = "unnamedplus"
vim.opt.undofile = true
2023-12-12 12:16:58 +00:00
2024-02-21 09:07:58 +00:00
-- Tab
vim.opt.expandtab = true
vim.opt.tabstop = 2
2024-02-19 17:28:18 +00:00
2024-02-21 09:07:58 +00:00
-- Visuals
vim.opt.laststatus = 3
vim.opt.showmode = false -- we already have lualine
vim.opt.signcolumn = "yes" -- so it doesn't shift around
2023-12-12 12:16:58 +00:00
-- Neovide
if vim.g.neovide then
vim.o.guifont = "monospace:h12"
-- Terminal-emulator-like copy/pasting
local opts = { noremap = true, silent = true }
local keymap = vim.api.nvim_set_keymap
keymap("n", "<C-C>", '"*y :let @+=@*<CR>', opts)
keymap("n", "<C-V>", '"+p', opts)
end