Closed xfyuan closed 2 years ago
So there are two problems in this report: 1) The LSP backend appears to not be attaching properly 2) Code folding isn't working
2 is easier so let's start with that. I made a change recently (240888e007fd53ef462ee445e4d107e93e570428) to disable the code folding behavior by default. To enable it, you should call setup() with the desired options. These should be explained in the README and in :help aerial
require("aerial").setup({
-- This must be true (or potentially 'auto') for any folding features
manage_folds = true,
-- When you fold code with za, zo, or zc, update the aerial tree as well.
link_folds_to_tree = true,
-- Fold code when you open/collapse symbols in the tree.
link_tree_to_folds = true,
})
Problem 1 is a lot trickier. I tried replicating your config on my computer and could not reproduce the issue. Seeing as the treesitter backend is active and working, this may not cause any actual problems. If you do still want to debug what's happening with the LSP, let me know and I'll give you some code pointers where you can log debug information and we can hopefully figure out what's going on.
Thanks for so quickly reply!
Yes, folding is working after adding above configs, cool! The code folding on each method is the best feature I just like.
The 1st point does cause none problem actually, though the aerial info shows like that. So maybe we can think it as an "egg" now.)
I have configured aerial like #34 , but it seems that LSP always can't work correctly.
My config is like this:
Then I open a go file, run :AerialInfo command, always get this result:
And the aerial toggle window can open, but the fold feature not working.
Is there any wrong in my configurations?