-
Notifications
You must be signed in to change notification settings - Fork 48
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
Symbol are not supported in neovim #596
Comments
Our |
Oh thanks @kanej |
Okay seems to be located this for future people: #550 |
@Ethnical did you get this working with Telescope? We might need to do something extra to enable it, because even after upgrading the LSP server with |
@fvictorio I didn't tried yet! will try maybe this weekend :) |
Ok, found the issue on my side. The symbols provider is behind a feature flag, which uses the machine id to enable it for some percentage of users. The latest version sets that percentage to 100%, so in practice it's not a feature flag anymore, but it still goes through that mechanism. This means that if the machine id is not available, then all features that are behind flags will be disabled. For some neovim-configuration-hell reason in my setup, the solidity server doesn't receive a machine id, so it just disables symbols and semantic highlighting. The fix is to add local lsp = require('lsp-zero').preset({})
local lspconfig = require("lspconfig")
local configs = require("lspconfig.configs")
-- ...
configs.solidity = {
default_config = {
cmd = {'nomicfoundation-solidity-language-server', '--stdio'},
filetypes = { 'solidity' },
root_dir = lspconfig.util.find_git_ancestor,
single_file_support = true,
},
}
lspconfig.solidity.setup {
init_options = {
machineId = "machineId"
}
} I added those @kanej @OmarTawfik since we are setting this to 100% now and we are unlikely to set it back to a non-100% value, should we just change this so that they are always enabled without going through |
Thank you for the investigation. That would be the next step, yes, given that there are no issues/regressions found so far, and it has been rolled out to %100 for two weeks already (#597). This way, users wouldn't need to worry about providing a |
Agreed, we should now switch to not using the feature flag system for these features. |
In a normal solidity file we would like to have the symbols working (really useful with telescope). However, got issue because seems not be supported for now:
Expected Results:
I took a codebase with golang code just as an example, how what is expected when symbols for LSP are showing up:
CleanShot.2024-09-02.at.08.41.48.mp4
The cmd to reproduce is:
Produced Results:
This is a video on solidity files for example no symbol will appear:
CleanShot.2024-09-02.at.08.54.32.mp4
This command will produce:
[telescope.builtin.lsp_*]: server does not support textDocument/documentSymbol
The text was updated successfully, but these errors were encountered: