Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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' }"
Expand All @@ -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
40 changes: 4 additions & 36 deletions doc/telescope.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand All @@ -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()*
Expand Down
3 changes: 3 additions & 0 deletions lua/telescope/pickers/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ local function wrap_instance(class, instance)
return self
end

---@nodoc
---@class TelescopeWindowBorder.config
---@field bufnr integer
---@field winid integer|nil
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading