Skip to content

refactor: replace deprecated nvim_buf_get/set_option with vim.bo#5

Merged
dlyongemallo merged 1 commit intomainfrom
refactor_deprecated_api
Feb 6, 2026
Merged

refactor: replace deprecated nvim_buf_get/set_option with vim.bo#5
dlyongemallo merged 1 commit intomainfrom
refactor_deprecated_api

Conversation

@dlyongemallo
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 6, 2026 15:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors Diffview’s buffer option handling to avoid deprecated nvim_buf_get_option / nvim_buf_set_option calls by using Neovim’s Lua option interface (vim.bo) instead.

Changes:

  • Replace buffer option writes in file/panel buffer creation with vim.bo[bufnr][opt] = value.
  • Replace buffer modifiable get/set in the renderer with vim.bo[bufid].modifiable.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
lua/diffview/vcs/file.lua Switches buffer-local option assignment for diff buffers and the NULL buffer to vim.bo.
lua/diffview/ui/panel.lua Switches panel buffer option assignment to vim.bo.
lua/diffview/renderer.lua Uses vim.bo to temporarily toggle modifiable during render updates.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dlyongemallo dlyongemallo merged commit e0a6611 into main Feb 6, 2026
6 checks passed
@dlyongemallo dlyongemallo deleted the refactor_deprecated_api branch February 6, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants