stevearc / aerial.nvim

Neovim plugin for a code outline window
MIT License
1.55k stars 76 forks source link

Missing treesitter symbols for javascript #338

Open 231tr0n opened 5 months ago

231tr0n commented 5 months ago

Language: javascript AerialInfo:

Aerial Info
-----------
Filetype: javascript
Configured backends:
  treesitter (supported) (attached)
  lsp (supported)
  markdown (not supported) [Filetype is not markdown]
  man (not supported) [Filetype is not man]
Show symbols: Class, Constructor, Enum, Function, Interface, Module, Method, Struct

The minimal amount of code that demonstrates the missing symbol:

const utils = {};

utils.bot = {};
utils.bot.status_updates_channels = {};
utils.bot.admin_commands_channels = {};
utils.bot.logs_channels = {};

utils.bot.status_updates_channels.broadcast = async (message) => {
  for (const id of status_updates_channels) {
    await bot.channels.cache.get(id).send(message);
  }
};

utils.bot.admin_commands_channels.broadcast = async (message) => {
  for (const id of admin_commands_channels) {
    await bot.channels.cache.get(id).send(message);
  }
};

utils.bot.logs_channels.broadcast = async (message) => {
  for (const id of logs_channels) {
    await bot.channels.cache.get(id).send(message);
  }
};

export default utils;

Expected symbol:

󰊕  broadcast(function)
󰊕  broadcast(function)
󰊕  broadcast(function)
231tr0n commented 5 months ago

First of all thank you for the plugin. I really found it useful. To give more info about backends, I changed the backend for the plugin to use lsp first and it worked properly. This issue occurs only with treesitter. Hope this additional info helps.