nvim/lua/options.lua

54 lines
1.1 KiB
Lua
Raw Normal View History

2024-07-08 06:37:10 +00:00
-- Leader key
vim.g.mapleader = " "
vim.g.maplocalleader = " "
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
2024-02-23 06:01:52 +00:00
-- Cursorline
2023-12-12 12:16:58 +00:00
vim.opt.cursorline = true
2024-02-23 06:01:52 +00:00
-- Line numbers
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-23 05:24:57 +00:00
-- Scrolling
vim.opt.scrolloff = 8
vim.opt.sidescrolloff = 8
2024-02-23 05:33:11 +00:00
-- Searching
vim.opt.ignorecase = true
vim.opt.smartcase = true
2024-02-21 09:07:58 +00:00
-- System integration
vim.opt.clipboard = "unnamedplus"
2024-02-23 06:01:52 +00:00
vim.opt.swapfile = false
2024-02-21 09:07:58 +00:00
vim.opt.undofile = true
2023-12-12 12:16:58 +00:00
2024-02-23 06:01:52 +00:00
-- Tab settings
2024-02-21 09:07:58 +00:00
vim.opt.expandtab = true
2024-02-23 05:28:39 +00:00
vim.opt.shiftwidth = 2
2024-02-21 09:07:58 +00:00
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
2024-02-23 06:01:52 +00:00
vim.opt.showmode = false -- Handled by lualine
vim.opt.signcolumn = "yes" -- Prevents shifting
2023-12-12 12:16:58 +00:00
2024-02-23 06:01:52 +00:00
-- Neovide specific settings
2023-12-12 12:16:58 +00:00
if vim.g.neovide then
2024-02-23 06:01:52 +00:00
vim.opt.guifont = "monospace:h12"
2023-12-12 12:16:58 +00:00
-- Terminal-emulator-like copy/pasting
2024-02-23 06:01:52 +00:00
vim.api.nvim_set_keymap("n", "<C-C>", '"+y', { noremap = true, silent = true })
vim.api.nvim_set_keymap("n", "<C-V>", '"+p', { noremap = true, silent = true })
2023-12-12 12:16:58 +00:00
end