From b6b171e414573976bfac268b24e617f0f52ee97f Mon Sep 17 00:00:00 2001 From: Abdulrahman Sheikho Date: Sun, 8 Mar 2026 08:14:07 +0300 Subject: [PATCH] setup: add options --- lua/core/options.lua | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lua/core/options.lua b/lua/core/options.lua index 4fb1f579..b16963f2 100644 --- a/lua/core/options.lua +++ b/lua/core/options.lua @@ -7,7 +7,7 @@ vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -64,9 +64,26 @@ vim.o.inccommand = 'split' vim.o.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. -vim.o.scrolloff = 10 +vim.o.scrolloff = 5 -- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), -- instead raise a dialog asking if you wish to save the current file(s) -- See `:help 'confirm'` vim.o.confirm = true + +-- set linebreak to true to break lines according to word-boundary rather than last character +vim.o.linebreak = true + +-- set tabs +-- A tab character looks like 4 spaces +vim.o.tabstop = 4 +-- Size of an indent +vim.o.shiftwidth = 4 +-- Number of spaces tabs count for a while performing editing operations +vim.o.softtabstop = 4 +-- Turn tabs into spaces +vim.o.expandtab = true + +-- set spellchecking +vim.o.spell = true +vim.o.spelllang = 'en_us'