neovin: Remove minimap and use a simplistic scrollbar

...with LSP integration, of course
This commit is contained in:
Peter Cai 2022-08-13 21:59:10 -04:00
parent 93936d00ae
commit 9e53067078
2 changed files with 8 additions and 38 deletions

View File

@ -42,41 +42,6 @@ fun! ShowNumberIfNecessary()
endfun
autocmd BufEnter * call ShowNumberIfNecessary()
" Minimap
fun! ResizeMinimap()
if &ft =~ g:special_filetype_pattern
return
endif
if index(g:minimap_block_filetypes, &ft) >= 0
return
endif
if index(g:minimap_block_buftypes, &bt) >= 0
return
endif
MinimapClose
Minimap
endfun
let g:minimap_git_colors = 1
let g:minimap_width = 16
autocmd VimResized * call ResizeMinimap()
" Prevent Minimap from being focused
lua << EOF
function _G.reject_minimap_focus()
local mmwinnr = vim.fn.bufwinnr("-MINIMAP-")
if mmwinnr == -1 then
return
end
if vim.fn.winnr() == mmwinnr then
-- Go to the other window.
vim.api.nvim_command("wincmd t")
end
end
EOF
autocmd WinEnter * lua reject_minimap_focus()
" Terminal remapping
lua << EOF
function _G.set_terminal_keymaps()

View File

@ -32,9 +32,6 @@ return require('packer').startup(function(use)
-- A way saner buffer closing implementation
use "ojroques/nvim-bufdel"
-- Minimap
use "wfxr/minimap.vim"
-- Indentation guide
use "lukas-reineke/indent-blankline.nvim"
@ -46,6 +43,14 @@ return require('packer').startup(function(use)
end
}
-- Scrollbar
use {
"petertriho/nvim-scrollbar",
config = function()
require("scrollbar").setup()
end,
}
-- Directory tree
use {
"nvim-neo-tree/neo-tree.nvim",