From 7232abb157b44c622a02091fa81c68ffbaa4eb0d Mon Sep 17 00:00:00 2001 From: Matt Leong Date: Mon, 20 Dec 2021 15:54:31 -0800 Subject: [PATCH] feat(editor): adjust timeoutlen + sort --- lua/cosmic/core/editor.lua | 44 ++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/lua/cosmic/core/editor.lua b/lua/cosmic/core/editor.lua index f2034d9..cc1d0cf 100644 --- a/lua/cosmic/core/editor.lua +++ b/lua/cosmic/core/editor.lua @@ -11,38 +11,31 @@ cmd([[ g.mapleader = ' ' -- misc -opt.syntax = 'enable' -opt.encoding = 'utf-8' -opt.clipboard = 'unnamedplus' opt.backspace = { 'eol', 'start', 'indent' } +opt.clipboard = 'unnamedplus' +opt.encoding = 'utf-8' opt.matchpairs = { '(:)', '{:}', '[:]', '<:>' } +opt.syntax = 'enable' -- indention opt.autoindent = true -opt.smartindent = true - --- tabs -opt.tabstop = indent -opt.softtabstop = indent -opt.shiftwidth = indent opt.expandtab = true +opt.shiftwidth = indent +opt.smartindent = true +opt.softtabstop = indent +opt.tabstop = indent -- search -opt.wildmenu = true +opt.hlsearch = false opt.ignorecase = true opt.smartcase = true opt.wildignore = opt.wildignore + { '*/node_modules/*', '*/.git/*', '*/vendor/*' } -opt.hlsearch = false +opt.wildmenu = true -- ui -opt.number = true -opt.rnu = true opt.cursorline = true -opt.signcolumn = 'yes' opt.laststatus = 2 -opt.wrap = false -opt.scrolloff = 18 -opt.sidescrolloff = 3 -- Lines to scroll horizontally +opt.lazyredraw = true opt.list = true opt.listchars = { tab = '❘-', @@ -52,15 +45,20 @@ opt.listchars = { precedes = '«', nbsp = '×', } -opt.showmode = false -opt.lazyredraw = true opt.mouse = 'a' -opt.splitright = true -- Open new split to the right +opt.number = true +opt.rnu = true +opt.scrolloff = 18 +opt.showmode = false +opt.sidescrolloff = 3 -- Lines to scroll horizontally +opt.signcolumn = 'yes' opt.splitbelow = true -- Open new split below +opt.splitright = true -- Open new split to the right +opt.wrap = false -- backups -opt.swapfile = false opt.backup = false +opt.swapfile = false opt.writebackup = false -- autocomplete @@ -68,10 +66,10 @@ opt.completeopt = { 'menu', 'menuone', 'noselect' } opt.shortmess = opt.shortmess + { c = true } -- perfomance -opt.updatetime = 100 -opt.timeoutlen = 400 opt.redrawtime = 1500 +opt.timeoutlen = 250 opt.ttimeoutlen = 10 +opt.updatetime = 100 -- theme opt.termguicolors = true