feat: Proper floating window for keymap help and OutlineStatus

No more obnoxious '}' on the cmdline when pressing `?`!

scope:
- More type hints
- Added class Float for creating floating windows with size that fit the
  content and position centered on the screen
- show_help action for outline window (key `?`) now uses a floating
  window
- :OutlineStatus now provides better information, and shows content in a
  floating window.

future:
- Floating window option configuration
This commit is contained in:
hedy
2023-11-18 20:52:50 +08:00
parent 6af621f168
commit e56145f8dd
7 changed files with 275 additions and 53 deletions

View File

@@ -2,6 +2,10 @@ local cfg = require('outline.config')
local View = {}
---@class View
---@field bufnr integer
---@field winnr integer
function View:new()
return setmetatable({ bufnr = nil, winnr = nil }, { __index = View })
end