Skip to content

Commit 43e6328

Browse files
oriori1703screwage
authored andcommitted
Replace vim.opt with vim.o (nvim-lua#1495)
* Replace vim.opt with vim.o Because it offers a nicer interface and info on hover. For now leave vim.opt when using the table interface (until vim.o with tables is implemented) * Add type hint for vim.opt.rtp * Add a comment about using vim.opt instead of vim.o
1 parent 4c2704d commit 43e6328

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

init.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ vim.g.have_nerd_font = true
9393
-- NOTE: You can change these options as you wish!
9494
-- For more options, you can see `:help option-list`
9595

96+
-- Make line numbers default
97+
vim.o.number = true
98+
-- You can also add relative line numbers, to help with jumping.
99+
-- Experiment for yourself to see if you like it!
100+
-- vim.o.relativenumber = true
101+
96102
-- Enable mouse mode, can be useful for resizing splits for example!
97103
vim.o.mouse = 'a'
98104

@@ -117,6 +123,12 @@ vim.o.undofile = true
117123
vim.o.ignorecase = true
118124
vim.o.smartcase = true
119125

126+
-- Keep signcolumn on by default
127+
vim.o.signcolumn = 'yes'
128+
129+
-- Decrease update time
130+
vim.o.updatetime = 250
131+
120132
-- Decrease mapped sequence wait time
121133
vim.o.timeoutlen = 300
122134

@@ -142,7 +154,7 @@ vim.o.inccommand = 'split'
142154
vim.o.cursorline = true
143155

144156
-- Minimal number of screen lines to keep above and below the cursor.
145-
vim.opt.scrolloff = 8
157+
vim.o.scrolloff = 10
146158

147159
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
148160
-- instead raise a dialog asking if you wish to save the current file(s)

0 commit comments

Comments
 (0)