From 5ced687ddd08e1f8df27a23884d516a9b24101fc Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Thu, 28 Sep 2023 17:24:18 -0700 Subject: [PATCH] fix: don't override FloatTitle highlight (#189) --- lua/oil/init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/oil/init.lua b/lua/oil/init.lua index 6975b870..ad76ef21 100644 --- a/lua/oil/init.lua +++ b/lua/oil/init.lua @@ -711,7 +711,9 @@ local function set_colors() vim.api.nvim_set_hl(0, conf.name, { default = true, link = conf.link }) end end - if not pcall(vim.api.nvim_get_hl_by_name, "FloatTitle") then + -- TODO can remove this call once we drop support for Neovim 0.8. FloatTitle was introduced as a + -- built-in highlight group in 0.9, and we can start to rely on colorschemes setting it. + if not pcall(vim.api.nvim_get_hl_by_name, "FloatTitle", true) then local border = vim.api.nvim_get_hl_by_name("FloatBorder", true) local normal = vim.api.nvim_get_hl_by_name("Normal", true) vim.api.nvim_set_hl(