Code Monkey home page Code Monkey logo

Comments (11)

stevearc avatar stevearc commented on June 23, 2024 3

I found two bugs. One of them was easy to fix, the other one I have filed upstream neovim/neovim#27121

from aerial.nvim.

b0o avatar b0o commented on June 23, 2024 2

In case it's helpful to anyone, I'm using this workaround until the bug is fixed upstream:

vim.keymap.set('n', '<leader>af', function()
  -- NOTE: Workaround for https://github.com/stevearc/aerial.nvim/issues/331
  require('aerial').refetch_symbols()
  vim.cmd.AerialOpen 'float'
  vim.cmd.doautocmd 'BufWinEnter'
end)

from aerial.nvim.

stevearc avatar stevearc commented on June 23, 2024 2

If lsp.diagnostics_trigger_update = false fixes the problem, then it's probably just an issue with our interaction with the LSP diagnostics as a trigger to re-fetch symbols. I'll mark this issue as closed now and look into making that config option the default.

from aerial.nvim.

Hubro avatar Hubro commented on June 23, 2024

I just updated my nightly build to v0.10.0-dev-b32b5b2 and it's still broken, but then I tried downloading the official nightly AppImage (v0.10.0-dev-1731+g0bbe8e7fc) and there it works 😕

So it seems to only be broken in my nightly builds from neovim-nightly-overlay for some reason. Very strange. Sorry for the noise!

from aerial.nvim.

Hubro avatar Hubro commented on June 23, 2024

Hold on, now it's broken in the nightly appimage too. Demonstration:

Neovim 0.9.4 and 0.9.5:

image

Neovim v0.10.0-dev-2129+gba9f86a9c (nightly appimage):

image

Symptoms are all as initially described.

from aerial.nvim.

stevearc avatar stevearc commented on June 23, 2024

This appears to be fixed upstream now. Can you try it again on the most recent nightly?

from aerial.nvim.

b0o avatar b0o commented on June 23, 2024

This appears to be fixed upstream now. Can you try it again on the most recent nightly?

Works for me now without manually triggering the autocommand, but I still need to do refetch_symbols first or else the symbols might be stale. Not sure if that is the same issue or not.

from aerial.nvim.

stevearc avatar stevearc commented on June 23, 2024

When you say the symbols might be stale, what problem does this manifest as? Like if you've recently added a symbol it may not be present? Or there won't be any symbols? And is this sporadic or does it happen every time for you?

from aerial.nvim.

b0o avatar b0o commented on June 23, 2024

Like if you've recently added a symbol it may not be present

Yes, after I open Aerial for the first time, the symbols will be correct at first, but won't update as I add/remove them in the buffer until I call refetch_symbols.

And is this sporadic or does it happen every time for you?

Every time.

I just checked my config and switching from backends = { 'lsp', 'treesitter', 'markdown', 'man' } to backends = { 'treesitter', 'lsp', 'markdown', 'man' } seems to have fixed that issue.

from aerial.nvim.

stevearc avatar stevearc commented on June 23, 2024

Hmmm...this sounds like it might be related to the specific LSP server. Does this happen with other LSP servers? Another thing you can try is setting the config value lsp.diagnostics_trigger_update = false. That should be more reliable about updating your symbols.

Also, does this only happen for :AerialOpen float, or does it also happen for :AerialOpen left?

from aerial.nvim.

b0o avatar b0o commented on June 23, 2024

Does this happen with other LSP servers?

It happens with both tsserver and lua_ls. Not sure about others.

Also, does this only happen for :AerialOpen float, or does it also happen for :AerialOpen left?

It happens with both.

Another thing you can try is setting the config value lsp.diagnostics_trigger_update = false

That works!

from aerial.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.