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

LspInfo: Active Clients not attached reporting root dir as Running in single file mode #3229

Open
thecontinium opened this issue Jul 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@thecontinium
Copy link

thecontinium commented Jul 9, 2024

Description

This happening because the test here is failing.

      if root_dir == nil or fname:sub(1, root_dir:len()) ~= root_dir then
        matched = false
      end

fname is the always associated with the original buffer so this test is always failing when finding a client that does not have the same root. I'm not sure why we can't rely purely on the root_dir from the client and remove this test ?

@thecontinium thecontinium added the bug Something isn't working label Jul 9, 2024
@thecontinium thecontinium reopened this Jul 9, 2024
@heygarrett
Copy link

heygarrett commented Jul 9, 2024

Could this be why I'm seeing a server attempt to start with a nil root_dir even though single_file_support is set to false? If not I'm happy to open a separate issue.

Edit: If anyone ends up here with the same issue as me, looks like it was a regression in neoconf that's since been fixed:
folke/neoconf.nvim#74

@thecontinium
Copy link
Author

I don't think so - this is purely what is displayed by LspInfo.

@thecontinium thecontinium changed the title Active Clients not attached reporting root dir as Running in single file mode LspInfo: Active Clients not attached reporting root dir as Running in single file mode Jul 9, 2024
@thecontinium
Copy link
Author

I'm don't use workspaces and I'm not familiar with how they are supposed to work so this test might be valid for some usage but if I change the code to the below it works for me.

      if root_dir == nil  then
        matched = false
      end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants