nvim/lua/options.lua

51 lines
983 B
Lua
Raw Permalink 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-09-14 12:17:10 +00:00
-- Breakindent
vim.opt.breakindent = true
2024-02-21 09:07:58 +00:00
-- Mouse
2024-09-14 12:17:10 +00:00
vim.cmd([[
2024-02-21 09:07:58 +00:00
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
2024-09-14 12:17:10 +00:00
-- https://github.com/nvim-lua/kickstart.nvim/blob/7201dc480134f41dd1be1f8f9b8f8470aac82a3b/init.lua#L113-L119
vim.schedule(function()
vim.opt.clipboard = "unnamedplus"
end)
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