Skip to content

Conversation

jose-elias-alvarez
Copy link

The documentation for lsp.buf_is_attached states that the first argument can be 0 to get the current buffer handle. However, since bufnr is passed as-is, 0 doesn't currently work.

This PR uses resolve_bufnr to make 0 work as described in the documentation.

@github-actions github-actions bot added lsp lua stdlib labels Aug 30, 2021
@mjlbach mjlbach merged commit 325fad8 into neovim:master Aug 30, 2021
muniter pushed a commit to muniter/neovim that referenced this pull request Sep 8, 2021
seandewar pushed a commit to seandewar/neovim that referenced this pull request Sep 16, 2021
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 26, 2021
BREAKING CHANGES:
d83df7f feat(lua)!: register_keystroke_callback => on_key

FEATURES:
915dda3 feat(jobstart): add parameter to close stdin

FIXES:
f8e0011 neovim#15732 fix(inccommand): ignore trailing commands only for *previewed* command
2132c06 backport: fix(windowing): positioning of relative floats
51d6b26 neovim#15495 backport: tests(lua/on_yank): assert conditions that fail correctly
f700233 neovim#15482 backport: fix(lua): verify buffer in highlight.on_yank
6bda2f5 neovim#15454 backport: fix(window.c): win_close from other tabpage
be58ba2 neovim#15372 backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds
d0e9a11 backport: refactor(sign): include longer sign column option
5c42376 backport: fix(sign): reset auto sign column with minimum in float win minimal style
41f7611 backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
cf62554 neovim#15111 backport: fix(:source): copy curbuf lines to memory before sourcing
6436100 neovim#14809 backport: fix(:source, nvim_exec): handle Vimscript line continuations
917f306 neovim#15043 backport: test/memory_usage_spec: skip on MacOS
a9cca1b neovim#14984 backport: fixup(clipboard): Fix error not properly handled
ae89330 neovim#14982 backport: fix(vim.opt): vimL map string values not trimmed
2229e99 neovim#14962 backport: fixup(clipboard): Use case matching
b6b12ea neovim#15489 fix(man.vim): filetype=man is too eager
6f965f4 build: use RelWithDebInfo build for nightlies, Release for releases
f027c5e build: update appdata.xml version in release commit
8336488 test(treesitter): skip all parsers tests if parsers aren't installed
008b83f Rename stdin to stdin_mode (fixes Windows build)

FIXES (LSP):
132053c neovim#15523 backport: fix(lsp): resolve bufnr in buf_is_attached
a265201 backport: fix(lsp): Ensure human readable errors are printed
33000bd backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
9f73b7c neovim#14954 backport: fix(lsp): correctly check for windows in lsp logger
eaa1c47 neovim#15023 backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line
989ccb8 neovim#15011 backport: fix(lsp): restore diagnostics extmarks on buffer changes
2ae4c96 backport: fix(lsp): prevent double <text> for cached plaintext markup
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 26, 2021
BREAKING CHANGES:
d83df7f feat(lua)!: register_keystroke_callback => on_key

FEATURES:
915dda3 feat(jobstart): add parameter to close stdin

FIXES:
f8e0011 neovim#15732 fix(inccommand): ignore trailing commands only for *previewed* command
2132c06 backport: fix(windowing): positioning of relative floats
51d6b26 neovim#15495 backport: tests(lua/on_yank): assert conditions that fail correctly
f700233 neovim#15482 backport: fix(lua): verify buffer in highlight.on_yank
6bda2f5 neovim#15454 backport: fix(window.c): win_close from other tabpage
be58ba2 neovim#15372 backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds
d0e9a11 backport: refactor(sign): include longer sign column option
5c42376 backport: fix(sign): reset auto sign column with minimum in float win minimal style
41f7611 backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
cf62554 neovim#15111 backport: fix(:source): copy curbuf lines to memory before sourcing
6436100 neovim#14809 backport: fix(:source, nvim_exec): handle Vimscript line continuations
917f306 neovim#15043 backport: test/memory_usage_spec: skip on MacOS
a9cca1b neovim#14984 backport: fixup(clipboard): Fix error not properly handled
ae89330 neovim#14982 backport: fix(vim.opt): vimL map string values not trimmed
2229e99 neovim#14962 backport: fixup(clipboard): Use case matching
b6b12ea neovim#15489 fix(man.vim): filetype=man is too eager
6f965f4 build: use RelWithDebInfo build for nightlies, Release for releases
f027c5e build: update appdata.xml version in release commit
8336488 test(treesitter): skip all parsers tests if parsers aren't installed
008b83f Rename stdin to stdin_mode (fixes Windows build)

FIXES (LSP):
132053c neovim#15523 backport: fix(lsp): resolve bufnr in buf_is_attached
a265201 backport: fix(lsp): Ensure human readable errors are printed
33000bd backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
9f73b7c neovim#14954 backport: fix(lsp): correctly check for windows in lsp logger
eaa1c47 neovim#15023 backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line
989ccb8 neovim#15011 backport: fix(lsp): restore diagnostics extmarks on buffer changes
2ae4c96 backport: fix(lsp): prevent double <text> for cached plaintext markup
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 26, 2021
BREAKING CHANGES:
d83df7f feat(lua)!: register_keystroke_callback => on_key
cd8f6c5 feat(lsp)!: change handler signature neovim#15504

FEATURES:
915dda3 feat(jobstart): add parameter to close stdin

FIXES:
f8e0011 neovim#15732 fix(inccommand): ignore trailing commands only for *previewed* command
2132c06 backport: fix(windowing): positioning of relative floats
51d6b26 neovim#15495 backport: tests(lua/on_yank): assert conditions that fail correctly
f700233 neovim#15482 backport: fix(lua): verify buffer in highlight.on_yank
6bda2f5 neovim#15454 backport: fix(window.c): win_close from other tabpage
be58ba2 neovim#15372 backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds
d0e9a11 backport: refactor(sign): include longer sign column option
5c42376 backport: fix(sign): reset auto sign column with minimum in float win minimal style
41f7611 backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
cf62554 neovim#15111 backport: fix(:source): copy curbuf lines to memory before sourcing
6436100 neovim#14809 backport: fix(:source, nvim_exec): handle Vimscript line continuations
917f306 neovim#15043 backport: test/memory_usage_spec: skip on MacOS
a9cca1b neovim#14984 backport: fixup(clipboard): Fix error not properly handled
ae89330 neovim#14982 backport: fix(vim.opt): vimL map string values not trimmed
2229e99 neovim#14962 backport: fixup(clipboard): Use case matching
b6b12ea neovim#15489 fix(man.vim): filetype=man is too eager
6f965f4 build: use RelWithDebInfo build for nightlies, Release for releases
f027c5e build: update appdata.xml version in release commit
8336488 test(treesitter): skip all parsers tests if parsers aren't installed
008b83f Rename stdin to stdin_mode (fixes Windows build)

FIXES (LSP):
132053c neovim#15523 backport: fix(lsp): resolve bufnr in buf_is_attached
a265201 backport: fix(lsp): Ensure human readable errors are printed
33000bd backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
9f73b7c neovim#14954 backport: fix(lsp): correctly check for windows in lsp logger
eaa1c47 neovim#15023 backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line
989ccb8 neovim#15011 backport: fix(lsp): restore diagnostics extmarks on buffer changes
2ae4c96 backport: fix(lsp): prevent double <text> for cached plaintext markup
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 26, 2021
BREAKING CHANGES:
d83df7f feat(lua)!: register_keystroke_callback => on_key
cd8f6c5 feat(lsp)!: change handler signature neovim#15504

FEATURES:
915dda3 feat(jobstart): add parameter to close stdin

FIXES:
f8e0011 neovim#15732 fix(inccommand): ignore trailing commands only for *previewed* command
2132c06 backport: fix(windowing): positioning of relative floats
51d6b26 neovim#15495 backport: tests(lua/on_yank): assert conditions that fail correctly
f700233 neovim#15482 backport: fix(lua): verify buffer in highlight.on_yank
6bda2f5 neovim#15454 backport: fix(window.c): win_close from other tabpage
be58ba2 neovim#15372 backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds
d0e9a11 backport: refactor(sign): include longer sign column option
5c42376 backport: fix(sign): reset auto sign column with minimum in float win minimal style
41f7611 backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
cf62554 neovim#15111 backport: fix(:source): copy curbuf lines to memory before sourcing
6436100 neovim#14809 backport: fix(:source, nvim_exec): handle Vimscript line continuations
917f306 neovim#15043 backport: test/memory_usage_spec: skip on MacOS
a9cca1b neovim#14984 backport: fixup(clipboard): Fix error not properly handled
ae89330 neovim#14982 backport: fix(vim.opt): vimL map string values not trimmed
2229e99 neovim#14962 backport: fixup(clipboard): Use case matching
b6b12ea neovim#15489 fix(man.vim): filetype=man is too eager
6f965f4 build: use RelWithDebInfo build for nightlies, Release for releases
f027c5e build: update appdata.xml version in release commit
8336488 test(treesitter): skip all parsers tests if parsers aren't installed
008b83f Rename stdin to stdin_mode (fixes Windows build)

FIXES (LSP):
132053c neovim#15523 backport: fix(lsp): resolve bufnr in buf_is_attached
a265201 backport: fix(lsp): Ensure human readable errors are printed
33000bd backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
9f73b7c neovim#14954 backport: fix(lsp): correctly check for windows in lsp logger
eaa1c47 neovim#15023 backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line
989ccb8 neovim#15011 backport: fix(lsp): restore diagnostics extmarks on buffer changes
2ae4c96 backport: fix(lsp): prevent double <text> for cached plaintext markup
7b0ae58 feat(lsp): allow root_dir to be nil (neovim#15430) (Mathias Fußenegger)
8ec5bc9 lsp(start_client): Allow passing custom workspaceFolders to the LSP (neovim#15132) (sim)
959cf5e fix(lsp): check if buffer is valid in changetracking (neovim#15505) (Jose Alvarez)
dc15b3a fix(lsp): avoid ipairs on non-sequential tables (neovim#15059) (Michael Lingelbach)
18375c6 feat(lsp): improve vim.lsp.util.apply_text_edits (neovim#15561) (hrsh7th)
7b1315f feat(lsp): improve logging (neovim#15636) (Michael Lingelbach)
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 26, 2021
BREAKING CHANGES:
d83df7f feat(lua)!: register_keystroke_callback => on_key
cd8f6c5 feat(lsp)!: change handler signature neovim#15504

FEATURES:
915dda3 feat(jobstart): add parameter to close stdin

FIXES:
f8e0011 neovim#15732 fix(inccommand): ignore trailing commands only for *previewed* command
2132c06 backport: fix(windowing): positioning of relative floats
51d6b26 neovim#15495 backport: tests(lua/on_yank): assert conditions that fail correctly
f700233 neovim#15482 backport: fix(lua): verify buffer in highlight.on_yank
6bda2f5 neovim#15454 backport: fix(window.c): win_close from other tabpage
be58ba2 neovim#15372 backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds
d0e9a11 backport: refactor(sign): include longer sign column option
5c42376 backport: fix(sign): reset auto sign column with minimum in float win minimal style
41f7611 backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
cf62554 neovim#15111 backport: fix(:source): copy curbuf lines to memory before sourcing
6436100 neovim#14809 backport: fix(:source, nvim_exec): handle Vimscript line continuations
917f306 neovim#15043 backport: test/memory_usage_spec: skip on MacOS
a9cca1b neovim#14984 backport: fixup(clipboard): Fix error not properly handled
ae89330 neovim#14982 backport: fix(vim.opt): vimL map string values not trimmed
2229e99 neovim#14962 backport: fixup(clipboard): Use case matching
b6b12ea neovim#15489 fix(man.vim): filetype=man is too eager
6f965f4 build: use RelWithDebInfo build for nightlies, Release for releases
f027c5e build: update appdata.xml version in release commit
8336488 test(treesitter): skip all parsers tests if parsers aren't installed
008b83f Rename stdin to stdin_mode (fixes Windows build)

FIXES (LSP):
132053c neovim#15523 backport: fix(lsp): resolve bufnr in buf_is_attached
a265201 backport: fix(lsp): Ensure human readable errors are printed
33000bd backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
9f73b7c neovim#14954 backport: fix(lsp): correctly check for windows in lsp logger
eaa1c47 neovim#15023 backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line
989ccb8 neovim#15011 backport: fix(lsp): restore diagnostics extmarks on buffer changes
2ae4c96 backport: fix(lsp): prevent double <text> for cached plaintext markup
7b0ae58 feat(lsp): allow root_dir to be nil (neovim#15430) (Mathias Fußenegger)
8ec5bc9 lsp(start_client): Allow passing custom workspaceFolders to the LSP (neovim#15132) (sim)
959cf5e fix(lsp): check if buffer is valid in changetracking (neovim#15505) (Jose Alvarez)
dc15b3a fix(lsp): avoid ipairs on non-sequential tables (neovim#15059) (Michael Lingelbach)
18375c6 feat(lsp): improve vim.lsp.util.apply_text_edits (neovim#15561) (hrsh7th)
7b1315f feat(lsp): improve logging (neovim#15636) (Michael Lingelbach)
justinmk added a commit to justinmk/neovim that referenced this pull request Sep 26, 2021
BREAKING CHANGES:
d83df7f feat(lua)!: register_keystroke_callback => on_key
cd8f6c5 feat(lsp)!: change handler signature neovim#15504

FEATURES:
915dda3 feat(jobstart): add parameter to close stdin

FIXES:
f8e0011 neovim#15732 fix(inccommand): ignore trailing commands only for *previewed* command
2132c06 backport: fix(windowing): positioning of relative floats
51d6b26 neovim#15495 backport: tests(lua/on_yank): assert conditions that fail correctly
f700233 neovim#15482 backport: fix(lua): verify buffer in highlight.on_yank
6bda2f5 neovim#15454 backport: fix(window.c): win_close from other tabpage
be58ba2 neovim#15372 backport: fix(autocmd.c): fix conditions in block_autocmds, unblock_autocmds
d0e9a11 backport: refactor(sign): include longer sign column option
5c42376 backport: fix(sign): reset auto sign column with minimum in float win minimal style
41f7611 backport: fix(decorations): crash when :bdelete (extmark_free_all) after clear_namespace
cf62554 neovim#15111 backport: fix(:source): copy curbuf lines to memory before sourcing
6436100 neovim#14809 backport: fix(:source, nvim_exec): handle Vimscript line continuations
917f306 neovim#15043 backport: test/memory_usage_spec: skip on MacOS
a9cca1b neovim#14984 backport: fixup(clipboard): Fix error not properly handled
ae89330 neovim#14982 backport: fix(vim.opt): vimL map string values not trimmed
2229e99 neovim#14962 backport: fixup(clipboard): Use case matching
b6b12ea neovim#15489 fix(man.vim): filetype=man is too eager
6f965f4 build: use RelWithDebInfo build for nightlies, Release for releases
f027c5e build: update appdata.xml version in release commit
8336488 test(treesitter): skip all parsers tests if parsers aren't installed
008b83f Rename stdin to stdin_mode (fixes Windows build)

FIXES (LSP):
132053c neovim#15523 backport: fix(lsp): resolve bufnr in buf_is_attached
a265201 backport: fix(lsp): Ensure human readable errors are printed
33000bd backport: fix(lsp): Ensure users get feedback on references/symbols errors or empty results
9f73b7c neovim#14954 backport: fix(lsp): correctly check for windows in lsp logger
eaa1c47 neovim#15023 backport: fix(lsp): restore diagnostics extmarks that were moved to the last edit line
989ccb8 neovim#15011 backport: fix(lsp): restore diagnostics extmarks on buffer changes
2ae4c96 backport: fix(lsp): prevent double <text> for cached plaintext markup
7b0ae58 feat(lsp): allow root_dir to be nil (neovim#15430) (Mathias Fußenegger)
8ec5bc9 lsp(start_client): Allow passing custom workspaceFolders to the LSP (neovim#15132) (sim)
959cf5e fix(lsp): check if buffer is valid in changetracking (neovim#15505) (Jose Alvarez)
dc15b3a fix(lsp): avoid ipairs on non-sequential tables (neovim#15059) (Michael Lingelbach)
18375c6 feat(lsp): improve vim.lsp.util.apply_text_edits (neovim#15561) (hrsh7th)
7b1315f feat(lsp): improve logging (neovim#15636) (Michael Lingelbach)
lewis6991 pushed a commit to lewis6991/neovim that referenced this pull request Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants