fix: apply sidebar stuff on FileType instead of BufWinEnter

This commit is contained in:
Folke Lemaitre
2021-04-23 17:17:52 +02:00
parent cb54f41063
commit b041c5e8a5
3 changed files with 4 additions and 4 deletions

View File

@@ -107,14 +107,14 @@ The theme comes in two styles, `storm` and a darker variant `night`.
-- Example config in Lua -- Example config in Lua
vim.g.tokyonight_style = "night" vim.g.tokyonight_style = "night"
vim.g.tokyonight_italic_functions = true vim.g.tokyonight_italic_functions = true
vim.g.tokyonight_sidebars = { "quickfix", "__vista__", "terminal" } vim.g.tokyonight_sidebars = { "qf", "vista_kind", "terminal", "packer" }
``` ```
```vim ```vim
" Example config in VimScript " Example config in VimScript
let g:tokyonight_style = "night" let g:tokyonight_style = "night"
let g:tokyonight_italic_functions = true let g:tokyonight_italic_functions = true
let g:tokyonight_sidebars = [ "quickfix", "__vista__", "terminal" ] let g:tokyonight_sidebars = [ "qf", "vista_kind", "terminal", "packer" ]
``` ```
## 🍭 Extras ## 🍭 Extras

View File

@@ -277,7 +277,7 @@ function M.setup(config)
NvimTreeRootFolder = { fg = c.blue, style = "bold" }, NvimTreeRootFolder = { fg = c.blue, style = "bold" },
NvimTreeGitDirty = { fg = c.git.change }, NvimTreeGitDirty = { fg = c.git.change },
NvimTreeGitNew = { fg = c.git.add }, NvimTreeGitNew = { fg = c.git.add },
NvimTreeSpecialFile = { fg = c.purple }, NvimTreeSpecialFile = { fg = c.purple, style = "underline" },
LspDiagnosticsError = { fg = c.error }, LspDiagnosticsError = { fg = c.error },
LspDiagnosticsWarning = { fg = c.warning }, LspDiagnosticsWarning = { fg = c.warning },
LspDiagnosticsInformation = { fg = c.info }, LspDiagnosticsInformation = { fg = c.info },

View File

@@ -90,7 +90,7 @@ function util.autocmds(config)
if sidebar == "terminal" then if sidebar == "terminal" then
vim.cmd [[ autocmd TermOpen * setlocal winhighlight=Normal:NormalSB,SignColumn:SignColumnSB]] vim.cmd [[ autocmd TermOpen * setlocal winhighlight=Normal:NormalSB,SignColumn:SignColumnSB]]
else else
vim.cmd([[ autocmd BufWinEnter ]] .. sidebar .. vim.cmd([[ autocmd FileType ]] .. sidebar ..
[[ setlocal winhighlight=Normal:NormalSB,SignColumn:SignColumnSB]]) [[ setlocal winhighlight=Normal:NormalSB,SignColumn:SignColumnSB]])
end end
end end