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

Aerial gets stuck on items generated by macros. #13

Closed
vext01 opened this issue Oct 6, 2021 · 3 comments
Closed

Aerial gets stuck on items generated by macros. #13

vext01 opened this issue Oct 6, 2021 · 3 comments

Comments

@vext01
Copy link

vext01 commented Oct 6, 2021

I'm trying out aerial on the llvm codebase with clangd as the LSP. It's pretty neat.

The }} binding works, but appears to get stuck on items that are generated by macros.

For example here:
image

Pressing }} does not advance to the next item in the tree.

The macro from this example is defined as:

  #define INITIALIZE_PASS(passName, arg, name, cfg, analysis)                    \                                                                        
    static void *initialize##passName##PassOnce(PassRegistry &Registry) {        \                                                                        
      PassInfo *PI = new PassInfo(                                               \                                                                        
          name, arg, &passName::ID,                                              \                                                                        
          PassInfo::NormalCtor_t(callDefaultCtor<passName>), cfg, analysis);     \                                                                        
      Registry.registerPass(*PI, true);                                          \                                                                        
      return PI;                                                                 \                                                                        
    }                                                                            \                                                                        
    static llvm::once_flag Initialize##passName##PassFlag;                       \                                                                        
    void llvm::initialize##passName##Pass(PassRegistry &Registry) {              \                                                                        
      llvm::call_once(Initialize##passName##PassFlag,                            \                                                                        
                      initialize##passName##PassOnce, std::ref(Registry));       \                                                                        
    }                                                                                 
@stevearc
Copy link
Owner

stevearc commented Oct 6, 2021

When I've seen behavior like this before, it's been because there's some mismatch between where aerial jumps and which symbol aerial detects the cursor to be at. I tried cloning LLVM locally to reproduce this, but for some reason my document symbols don't match what you're seeing. Could you tell me what version of clangd you're using, as well as any special configuration you're passing to nvim-lspconfig?

@vext01
Copy link
Author

vext01 commented Oct 7, 2021

Hi,

I'm using clangd built from source as part of an LLVM-12.0.0 build and my vim config is here

Although I've been using vim for decades, I'm very new to having a lua nvim config file (i converted only a few days ago), so apologies if it's something I've messed up.

@stevearc
Copy link
Owner

stevearc commented Oct 7, 2021

I believe I've fixed the issue. Thanks for the report!

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

No branches or pull requests

2 participants