Comments (13)
Just pulled the latest version. I can confirm the issue had been solved. Happy to close it.
Thanks for the fix!
from aerial.nvim.
You don't! In the updated Setup section of the README it calls out that you only need to configure one of the sources. If you don't want to use LSP, you don't have to call on_attach
anywhere and the treesitter backend will automatically pick up the slack. Let me know if it doesn't work as expected.
Thanks for lsp_signature, btw! I use it all the time 🙂
from aerial.nvim.
I am happy you like lsp_signature :)
Maybe, you do not need to hook into on_attach to support LSP. You could fire a vim.lsp.buf_request()
and hook your node data handler in the request and refresh the tree in your handler.
If you really need to attach to each client, you can use vim.lsp.start_client
You provide a star_client function that wrap the neovim default start_client and aerial on_attach together.
Regarding treesitter setup. I still got no luck. I am lazy loading your plugin with
:lua require'packer'.loader('aerial.nvim')
:AerialToggle
Error:
E5108: Error executing lua ...m/site/pack/packer/opt/aerial.nvim/lua/aerial/render.lua:67: Column value outside range
stack traceback:
[C]: in function 'nvim_buf_add_highlight'
...m/site/pack/packer/opt/aerial.nvim/lua/aerial/render.lua:67: in function 'update_aerial_buffer'
...pack/packer/opt/aerial.nvim/lua/aerial/backends/init.lua:40: in function 'set_symbols'
.../packer/opt/aerial.nvim/lua/aerial/backends/markdown.lua:46: in function 'fetch_symbols'
...m/site/pack/packer/opt/aerial.nvim/lua/aerial/window.lua:174: in function 'open'
...m/site/pack/packer/opt/aerial.nvim/lua/aerial/window.lua:204: in function 'toggle'
[string "luaeval()"]:1: in main chunk
Maybe the bufdata.positions
is empty?
from aerial.nvim.
You're right, I should be able to make the LSP backend work without calling on_attach
. It'll break some backwards compatibility, but mostly with rarely-used or undocumented features and would definitely be worth it from a new user standpoint. I'll take a stab at it soon, but I'm more concerned about the crash you encountered.
It looks like some issues with bad string width calculations getting passed to the highlighter. I've attempted a blind fix, without having a repro. If it doesn't work, could you let me know what font you're using and your icon config, if any? If you're not passing anything in vim.g.aerial
directly, we look for your lspkind-nvim
config, if you're using that plugin.
from aerial.nvim.
Unfortunately, the latest version still has the same issue.
I did not setup vim.g.aerial. neither do I use lspkind-nvim plugin.
In fact, if I ignore the error messages and run AerialToggle
again, it works fine.
Also I dumped items in fetch_symbols_sync in treesitter/init.lua. Seems the nodes list are all good.
from aerial.nvim.
One thing I noticed is win_findbuf(bufnr)
this will return an empty list instead of nil/0 if bufnr is 0
.
from aerial.nvim.
You're mentioning win_findbuf
and earlier you mentioned bufdata.positions
, which makes me think that your error is coming from somewhere in the render.lua update_highlights
method. But the stack trace you pasted in had a crash in update_aerial_buffer
. Are you getting multiple different errors?
from aerial.nvim.
I did some refactoring to remove the calls to win_findbuf()
. If the error was surrounding that it should hopefully be easier to track down since there won't be the weirdness of the vimscript logic to deal with. I don't see how this could affect the error in your trace, but maybe this will help with the other issue?
from aerial.nvim.
Good news is error is gone now.
Bad news is most of the time when I run AerialToggle for the first time, I got . Loading
message instead of the outline. If I run it 2nd time, outline shows up.
I check #4 but does not help much.
from aerial.nvim.
Wow, sorry you've been running into so many issues! Hopefully it's something unique in your setup; I'd hate to think that people have been quietly dealing with these.
For this latest problem, I suspect it may have something to do with the lazy loading. I have pushed up some more changes that will maybe resolve it, but again hard to say without having a repro. If it persists can you let me know how you're doing the lazy loading and what the config for it is?
from aerial.nvim.
I have no problems with aerial and TSitter, so yep I would guess the problems that ray-x is facing are due his nvim setup.
from aerial.nvim.
Hello, does aerial support lsp without using on_attach
from aerial.nvim.
Yes, you still have to call on_attach
for aerial to work properly with LSP symbols. I did some deeper investigation into alternatives, but they didn't pan out.
from aerial.nvim.
Related Issues (20)
- Help with xml query HOT 1
- Question HOT 1
- bug: Floating window is closed when jump even with `close_on_select = false` HOT 2
- bug: Missing symbols when using treesitter as backend HOT 1
- Missing treesitter symbols for javascript HOT 1
- feature request: same method in sub- and/or in super-class; display all the methods of a class including inherited ones HOT 3
- bug: lua/aerial/util.lua:236: attempt to index local 'ignore' (a nil value) HOT 1
- bug: PHP Symbol Outline Not Hierarchical when using LSP HOT 4
- bug: golang missing variables, constants, fields if functions or structs are enabled
- bug: telescope aerial stays at mid HOT 2
- bug: `:AerialToggle` does nothing while the cursor in inside `:Neotree` HOT 1
- Support for filtering by tags in the telescope
- feature request: add option to not ignore diff windows
- feature request: workspace-level symbols HOT 2
- bug: need to delete the keymaps before mapping a new one HOT 1
- bug: `julia` treesitter queries broken after latest `nvim-treesitter` update
- feature request: autofocus while toggle HOT 2
- Missing symbols for YAML with treesitter
- bug: ```next()``` and ```prev()``` don't always work in visual mode if cursor is on a folded line
- aerial outline will not show method when there is a namespace before the method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aerial.nvim.