refactor: change open function to show

This commit is contained in:
amrbashir
2022-05-13 18:44:08 +02:00
parent c0abec2b1b
commit f49bcc50f0
3 changed files with 4 additions and 4 deletions

View File

@@ -19,7 +19,7 @@ use { 'amrbashir/nvim-docs-view' }
## Usage ## Usage
Use `:DocsViewOpen` to open the docs view side panel Use `:DocsViewShow` to open the docs view side panel
## LICENSE ## LICENSE

View File

@@ -2,7 +2,7 @@ local buf, win, start_win
local api = vim.api local api = vim.api
local lsp = vim.lsp local lsp = vim.lsp
local function open() local function show()
if win and api.nvim_win_is_valid(win) then return end if win and api.nvim_win_is_valid(win) then return end
start_win = api.nvim_get_current_win() start_win = api.nvim_get_current_win()
@@ -45,5 +45,5 @@ local function open()
end end
return { return {
open = open show = show,
} }

View File

@@ -3,5 +3,5 @@ if exists('g:loaded_docs_view')
endif endif
let g:loaded_docs_view = 1 let g:loaded_docs_view = 1
command! DocsViewOpen lua require("docs-view").open() command! DocsViewShow lua require("docs-view").show()