feat: lazynvim, ci test removed

This commit is contained in:
Max Miliano 2024-08-24 08:59:40 -03:00
parent 795c5c03cf
commit 8ac84d6d2e
4 changed files with 71 additions and 33 deletions

View file

@ -32,30 +32,3 @@ jobs:
commit_user_name: "github-actions[bot]"
commit_user_email: "github-actions[bot]@users.noreply.github.com"
commit_author: "github-actions[bot] <github-actions[bot]@users.noreply.github.com>"
test:
name: Run Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- uses: rhysd/action-setup-vim@v1
with:
neovim: true
- name: luajit
uses: leafo/gh-actions-lua@v10
with:
luaVersion: "luajit-2.1.0-beta3"
- name: luarocks
uses: leafo/gh-actions-luarocks@v4
- name: run test
shell: bash
run: |
luarocks install luacheck
luarocks install vusted
vusted ./tests

View file

@ -52,5 +52,7 @@ return {
['mini.cursorword'] = true,
['nvim-notify'] = true,
['rainbow-delimiters'] = true,
['bufferline.nvim'] = true,
['lazy.nvim'] = true,
},
}

View file

@ -305,6 +305,17 @@
---@field RainbowDelimiterGreen? table
---@field RainbowDelimiterViolet? table
---@field RainbowDelimiterCyan? table
---@field BufferLineFill? table
---@field BufferLineBufferSelected? table
---@field BufferLineSeparator? table
---@field BufferLineSeparatorSelected? table
---@field BufferLineSeparatorVisible? table
---@field LazyH1? table
---@field LazyButton? table
---@field LazyButtonActive? table
---@field LazyReasonStart? table
---@field LazyReasonEvent? table
---@field LazyNormal? table
local M = {}
@ -581,7 +592,7 @@ M.set_highlight = function(colors, config)
nvim_set_hl('@lsp.type.enum', { link = 'Type' })
nvim_set_hl('@lsp.type.enumMember', { link = 'Type' })
nvim_set_hl('@lsp.type.interface', { link = 'Type' })
nvim_set_hl('@lsp.type.macro', { link = 'Keyword' })
nvim_set_hl('@lsp.type.macro', { link = '@function.builtin' })
nvim_set_hl('@lsp.type.namespace', { link = 'Type' })
nvim_set_hl('@lsp.type.parameter', { link = '@parameter' })
nvim_set_hl('@lsp.type.property', { link = 'Identifier' })
@ -763,7 +774,7 @@ M.set_highlight = function(colors, config)
nvim_set_hl('TelescopeResultsNormal', { link = 'TelescopeNormal' })
nvim_set_hl(
'TelescopeBorder',
{ fg = colors.cyan, bg = colors.base04 },
{link = 'WinSeparator'},
{ transparent = config.transparent }
)
nvim_set_hl('TelescopePromptBorder', { link = 'TelescopeBorder' })
@ -865,13 +876,39 @@ M.set_highlight = function(colors, config)
nvim_set_hl('RainbowDelimiterCyan', { fg = colors.cyan })
end
if config.plugins['bufferline.nvim'] and config.transparent then
local color = require 'solarized.color'
local background = color.shade(colors.base02, 2)
nvim_set_hl('BufferLineFill', { bg = background })
nvim_set_hl('BufferLineBufferSelected', { fg = colors.base0 })
nvim_set_hl('BufferLineSeparator', { fg = background })
nvim_set_hl('BufferLineSeparatorSelected', { fg = background })
nvim_set_hl('BufferLineSeparatorVisible', { fg = background })
end
if config.plugins['lazy.nvim'] then
nvim_set_hl('LazyH1', { fg = colors.blue, bold = true })
nvim_set_hl('LazyButton', { fg = colors.cyan, bg = colors.mix_cyan })
nvim_set_hl('LazyButtonActive', { fg = colors.violet, bg = colors.mix_violet })
nvim_set_hl('LazyReasonStart', { fg = colors.yellow })
nvim_set_hl('LazyReasonEvent', { fg = colors.magenta })
nvim_set_hl('LazyNormal', { fg = colors.base0, bg = colors.base04 })
end
if config.on_highlights then
local color = require 'solarized.color'
local highlights = config.on_highlights(colors, color)
for group_name, group_val in pairs(highlights) do
local hl = nvim_get_hl { name = group_name, link = true }
local val = vim.tbl_extend('force', hl, group_val)
local val = {}
if hl.link then
val = group_val
else
val = vim.tbl_extend('force', hl, group_val)
end
vim.api.nvim_set_hl(0, group_name, val)
end
end

View file

@ -73,7 +73,7 @@ M.set_highlight = function(colors, config)
nvim_set_hl('Substitute', { link = 'IncSearch' })
nvim_set_hl(
'LineNr',
{ fg = colors.base01, bg = colors.base2 },
{ fg = colors.base1, bg = colors.base2 },
{ transparent = config.transparent }
)
nvim_set_hl('LineNrAbove', { link = 'LineNr' })
@ -262,7 +262,7 @@ M.set_highlight = function(colors, config)
nvim_set_hl('@lsp.type.enum', { link = 'Type' })
nvim_set_hl('@lsp.type.enumMember', { link = 'Type' })
nvim_set_hl('@lsp.type.interface', { link = 'Type' })
nvim_set_hl('@lsp.type.macro', { link = 'Keyword' })
nvim_set_hl('@lsp.type.macro', { link = '@function.builtin' })
nvim_set_hl('@lsp.type.namespace', { link = 'Type' })
nvim_set_hl('@lsp.type.parameter', { link = '@parameter' })
nvim_set_hl('@lsp.type.property', { link = 'Identifier' })
@ -546,13 +546,39 @@ M.set_highlight = function(colors, config)
nvim_set_hl('RainbowDelimiterCyan', { fg = colors.cyan })
end
if config.plugins['bufferline.nvim'] and config.transparent then
local color = require 'solarized.color'
local background = color.shade(colors.base2, 2)
nvim_set_hl('BufferLineFill', { bg = background })
nvim_set_hl('BufferLineBufferSelected', { fg = colors.base0 })
nvim_set_hl('BufferLineSeparator', { fg = background })
nvim_set_hl('BufferLineSeparatorSelected', { fg = background })
nvim_set_hl('BufferLineSeparatorVisible', { fg = background })
end
if config.plugins['lazy.nvim'] then
nvim_set_hl('LazyH1', { fg = colors.blue, bold = true })
nvim_set_hl('LazyButton', { fg = colors.green, bg = colors.mix_green })
nvim_set_hl('LazyButtonActive', { fg = colors.yellow, bg = colors.mix_yellow })
nvim_set_hl('LazyReasonStart', { fg = colors.yellow })
nvim_set_hl('LazyReasonEvent', { fg = colors.red })
nvim_set_hl('LazyNormal', { fg = colors.base01, bg = colors.base2 })
end
if config.on_highlights then
local color = require 'solarized.color'
local highlights = config.on_highlights(colors, color)
for group_name, group_val in pairs(highlights) do
local hl = nvim_get_hl { name = group_name, link = true }
local val = vim.tbl_extend('force', hl, group_val)
local val = {}
if hl.link then
val = group_val
else
val = vim.tbl_extend('force', hl, group_val)
end
vim.api.nvim_set_hl(0, group_name, val)
end
end