feat: add toggle_doc functionality (#1647)
* feat: Add toggle_doc functionality fix: Update docs view on entry change * Replace toggle logic by open/close * add docs and pinned flags * add faq for disabling docs * chore(git): ignore .DS_Store --------- Co-authored-by: hrsh7th <629908+hrsh7th@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3b9f28061a
commit
1c03ebc7dc
@@ -95,6 +95,9 @@ return function()
|
||||
name = 'custom',
|
||||
selection_order = 'top_down',
|
||||
},
|
||||
docs = {
|
||||
auto_open = true,
|
||||
}
|
||||
},
|
||||
|
||||
window = {
|
||||
|
||||
@@ -178,6 +178,24 @@ mapping.scroll_docs = function(delta)
|
||||
end
|
||||
end
|
||||
|
||||
--- Opens the documentation window.
|
||||
mapping.open_docs = function()
|
||||
return function(fallback)
|
||||
if not require('cmp').open_docs() then
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Close the documentation window.
|
||||
mapping.close_docs = function()
|
||||
return function(fallback)
|
||||
if not require('cmp').close_docs() then
|
||||
fallback()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---Select next completion item.
|
||||
mapping.select_next_item = function(option)
|
||||
return function(fallback)
|
||||
|
||||
Reference in New Issue
Block a user