This repository has been archived by the owner on May 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add `DevdocsToggle` command for toggling floating windows.
- Loading branch information
1 parent
f6a575f
commit b5d896a
Showing
5 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
local M = {} | ||
|
||
---@alias nvim_devdocs.StateKey "current_doc" | "preview_lines" | "last_win" | "last_mode" | "last_buf" | ||
|
||
local state = { | ||
current_doc = nil, -- ex: "javascript", used for `keywordprg` | ||
preview_lines = nil, | ||
last_win = nil, | ||
last_mode = nil, -- "normal" | "float" | ||
last_buf = nil, | ||
} | ||
|
||
---@param key nvim_devdocs.StateKey | ||
---@return any | ||
M.get = function(key) return state[key] end | ||
|
||
---@param key nvim_devdocs.StateKey | ||
M.set = function(key, value) state[key] = value end | ||
|
||
return M |