From 699291f9ae85b3638b13b6932f0042558b2eb69b Mon Sep 17 00:00:00 2001 From: zymon Date: Sun, 25 Aug 2024 00:44:56 +0200 Subject: [PATCH] nvim sane options set --- init.lua | 1 + lua/znvim/options.lua | 75 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 lua/znvim/options.lua diff --git a/init.lua b/init.lua index e03f318..a7188dc 100644 --- a/init.lua +++ b/init.lua @@ -11,4 +11,5 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) +require("znvim.options") require("lazy").setup("znvim.plugins") diff --git a/lua/znvim/options.lua b/lua/znvim/options.lua new file mode 100644 index 0000000..c8b25fc --- /dev/null +++ b/lua/znvim/options.lua @@ -0,0 +1,75 @@ +vim.g.mapleader = " " +vim.g.maplocalleader = "," + +vim.opt.completeopt = "menuone,noinsert,noselect" + +vim.opt.shortmess:append({ + W = true, + I = true, + c = true, +}) + +vim.opt.termguicolors = true + +vim.opt.encoding = "utf8" +vim.opt.spelllang = "en,pl" + +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.numberwidth = 5 +-- vim.opt.statuscolumn = "%C %4l %r" + +vim.opt.wrap = false +vim.opt.breakindent = true +vim.opt.showbreak = "↪\\" +vim.opt.breakindentopt = "shift:2,min:78,sbr" + +vim.opt.tabstop = 4 +vim.opt.expandtab = true +vim.opt.shiftwidth = 4 +vim.opt.smarttab = true +vim.opt.shiftround = true + +vim.opt.ignorecase = true + +vim.opt.mouse = "a" + +vim.opt.showcmd = true + +vim.opt.timeout = true +vim.opt.timeoutlen = 200 +vim.opt.ttimeout = true +vim.opt.ttimeoutlen = 50 + +vim.opt.hidden = true +vim.opt.swapfile = false + +vim.opt.cursorline = true +vim.opt.ruler = true + +vim.opt.scrolloff = 99 + +vim.opt.laststatus = 0 + +vim.opt.clipboard = "unnamedplus" + +vim.opt.splitright = true + +vim.opt.undofile = true +vim.opt.undolevels = 1000 +vim.opt.undoreload = 10000 + +vim.opt.list = true +vim.opt.listchars = { + tab = "▸ ", + trail = "·", + eol = "↲", + extends = "›", + nbsp = "␣", +} + +vim.opt.foldenable = true +vim.opt.foldcolumn = "2" +vim.opt.foldlevel = 99 +vim.opt.foldlevelstart = 99 +vim.opt.fillchars = "eob: ,fold: ,foldopen:,foldsep: ,foldclose:"