-
Notifications
You must be signed in to change notification settings - Fork 78
LSP not working when file opened by fuzzy finder #170
Comments
Thanks for the report! I was unable to reproduce on Ubuntu 16.04 and Atom 1.24.0-beta3. I just used this file with a syntax error: print("Hello Word!" And when I open it with fuzzy finder, the error is reported in diagnostics. Can you reproduce with this simple example? |
Oh also, are you using https://github.com/lgeiger/ide-python? That's what I installed to test. |
Yes! That's the one I'm using. As you can see, if I open file with fuzzy select, the ide is idling. However, I've found that files opened with fuzzy selector will have the full path in the tab label. |
If you copy the project to your home folder, can you still reproduce? Also, do you notice any errors in devtools console? |
We only fire up the language server if the file you open is contained within the folder you have added to atom. The nature of the LSP protocol requires that a language server is started in the folder above - if we allowed random files to be opened this way we'd have no direct way of knowing where the project folder is (we'd have to recurse up looking for clues) plus opening 5-6 random files could result in 5-6 language servers. |
Thx, If I add the project folder from the original directory, LSP works. Thx for clarifying! I agree that LSP should only be fired up in the given circumstances. But since symlink is a very frequently used feature under UNIX workflow, if I add a project folder(in this case a symlink) to atom, I would expect atom to treat it like I'm adding the root to atom. I've found settings related to symlink in atom settings, but no combination(Natimve/Emulation x Accept(symlink)) works. Is LSP talks directly to file systems or via atom? If latter is the case I guess it's possible to fire-up LSP after atom confirms the location from symlink to root folder. |
So you're adding a symlink then opening files from within it? If so, yes I agree that should work. I suspect though the problem is how Atom is dealing internally with the file names given the tab also has absolute paths. |
Development of atom-languageclient has officially moved to https://github.com/atom-ide-community/atom-languageclient 🎉 If this is still an issue please consider opening an issue on that repo. |
Environment
Linux x64 ubuntu 16.04
Atom version
1.24.0.beta3, 1.23.1
Encountered situation
Greetings, I've encountered a weird behaviour.
If I open a file from the project file tree, python language server is working properly.
But if the file is opened by ctrl-p (opens fuzzy file finder), the linter and all the ide stuff is not working.
The text was updated successfully, but these errors were encountered: