mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 03:12:00 +00:00
docs: misc, terminal
Close #38319 Close #38348 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Barrett Ruth <br.barrettruth@gmail.com>
This commit is contained in:
@@ -605,14 +605,13 @@ do
|
||||
vim.api.nvim_buf_get_extmarks(ev.buf, nvim_terminal_exitmsg_ns, 0, -1, {})
|
||||
) > 0
|
||||
|
||||
-- `nvim_open_term` buffers do not have any attached chan
|
||||
-- `nvim_open_term` buffers do not have an attached 'channel'.
|
||||
local msg = buf.channel == 0 and '[Terminal closed]'
|
||||
or ('[Process exited %d]'):format(vim.v.event.status)
|
||||
|
||||
-- TermClose may be queued before TermOpen if the process
|
||||
-- exits before `terminal_open` is called. Don't display
|
||||
-- the msg now, let TermOpen display it.
|
||||
if buf.buftype ~= 'terminal' or buf_has_exitmsg then
|
||||
-- TermClose may be queued before TermOpen if process exits before `terminal_open` is called.
|
||||
-- Don't display the msg now, let TermOpen display it.
|
||||
vim.api.nvim_create_autocmd('TermOpen', {
|
||||
buffer = ev.buf,
|
||||
once = true,
|
||||
|
||||
@@ -1332,8 +1332,8 @@ end
|
||||
---@param base integer findstart=0, text to match against
|
||||
---
|
||||
---@return integer|table Decided by {findstart}:
|
||||
--- - findstart=0: column where the completion starts, or -2 or -3
|
||||
--- - findstart=1: list of matches (actually just calls |complete()|)
|
||||
--- - findstart=1: column where the completion starts, or -2 or -3
|
||||
--- - findstart=0: list of matches (actually just calls |complete()|)
|
||||
function lsp.omnifunc(findstart, base)
|
||||
return vim.lsp.completion._omnifunc(findstart, base)
|
||||
end
|
||||
|
||||
@@ -1262,8 +1262,8 @@ end
|
||||
--- @param base integer findstart=0, text to match against
|
||||
---
|
||||
--- @return integer|table Decided by {findstart}:
|
||||
--- - findstart=0: column where the completion starts, or -2 or -3
|
||||
--- - findstart=1: list of matches (actually just calls |complete()|)
|
||||
--- - findstart=1: column where the completion starts, or -2 or -3
|
||||
--- - findstart=0: list of matches (actually just calls |complete()|)
|
||||
function M._omnifunc(findstart, base)
|
||||
lsp.log.debug('omnifunc.findstart', { findstart = findstart, base = base })
|
||||
local bufnr = api.nvim_get_current_buf()
|
||||
|
||||
Reference in New Issue
Block a user