kabouzeid / nvim-lspinstall

Provides the missing :LspInstall for nvim-lspconfig
MIT License
526 stars 66 forks source link

Attached Lsp not working #40

Closed Antonio-Bennett closed 3 years ago

Antonio-Bennett commented 3 years ago

Hey I don't know if anyone would know why for the Rust Lsp if I open a file in another buffer the LSP even though it says attached doesn't provide any of it's functions such as autocompletion. In the video you'll see me

  1. Open my init.lua file and run LSP info showing only 1 Lua lsp attached and demonstrate LSP autocomplete and definitions working. I will then open another lua file and show that it still works and after running LSP info there is still only 1 attached.
  2. I will open my rust file and run LSP info showing 1 attached same as above and LSP working. BUT when I open a second the amount attached goes to 2 (maybe this is weird behaviour) after running LSP info and LSP will not work.

https://user-images.githubusercontent.com/31296212/115316080-a43a5100-a146-11eb-86e6-bbdbb9b2f096.mp4

I honestly have no idea what's happening...I tried reloading the buffer and that didn't work either. Any ideas??

xMicky24GIT commented 3 years ago

I kinda have the same problem with tailwindcss but yesterday it was working perfectly.

https://user-images.githubusercontent.com/31669768/116006341-10b3c500-a60b-11eb-9e96-ab79e68eb18a.mp4

xMicky24GIT commented 3 years ago

I don't know if this can help but here's the lsp.log file

lsp.log

I looked into it and it seems working(?) But I don't get the completions, nvim-comple is working as you can see in the video above. Here's my lspconfig file:

lua.txt

kabouzeid commented 3 years ago

very weird indeed. @xMicky24GIT what does :set filetype say? Just vue? Your config seems fine and it should work with vue.

kabouzeid commented 3 years ago

@Antonio-Bennett I also have no idea what is happening, but I don't think it's related to lspinstall.

xMicky24GIT commented 3 years ago

very weird indeed. @xMicky24GIT what does :set filetype say? Just vue? Your config seems fine and it should work with vue.

Yes, it just says "filetype=vue". I don't understand what happened, the other day it was working perfectly and I was so happy to not have to use VSCode hahaha

kabouzeid commented 3 years ago

Sorry, I don't know what's wrong then :/

What I would try:

Install latest neovim nightly, update your plugins, reinstall tailwindcss lang server.

Also open the project in VSCode and confirm that it's working there.

xMicky24GIT commented 3 years ago

I did all of that and it’s working fine on vs code. That’s strange. I don’t know what else to try

Michele Viotto On 26 Apr 2021, 19:25 +0200, Karim Abou Zeid @.***>, wrote:

Sorry, I don't know what's wrong then :/ What I would try: Install latest neovim nightly, update your plugins, reinstall tailwindcss lang server. Also open the project in VSCode and confirm that it's working there. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

kabouzeid commented 3 years ago

Is the /frontend directory also where your tailwind.config.js is?

xMicky24GIT commented 3 years ago

Yes and I open the Vue file from /frontend, so I do “nvim src/App.vue”. The root dir found when I do :LspInfo is right, although for the html it says the directory before /frontend

Michele Viotto On 26 Apr 2021, 19:28 +0200, Karim Abou Zeid @.***>, wrote:

Is the /frontend directory also where your tailwind.config.js is? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

kabouzeid commented 3 years ago

Yep that's fine. Root dir is detected as necessary for language servers. Doesn't matter from where you open the file. Eg for html I think it's looking for the root git directory.

xMicky24GIT commented 3 years ago

Yes it’s probably looking for the .git directory. At this point I hope tailwindcss will start to work again without doing nothing like it did with stop working and it’s the only one that doesn’t work

Michele Viotto On 26 Apr 2021, 20:42 +0200, Karim Abou Zeid @.***>, wrote:

Yep that's fine. Root dir is detected as necessary for language servers. Doesn't matter from where you open the file. Eg for html I think it's looking for the root git directory. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

xMicky24GIT commented 3 years ago

I don't know I hate my life, now it's working. I don't understand

Edit: it just seem to not be working right on App.vue (and just noticed that no lsp completion work on that file)

kabouzeid commented 3 years ago

Interesting. Let me know when you find out some day why it's not working in App.vue