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

Specifying backends interactively #280

Closed
hongxuchen opened this issue Jul 17, 2023 · 1 comment
Closed

Specifying backends interactively #280

hongxuchen opened this issue Jul 17, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@hongxuchen
Copy link

hongxuchen commented Jul 17, 2023

This is not a feature request for a particular treesitter language but a general one.

For me, I prefer LSP rather than treesitter. So LSP comes before treesitter in my backends priority settings. However I notice that sometimes, LSP gives worse results than treesitter (e.g., when I opened a C/C++ file with an incomplete build info file, clangd may miss quite a few symbols). But it seems that I have no choice to specify a backend with existing Aerial commands. I would very much like Aerial to have such a feature. I think this feature would also help users to easily setup a filetype map of backends without restarting nvim.

For the explicit specification behavior in the present of backend priorities, I prefer Aerial to always observes the priorities unless specified by the user in the current "LSP workspace" (per buffer specification is also acceptable to me).

@hongxuchen hongxuchen added the enhancement New feature or request label Jul 17, 2023
@stevearc
Copy link
Owner

I've added the ability to override any option that accepts a filetype map by using a buffer-local variable. For example, you could set vim.b.aerial_backends = { "lsp" } to only use the LSP for the current buffer.

After you make this change, you'll probably want to refresh the symbols. You can do that with the newly-added function:

require("aerial").refetch_symbols()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants