Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#2774): add winfixbuf view option for nvim 0.10 #2738

Closed
wants to merge 1 commit into from

Conversation

petobens
Copy link

@petobens petobens commented Apr 2, 2024

Hi @alex-courtis I've only added the option for the View class. Dunno if this is useful/needed elsewhere. Feel free to modify the PR as you deem fit.

Copy link
Member

@alex-courtis alex-courtis left a comment

Choose a reason for hiding this comment

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

Looking good; this should greatly simplify things.

We are going to have to be careful: 0.10 is not stable and there will be unforseen consequences, due to existing assumptions and workarounds.

Please:

  • Put this behind an experiment opt in "feature flag": :h nvim-tree-opts-experimental. Prior art Experimental Features - Git Async - Enabled #2104
  • Disable _prevent_buffer_override and all the other workarounds in place that currently achieve winfixbuf functionality

Update help etc. etc.

@alex-courtis
Copy link
Member

@petobens we're officially supporting release 0.10 now.

Can you please continue with this PR with the experimental guards in place?

@petobens
Copy link
Author

petobens commented Jun 9, 2024

Hi @alex-courtis, unfortunately I won't be able to followup this in the short term. Feel free to continue it if you deem fit (otherwise I'll revisit it in the next months).

@alex-courtis
Copy link
Member

Hi @alex-courtis, unfortunately I won't be able to followup this in the short term. Feel free to continue it if you deem fit (otherwise I'll revisit it in the next months).

No worries at all. Your contributions are welcome whenever you have the time.

@kutsan
Copy link

kutsan commented Jun 15, 2024

What will be the status of the feature now that the issue is closed?

@alex-courtis
Copy link
Member

alex-courtis commented Jun 16, 2024

What will be the status of the feature now that the issue is closed?

Still open. Waiting on a kind contributor.

This is very desirable as it allows us to use "native" plugin windows without our workarounds.

@emmanueltouzery
Copy link
Contributor

Otherwise from a user point of view, nvim-tree support is not really needed. I just have this in my config and it works great:

-- winfixbuf
if vim.fn.has("nvim-0.10") == 1 then
  vim.api.nvim_create_autocmd("BufEnter", {
    callback = function()
      if vim.list_contains({"NvimTree", "OverseerList", "aerial", "toggleterm", "dbui", "dbout"}, vim.bo.filetype) then
        vim.wo.winfixbuf = true
      end
    end,
  })
end

But I guess it would be handier if nvim-tree had it built-in.

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.

4 participants