blob: 574ef5048125758ed18733e35a59a49b37d5cbaa (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
local gui = false -- set to true if guicolors should be on by default
local function colorscheme_set()
local colorscheme = "sorbet"
if gui then
colorscheme = "slate"
end
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not status_ok then
vim.notify("colorscheme " .. colorscheme .. " not found!")
return
end
---- Set Popup menu colors
--if not (vim.fn.has("nvim-0.10") == 1) then
-- --highlight Pmenu ctermbg=White ctermfg=Black guibg=Gray
-- vim.cmd("highlight Pmenu ctermbg=gray guibg=gray")
-- -- Set Parentheses matching to Magenta so that it's actually visible
-- vim.cmd("highlight MatchParen ctermbg=none ctermfg=magenta guibg=none guifg=magenta")
--end
-- TODO fix TODO highlight
-- TODO fix FIXME highlight
-- Change some gui colors
vim.cmd("highlight LineNr ctermfg=lightyellow")
vim.cmd("highlight LineNr guifg=yellow3")
vim.cmd("highlight Comment guifg=yellow3")
vim.cmd("highlight Todo guibg=blue")
vim.cmd("highlight MatchParen guibg=none guifg=magenta")
end
-- keymap for toggling colorscheme
vim.keymap.set("n", "<leader>g", function()
gui = not gui
if gui then
vim.cmd(":set termguicolors")
colorscheme_set()
vim.cmd(":TSEnable highlight")
else
vim.cmd(":set notermguicolors")
colorscheme_set()
vim.cmd(":TSDisable highlight")
end
end)
colorscheme_set()
--local colorscheme = "legacy_slate"
--local gui_colorscheme = "material"
--
--local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
--if not status_ok then
-- vim.notify("colorscheme " .. colorscheme .. " not found!")
-- return
--end
--
----local status_ok, _ = pcall(vim.cmd, "colorscheme " .. gui_colorscheme)
----if not status_ok then
---- vim.notify("colorscheme " .. gui_colorscheme .. " not found!")
---- return
----end
--
---- Set Popup menu colors
----highlight Pmenu ctermbg=White ctermfg=Black guibg=Gray
--vim.cmd("highlight Pmenu ctermbg=gray guibg=gray")
--
---- Set Parentheses matching to Magenta so that it's actually visible
--vim.cmd("highlight MatchParen ctermbg=none ctermfg=magenta guibg=none guifg=magenta")
|