diff --git a/Makefile b/Makefile index 3e4b4b4a8d..016d0f044a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: test lint docgen +.PHONY: test lint docgen clean test: nvim --headless --noplugin -u scripts/minimal_init.vim -c "PlenaryBustedDirectory lua/tests/automated/ { minimal_init = './scripts/minimal_init.vim' }" @@ -7,7 +7,10 @@ lint: luacheck lua/telescope .deps/docgen.nvim: - git clone --depth 1 --branch v1.0.1 https://github.com/jamestrew/docgen.nvim $@ + git clone --depth 1 --branch v1.1.0 https://github.com/jamestrew/docgen.nvim $@ docgen: .deps/docgen.nvim nvim -l scripts/gendocs.lua + +clean: + rm -rf .deps diff --git a/doc/telescope.txt b/doc/telescope.txt index ca22182706..1ecca27166 100644 --- a/doc/telescope.txt +++ b/doc/telescope.txt @@ -1847,25 +1847,9 @@ Example: ~ • {prompt} (`TelescopeWindow`) See |TelescopeWindow| • {results} (`TelescopeWindow`) See |TelescopeWindow| • {preview} (`TelescopeWindow?`) See |TelescopeWindow| - • {mount} (`fun(self: TelescopeLayout)`) Create the layout. This - needs to ensure the required properties are populated. - • {unmount} (`fun(self: TelescopeLayout)`) Destroy the layout. This is - responsible for performing clean-up, for example: - • deleting buffers - • closing windows - • clearing autocmds - • {update} (`fun(self: TelescopeLayout)`) Refresh the layout. This is - called when, for example, vim is resized. - -*TelescopeLayout.config* - - Fields: ~ - • {mount} (`function`) (self: TelescopeLayout):nil - • {unmount} (`function`) (self: TelescopeLayout):nil - • {update} (`function`) (self: TelescopeLayout):nil - • {prompt} (`TelescopeWindow?`) See |TelescopeWindow| - • {results} (`TelescopeWindow?`) See |TelescopeWindow| - • {preview} (`TelescopeWindow?`) See |TelescopeWindow| + • {mount} (`fun(self: TelescopeLayout)`) See |Layout:mount()|. + • {unmount} (`fun(self: TelescopeLayout)`) See |Layout:unmount()|. + • {update} (`fun(self: TelescopeLayout)`) See |Layout:update()|. *TelescopeWindow* @@ -1874,29 +1858,13 @@ Example: ~ • {bufnr} (`integer`) • {winid} (`integer`) -*TelescopeWindow.config* - - Fields: ~ - • {bufnr} (`integer`) - • {winid} (`integer?`) - • {border} (`TelescopeWindowBorder.config?`) See - |TelescopeWindowBorder.config| - *TelescopeWindowBorder* Fields: ~ • {bufnr} (`integer?`) • {winid} (`integer?`) • {change_title} (`fun(self: TelescopeWindowBorder, title: string, pos: "NW"|"N"|"NE"|"SW"|"S"|"SE"?)`) - - -*TelescopeWindowBorder.config* - - Fields: ~ - • {bufnr} (`integer`) - • {winid} (`integer?`) - • {change_title} (`function?`) (self: TelescopeWindowBorder, title: - string, pos?: "NW"|"N"|"NE"|"SW"|"S"|"SE"):nil + See |Border:change_title()|. Border:change_title({title}, {pos}) *Border:change_title()* diff --git a/lua/telescope/pickers/layout.lua b/lua/telescope/pickers/layout.lua index 549c800660..772b03049b 100644 --- a/lua/telescope/pickers/layout.lua +++ b/lua/telescope/pickers/layout.lua @@ -76,6 +76,7 @@ local function wrap_instance(class, instance) return self end +---@nodoc ---@class TelescopeWindowBorder.config ---@field bufnr integer ---@field winid integer|nil @@ -108,6 +109,7 @@ local Border = setmetatable({}, { ---@param pos "NW"|"N"|"NE"|"SW"|"S"|"SE"|nil function Border:change_title(title, pos) end +---@nodoc ---@class TelescopeWindow.config ---@field bufnr integer ---@field winid integer|nil @@ -135,6 +137,7 @@ local Window = setmetatable({}, { __name = "TelescopeWindow", }) +---@nodoc ---@class TelescopeLayout.config ---@field mount function: (self: TelescopeLayout):nil ---@field unmount function: (self: TelescopeLayout):nil