neovim

Personal neovim configuration files
git clone git://gtms.dev/neovim.git
Log | Files | Refs

commit 061c6e5cb10b0be8876d0fbc381c0ac35063661e
parent 75c71eef1de5cbb8e35b927e816e6466797743ee
Author: Tomas Nemec <nemi@skaut.cz>
Date:   Tue, 16 Nov 2021 14:54:01 +0100

update

Diffstat:
Mlua/my-default.lua | 32++++++++++++++++----------------
Mlua/tms/p/cmp/init.lua | 13+++++++------
Mlua/tms/plugins.lua | 1+
3 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/lua/my-default.lua b/lua/my-default.lua @@ -4,9 +4,17 @@ local c = require('colors') -- Special Color.new('backg', c.background) Color.new('foreg', c.foreground) +Color.new('cursor', c.cursor) + local is_dark = false if (colors.foreg.L > colors.backg.L) then is_dark = true end -Color.new('cursor', c.cursor) +local dimm = function(color, amount) + if is_dark then + return color:light(amount) + else + return color:dark(amount) + end +end -- colors Color.new('black', c.color0) @@ -36,6 +44,7 @@ Color.new('c14', c.color14) Color.new('c15', c.color15) Group.new('Normal', colors.foreg, colors.backg) +local N = groups.Normal Group.new('NonText', colors.c0, colors.none) Group.new('Comment', colors.c8, colors.none) Group.new('Conceal', colors.none, colors.none) @@ -59,14 +68,14 @@ Group.new('TabLineSel', colors.c0, colors.c4) Group.new('TermCursorNC', colors.c0, colors.c3) Group.new('VertSplit', colors.c0, colors.c8) Group.new('Title', colors.c4, colors.none, styles.bold) -Group.new('CursorLine', colors.none, groups.Normal.bg:dark(0.02)) +Group.new('CursorLine', colors.none, dimm(N.bg, 0.01)) Group.new('LineNr', colors.c8, colors.none) Group.new('CursorLineNr', colors.c8, colors.none) Group.new('helpLeadBlank', colors.c7, colors.none) Group.new('helpNormal', colors.c7, colors.none) Group.new('Visual', colors.c0, colors.c1) Group.new('VisualNOS', colors.c1, colors.none) -Group.new('Pmenu', colors.c7, colors.c8) +Group.new('Pmenu', colors.c7, dimm(N.bg, 0.01)) Group.new('PmenuSbar', colors.c7, colors.c6) Group.new('PmenuSel', colors.c0, colors.c4) Group.new('PmenuThumb', colors.c8, colors.c8) @@ -103,6 +112,7 @@ Group.new('Define', colors.c5, colors.none) Group.new('Delimiter', colors.c5, colors.none) Group.new('NormalFloat', colors.none, colors.none) Group.new('Float', colors.c5, colors.none) +Group.new('FloatBorder', N, colors.none) Group.new('Include', colors.c4, colors.none) Group.new('Keyword', colors.c5, colors.none) Group.new('Label', colors.c3, colors.none) @@ -114,22 +124,12 @@ Group.new('Typedef', colors.c3, colors.none) -- Telescope Group.new('TelescopeSelection', groups.Normal.bg, groups.Normal.fg) +Group.new('TelescopeMatching', nil, nil, styles.underline+styles.bold) + -- Lightspeed --- local gray_wash = (is_dark and colors.backg:light(0.3)) or colors.backg:dark(0.3) -local N = groups.Normal -local gray_wash = groups.Comment.fg local ls1 = colors.c2 local ls2 = colors.c3 - -local dimm = function(color, amount) - if is_dark then - return color:light(amount) - else - return color:dark(amount) - end -end - -Group.new('LightspeedGreyWash', gray_wash, colors.backg) +Group.link('LightspeedGreyWash', groups.Comment) Group.new('LightspeedCursor', N, N, styles.reverse) Group.new('LightspeedUnlabeledMatch', N, N, styles.reverse) -- linked: hLightspeedUniqueChar Group.new('LightspeedPendingOpArea', N, N, styles.reverse) diff --git a/lua/tms/p/cmp/init.lua b/lua/tms/p/cmp/init.lua @@ -35,19 +35,20 @@ M.setup = function() {name = 'treesitter'}, {name = 'dictionary'}, }), - experimental = {ghost_text = true}, + experimental = {ghost_text = true, native_menu = false}, }) -- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore). - -- cmp.setup.cmdline('/', {sources = {{name = 'buffer'}}}) + cmp.setup.cmdline('/', {completion = {autocomplete = {cmp.TriggerEvent.TextChanged}}, sources = {{name = 'buffer'}}}) -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). - -- cmp.setup.cmdline(':', {sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}})}) + cmp.setup.cmdline(':', { + completion = {autocomplete = {cmp.TriggerEvent.TextChanged}}, + sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}}), + }) end -M.enable_autocomplete = function() - cmp.setup.buffer {completion = {autocomplete = {cmp.TriggerEvent.TextChanged}}} -end +M.enable_autocomplete = function() cmp.setup.buffer {completion = {autocomplete = {cmp.TriggerEvent.TextChanged}}} end return M diff --git a/lua/tms/plugins.lua b/lua/tms/plugins.lua @@ -299,6 +299,7 @@ return packer.startup({ 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-nvim-lua', 'f3fora/cmp-spell', 'hrsh7th/cmp-calc',