Skip to content

Commit

Permalink
fix: highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Nov 20, 2022
1 parent 57d024e commit 35b1f98
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 17 deletions.
4 changes: 2 additions & 2 deletions lua/lazy/loader.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Util = require("lazy.util")
Config = require("lazy.config")
local Util = require("lazy.util")
local Config = require("lazy.config")

local M = {}

Expand Down
12 changes: 3 additions & 9 deletions lua/lazy/view/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,15 @@ M.colors = {
Special = "@punctuation.special",
}

M.did_setup = true
M.did_setup = false

function M.set_hl()
for hl_group, opts in pairs(M.colors) do
hl_group = "Lazy" .. hl_group

if type(opts) == "string" then
opts = {
link = opts,
}
opts = { link = opts }
end

opts.default = true

vim.api.nvim_set_hl(0, hl_group, opts)
vim.api.nvim_set_hl(0, "Lazy" .. hl_group, opts)
end
end

Expand Down
4 changes: 1 addition & 3 deletions lua/lazy/view/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
local Util = require("lazy.util")
local Render = require("lazy.view.render")

local M = {}
Expand Down Expand Up @@ -71,11 +72,8 @@ function M.show()

local render = Util.throttle(30, function()
vim.bo[buf].modifiable = true

Render.render_plugins(buf, win, 2)

vim.bo[buf].modifiable = false

vim.cmd.redraw()
end)

Expand Down
7 changes: 4 additions & 3 deletions lua/lazy/view/text.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---@alias TextString {str: string, hl?:string, extmark?:table}
---@alias TextLine TextString[]
local Config = require("lazy.config")

---@alias TextSegment {str: string, hl?:string, extmark?:table}

---@class Text
---@field _lines TextLine[]
---@field _lines TextSegment[][]
local Text = {}

function Text.new()
Expand Down

0 comments on commit 35b1f98

Please sign in to comment.