You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have configured aerial like #34 , but it seems that LSP always can't work correctly.
My config is like this:
-- lsp config {{{
local servers = {
"gopls",
"tsserver",
"html",
"cssls",
"tailwindcss",
"solargraph",
}
function on_attach(client, bufnr)
local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...)
end
local function buf_set_option(...)
vim.api.nvim_buf_set_option(bufnr, ...)
end
buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
require "lsp_signature".on_attach()
require("aerial").on_attach(client, bufnr)
end
-- lspInstall + lspconfig stuff
local lsp_installer = require("nvim-lsp-installer")
for _, name in pairs(servers) do
local ok, server = lsp_installer.get_server(name)
-- Check that the server is supported in nvim-lsp-installer
if ok then
if not server:is_installed() then
print("Installing " .. name)
server:install()
end
end
end
local nvim_lsp = require('lspconfig')
for _, lsp in ipairs(servers) do
lsp_installer.on_server_ready(function(lsp)
local opts = {}
lsp:setup(opts)
end)
nvim_lsp[lsp].setup {
on_attach = on_attach,
flags = {
debounce_text_changes = 150,
}
}
end
Then I open a go file, run :AerialInfo command, always get this result:
Aerial Info
-----------
Filetype: go
Configured backends:
lsp (not supported) [LSP client not attached (did you call aerial.on_attach?)]
treesitter (supported) (attached)
markdown (not supported) [Filetype is not markdown]
Show symbols: Class, Constructor, Enum, Function, Interface, Module, Method, Struct
And the aerial toggle window can open, but the fold feature not working.
Is there any wrong in my configurations?
The text was updated successfully, but these errors were encountered:
The LSP backend appears to not be attaching properly
Code folding isn't working
2 is easier so let's start with that. I made a change recently (240888e) 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 featuresmanage_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.
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?
The text was updated successfully, but these errors were encountered: