From c5a0d509fdc981ca9b34a641db88a47959a66b7a Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 6 Aug 2024 18:13:28 +0300 Subject: feat(ux): Moved settings from text to ux --- lua/ux.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 lua/ux.lua (limited to 'lua/ux.lua') diff --git a/lua/ux.lua b/lua/ux.lua new file mode 100644 index 0000000..1f78e9c --- /dev/null +++ b/lua/ux.lua @@ -0,0 +1,34 @@ +--[=[ Search ]=]-- + +vim.o.hlsearch = false -- No highlighting when searching + +--[=[ Cursor and mouse ]=]-- + +vim.o.scrolloff = 5 -- Lines above and below cursor +vim.o.showmatch = true -- Jump to opening brace when having typed closing one + +vim.o.cursorline = true +vim.api.nvim_create_autocmd({ "InsertLeave", "BufEnter" }, { + command = "set cul" +}) +vim.api.nvim_create_autocmd({ "InsertEnter", "BufLeave" }, { + command = "set nocul" +}) + +vim.o.mouse = "a" + +--[=[ Windows ]=]-- + +vim.o.splitbelow = true +vim.o.splitright = true + +vim.o.number = true +vim.o.signcolumn = "number" + +vim.o.showmode = false +vim.o.timeoutlen = 150 + +--[=[ History ]=]-- + +vim.o.undofile = true +vim.o.undodir = vim.fn.expand("~/nvim/undo") -- cgit v1.3.1-23-gd82d