Skip to content

Commit 7e6c0b5

Browse files
committed
Merge branch 'master' of github.com:varp/dotfiles
2 parents ef4b897 + 3b6ecb1 commit 7e6c0b5

2 files changed

Lines changed: 30 additions & 22 deletions

File tree

dotfiles/config/nvim/lua/config/autocmds.lua

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@
77
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
88
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
99

10-
local function set_background_from_macos()
11-
if vim.fn.has("mac") == 1 then
12-
local handle = io.popen("defaults read -g AppleInterfaceStyle 2>/dev/null")
13-
local result = handle:read("*a")
14-
handle:close()
10+
-- local function set_background_from_macos()
11+
-- if vim.fn.has("mac") == 1 then
12+
-- local handle = io.popen("defaults read -g AppleInterfaceStyle 2>/dev/null")
13+
-- local result = handle:read("*a")
14+
-- handle:close()
1515

16-
local bg = result:match("Dark") and "dark" or "light"
17-
if vim.o.background ~= bg then
18-
vim.o.background = bg
19-
return true
20-
end
21-
end
22-
return false
23-
end
16+
-- local bg = result:match("Dark") and "dark" or "light"
17+
-- if vim.o.background ~= bg then
18+
-- vim.o.background = bg
19+
-- return true
20+
-- end
21+
-- end
22+
-- return false
23+
-- end
2424

25-
local theme = require("config.theme")
26-
theme.apply()
25+
-- local theme = require("config.theme")
26+
-- theme.apply()
2727

28-
vim.api.nvim_create_autocmd({ "FocusGained", "VimEnter" }, {
29-
callback = function()
30-
if set_background_from_macos() then
31-
theme.apply()
32-
end
33-
end,
34-
})
28+
-- vim.api.nvim_create_autocmd({ "FocusGained", "VimEnter" }, {
29+
-- callback = function()
30+
-- if set_background_from_macos() then
31+
-- theme.apply()
32+
-- end
33+
-- end,
34+
-- })
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
return {
2+
{
3+
"LazyVim/LazyVim",
4+
opts = {
5+
colorscheme = "tokyonight-night", -- Must match the internal name of the theme
6+
},
7+
},
8+
}

0 commit comments

Comments
 (0)