summaryrefslogtreecommitdiff
path: root/lua/my_theme.lua
blob: 0eda28e93ff77e908d88c4688b58e9cf2d1362be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
vim.o.background = "dark"

local c = require("vscode.colors").get_colors()
require("vscode").setup({
    style = "dark",
    group_overrides = {
        ["@punctuation.bracket"] = { fg = c.vscFront },
    },
})

vim.cmd.colorscheme("vscode")

require("lualine").setup({
    options = {
        theme = "vscode",
        icons_enabled = false,
        component_separators = "|",
        section_separators = "",
    },
})

vim.o.guifont = "Cascadia Mono:h11"
vim.o.linespace = 0

function fixup_theme()
    vim.api.nvim_set_hl(0, "@lsp.type.class.cpp", { link = "@type" })
    vim.api.nvim_set_hl(0, "@lsp.type.enum.cpp", { link = "@type" })
    vim.api.nvim_set_hl(0, "@punctuation.bracket", { link = "@punctuation" })
    vim.api.nvim_set_hl(0, "@ibl", { link = "IndentBlanklineChar" })
    vim.api.nvim_set_hl(0, "IblIndent", { link = "@ibl" })
    vim.api.nvim_set_hl(0, "IblWhitespace", { link = "@ibl" })
    vim.api.nvim_set_hl(0, "@ibl.indent.char", { link = "@ibl" })
    vim.api.nvim_set_hl(0, "@ibl.indent.char.1", { link = "@ibl" })
    vim.api.nvim_set_hl(0, "@ibl.whitespace.char", { link = "@ibl" })
    vim.api.nvim_set_hl(0, "@ibl.whitespace.char.1", { link = "@ibl" })
end

my_switch_theme = function()
    if vim.o.background == "dark" then
        require("vscode").load("light")
    else
        require("vscode").load("dark")
    end
    fixup_theme()
end

fixup_theme()