migrate nvim config to 0.12.0: vim.pack, ui2, snacks -> mini, just general spring cleaning
This commit is contained in:
parent
d1178fbe59
commit
14b1a9b057
70 changed files with 1081 additions and 1483 deletions
22
nvim/lua/colorsync_integration.lua
Normal file
22
nvim/lua/colorsync_integration.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
local filepath = vim.fs.joinpath(os.getenv("HOME"), ".local/state/colorsync/current")
|
||||
|
||||
vim.api.nvim_create_augroup("ColorsyncEvents", { clear = true })
|
||||
|
||||
local handle = vim.uv.new_fs_event()
|
||||
if not handle then
|
||||
vim.notify("colorsync: failed to create fs event handle", vim.log.levels.ERROR)
|
||||
return
|
||||
end
|
||||
|
||||
handle:start(filepath, {}, function(err)
|
||||
if err then
|
||||
vim.schedule(function()
|
||||
vim.notify("colorsync: error watching " .. filepath .. "\n" .. err, vim.log.levels.ERROR)
|
||||
end)
|
||||
return
|
||||
end
|
||||
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_exec_autocmds("User", { pattern = "ColorsyncThemeChanged", modeline = false })
|
||||
end)
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue