[neovim] Fix the LSPSaga/fugitive conflict
This mostly fixes the issue of the mismatch between fugitive's blame window and LSPSaga's breadcrumbs.
This commit is contained in:
parent
945556897f
commit
a978993d21
1 changed files with 23 additions and 5 deletions
|
@ -68,6 +68,7 @@ vim.keymap.set(
|
|||
function ()
|
||||
-- This restores the UI to the saved layout 'idelayout' (if saved on command line)
|
||||
-- TODO: Wrap the function body in an if statement to verify existence of idelayout
|
||||
-- (This depends on command line commands' being executed before this $VIMRC is loaded
|
||||
vim.cmd("exec idelayout")
|
||||
end,
|
||||
{ desc = "Revert window layout" }
|
||||
|
@ -315,8 +316,7 @@ require('mason').setup()
|
|||
require('mason-lspconfig').setup()
|
||||
|
||||
--[[ lualine
|
||||
Lualine provides the status bar as well as the tabline. Not sure whether
|
||||
it also provides the buffer breadcrumbs.
|
||||
Lualine provides the status bar as well as the tabline.
|
||||
--]]
|
||||
require('lualine').setup {
|
||||
options = { theme = 'dracula' },
|
||||
|
@ -618,6 +618,24 @@ end
|
|||
vim.cmd("highlight GitSignsCurrentLineBlame gui=bold guifg=#339944")
|
||||
vim.cmd("highlight NonText gui=bold guifg=#999999")
|
||||
|
||||
--[[
|
||||
Resolve conflict between fugitive and LSPSaga, wherein the latter's
|
||||
breadcrumbs cause a mismatch between the buffer and fugitive's :Git blame
|
||||
window. To kill the winbar (the top line where the breadcrumbs and this
|
||||
blame title live), enter `:set winbar&`.
|
||||
--]]
|
||||
local group = vim.api.nvim_create_augroup("fugitiveSagaConflict", { clear = true })
|
||||
vim.api.nvim_create_autocmd(
|
||||
'FileType',
|
||||
{
|
||||
group = group,
|
||||
pattern = 'fugitiveblame',
|
||||
callback = function()
|
||||
vim.api.nvim_set_option_value('winbar', 'fugitive: :Git blame', { scope = 'local' })
|
||||
end,
|
||||
}
|
||||
)
|
||||
|
||||
-- Switch syntax highlighting on
|
||||
vim.cmd("syntax enable")
|
||||
|
||||
|
|
Loading…
Reference in a new issue