summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--after/plugin/cmp.lua28
-rw-r--r--colors/mellow+.lua73
-rw-r--r--lua/core/handler.lua1
-rw-r--r--lua/core/highlight.lua80
-rw-r--r--lua/core/opts.lua3
5 files changed, 83 insertions, 102 deletions
diff --git a/after/plugin/cmp.lua b/after/plugin/cmp.lua
index 4dfdfe9..8c7c3a2 100644
--- a/after/plugin/cmp.lua
+++ b/after/plugin/cmp.lua
@@ -65,28 +65,16 @@ cmp.setup {
}),
window = {
completion = {
- winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
- col_offset = 0,
- side_padding = 0,
+ border = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
+ winhighlight = "Normal:WinBarNC,FloatBorder:WinBarNC,Search:WinBarNC",
+ },
+ documentation = {
+ border = { ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' },
+ winhighlight = "Normal:WinBarNC,FloatBorder:WinBarNC,Search:WinBarNC",
}
},
- formatting = {
- fields = { "kind", "abbr", "menu" },
- format = function(entry, vim_item)
- local kind_icons = lspicons
- local menu_items = {
- buffer = "buffer",
- nvim_lsp = "LSP",
- luasnip = "luasnip",
- nvim_lua = "lua",
- calc = "calc",
- }
-
- vim_item.kind = string.format(' %s ', kind_icons[vim_item.kind])
- vim_item.menu = string.format(' (%s)', menu_items[entry.source.name])
-
- return vim_item
- end
+ view = {
+ entries = { name = 'custom', selection_order = 'near_cursor' },
},
-- mappings -----------------------------------------------------------------
diff --git a/colors/mellow+.lua b/colors/mellow+.lua
new file mode 100644
index 0000000..e089bfc
--- /dev/null
+++ b/colors/mellow+.lua
@@ -0,0 +1,73 @@
+vim.cmd('runtime mellow')
+local highlight = function(group, opts, space)
+ space = space or 0
+
+ if type(group) == 'table' then
+ for i in pairs(group) do
+ a.nvim_set_hl(space, group[i], opts)
+ end
+ elseif type(group) == 'string' then
+ a.nvim_set_hl(space, group, opts)
+ end
+end
+
+local function getcolor(index, fallback)
+ return vim.g['terminal_color_' .. index] or fallback
+end
+
+local colors = {
+ black = getcolor(0, 'Black'),
+ red = getcolor(1, 'Red'),
+ green = getcolor(2, 'Green'),
+ yellow = getcolor(3, 'Yellow'),
+ blue = getcolor(4, 'Blue'),
+ magenta = getcolor(5, 'Magenta'),
+ cyan = getcolor(6, 'Cyan'),
+ white = getcolor(7, 'White'),
+ bright_black = getcolor(8, 'DarkGrey'),
+ bright_red = getcolor(9, 'LightRed'),
+ bright_green = getcolor(10, 'LightGreen'),
+ bright_yellow = getcolor(11, 'LightYellow'),
+ bright_blue = getcolor(12, 'LightBlue'),
+ bright_magenta = getcolor(13, 'LightMagenta'),
+ bright_cyan = getcolor(14, 'LightCyan'),
+ bright_white = getcolor(15, 'LightGray'),
+}
+
+if pcall(require, "mellow") then c = require('mellow.colors').dark end
+
+-- vim highlights -------------------------------------------------------------
+highlight('CursorLineNr', { bold = true })
+
+-- remove tildas
+highlight('EndOfBuffer', { fg = vim.g.terminal_color_background })
+
+-- plugin highlights ----------------------------------------------------------
+-- telescope
+highlight('TelescopeMatching', { bg = c.gray01 })
+highlight('TelescopeNormal', { bg = c.bg_dark })
+
+highlight('TelescopePreviewBorder', { bg = c.bg_dark })
+highlight('TelescopePreviewNormal', { bg = c.bg_dark })
+highlight('TelescopePreviewTitle', { bg = c.bg_dark, fg = c.bg_dark })
+
+highlight('TelescopePromptBorder', { bg = c.gray01 })
+highlight('TelescopePromptNormal', { bg = c.gray01 })
+highlight('TelescopePromptPrefix', { bg = c.gray01 })
+highlight('TelescopePromptTitle', { bg = c.gray01 })
+
+highlight('TelescopeResultsBorder', { bg = c.bg_dark })
+highlight('TelescopeResultsNormal', { bg = c.bg_dark })
+highlight('TelescopeResultsTitle', { bg = c.bg_dark, fg = c.bg_dark })
+
+highlight('TelescopeSelection', { bg = vim.g.terminal_color_background })
+highlight('TelescopeSelectionCaret', { bg = vim.g.terminal_color_background, fg = c.red})
+
+-- alpha
+highlight('AlphaHeader', { fg = colors.blue })
+highlight('AlphaText', { fg = colors.blue })
+highlight('AlphaShortcut', { bold = true })
+highlight('AlphaFooter', { fg = colors.blue })
+
+-- fidget
+highlight('FidgetTask', { fg = vim.g.terminal_color_foreground })
diff --git a/lua/core/handler.lua b/lua/core/handler.lua
index e1d62c8..0038146 100644
--- a/lua/core/handler.lua
+++ b/lua/core/handler.lua
@@ -1,6 +1,5 @@
require('core.plugins') -- load plugins first to allow colorscheme to be set in opts
require('core.opts')
-require('core.highlight')
require('core.binds')
require('core.auto')
require('core.cmds')
diff --git a/lua/core/highlight.lua b/lua/core/highlight.lua
deleted file mode 100644
index 716c5ed..0000000
--- a/lua/core/highlight.lua
+++ /dev/null
@@ -1,80 +0,0 @@
-local highlight = function(group, opts, space)
- if not pcall(require, "mellow") then return end
- space = space or 0
-
- if type(group) == 'table' then
- for i in pairs(group) do
- a.nvim_set_hl(space, group[i], opts)
- end
- elseif type(group) == 'string' then
- a.nvim_set_hl(space, group, opts)
- end
-end
-
-if pcall(require, "mellow") then c = require('mellow.colors').dark end
-
--- vim highlights -------------------------------------------------------------
-highlight('CursorLineNr', { bg = c.bg_dark, fg = c.fg, bold = true })
-
--- remove tildas
-highlight('EndOfBuffer', { fg = c.bg })
-
--- plugin highlights ----------------------------------------------------------
--- telescope
-highlight('TelescopeMatching', { bg = c.gray01 })
-highlight('TelescopeNormal', { bg = c.bg_dark })
-
-highlight('TelescopePreviewBorder', { bg = c.bg_dark })
-highlight('TelescopePreviewNormal', { bg = c.bg_dark })
-highlight('TelescopePreviewTitle', { bg = c.bg_dark, fg = c.bg_dark })
-
-highlight('TelescopePromptBorder', { bg = c.gray01 })
-highlight('TelescopePromptNormal', { bg = c.gray01 })
-highlight('TelescopePromptPrefix', { bg = c.gray01 })
-highlight('TelescopePromptTitle', { bg = c.gray01 })
-
-highlight('TelescopeResultsBorder', { bg = c.bg_dark })
-highlight('TelescopeResultsNormal', { bg = c.bg_dark })
-highlight('TelescopeResultsTitle', { bg = c.bg_dark, fg = c.bg_dark })
-
-highlight('TelescopeSelection', { bg = c.bg })
-highlight('TelescopeSelectionCaret', { bg = c.bg, fg = c.red})
-
--- indent blankline
-highlight('IndentBlanklineIndent1', { bg = c.bg })
-highlight('IndentBlanklineIndent2', { bg = c.bg_dark })
-
--- alpha
-highlight('AlphaHeader', { fg = c.blue })
-
--- fidget
-highlight('FidgetTask', { fg = c.fg })
-
--- quick fix sign
-highlight('LightBulbSignTxthl', {fg = c.bright_magenta})
-
--- completion highlights
-highlight('CmpItemAbbrDeprecated', { fg = c.gray06, strikethrough = true })
-highlight('CmpItemAbbrMatch', { fg = c.yellow, bold = true })
-highlight('CmpItemAbbrMatchFuzzy', { fg = c.yellow, bold = true })
-highlight('CmpItemMenu', { fg = c.magenta, italic = true })
-
-highlight({ 'CmpItemKindField', 'CmpItemKindProperty', 'CmpItemKindEvent' },
- { fg = '#EED8DA', bg = '#B5585F' })
-highlight({ 'CmpItemKindText', 'CmpItemKindEnum', 'CmpItemKindKeyword' },
- { fg = '#C3E88D', bg = '#9FBD73' })
-highlight({ 'CmpItemKindConstant', 'CmpItemKindConstructor',
- 'CmpItemKindReference' },
- { fg = '#FFE082', bg = '#D4BB6C' })
-highlight({ 'CmpItemKindFunction', 'CmpItemKindStruct', 'CmpItemKindClass',
- 'CmpItemKindModule', 'CmpItemKindOperator', },
- { fg = '#EADFF0', bg = '#A377BF', })
-highlight({ 'CmpItemKindVariable', 'CmpItemKindFile' },
- { fg = '#C5CDD9', bg = '#7E8294' })
-highlight({ 'CmpItemKindUnit', 'CmpItemKindSnippet', 'CmpItemKindFolder' },
- { fg = '#F5EBD9', bg = '#D4A959' })
-highlight({ 'CmpItemKindMethod', 'CmpItemKindValue', 'CmpItemKindEnumMember' },
- { fg = '#DDE5F5', bg = '#6C8ED4' })
-highlight({ 'CmpItemKindInterface', 'CmpItemKindColor',
- 'CmpItemKindTypeParameter' },
- { fg = '#D8EEEB', bg = '#58B5A8' })
diff --git a/lua/core/opts.lua b/lua/core/opts.lua
index 826f2b2..62386dc 100644
--- a/lua/core/opts.lua
+++ b/lua/core/opts.lua
@@ -34,7 +34,8 @@ o.softtabstop = tabwidth
-- colorscheme
o.termguicolors = true
-if pcall(require, "mellow") then vim.cmd('colorscheme mellow') end
+vim.cmd('colorscheme mellow') -- mellow
+vim.cmd('colorscheme mellow+') -- some changes
-- better editing -------------------------------------------------------------
o.clipboard = 'unnamedplus' -- system clipboard (on unix like)