-
Notifications
You must be signed in to change notification settings - Fork 215
LSP not working neovim #815
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
Comments
Hello, I am having the same issue. tailwindcss lsp installed via Mason in Neovim. |
Yesterday trying to figure out what was happening I discover that is not happening in all my projects, trying to use it in old projects it works great and creating another nextjs app from scratch works too but in some projects don't and it's weird because all of the projects are just nextjs no more than that so I haven't figured out why it's working in some of them, maybe cache ? |
Getting this issue as well - just installed via Packer and configured default. |
Got the same issue, it's not working in a monorepo in a nextjs package, but it's working on another package not using nextjs on the same monorepo. |
I had a similar issue that was resolved by updating the tailwindcss lsp. It seems like create-next-app now configures tailwind with a |
I've not figured out what the cause was but I did install the latest nightly build (of neovim) and it seems to have fixed the issue. |
Same here. Using Lazyvim + Mason
|
Same here, but I may have found why. I only have the issue if the project directory contains files that I don't own. |
This working, my Docker created directory, tks. |
What NodeJS version are you using? I switched from v14 to v18 and the problem is gone. |
Thank you. After an hour of trying to figure out what was causing the issue, this is what helped. Running a postgres db with docker that had a different owner |
I experienced the same. Using Remix Blues Stack and docker creates a I ended up having to adjust docker permissions and permissions/owner for that folder to get the errors to go away and get tailwind lsp working. What version of VS Code are you using? What version of Tailwind CSS are you using? What package manager are you using? What operating system are you using? Tailwind config
|
Hey, so @RobinMalfait who works here also uses Neovim everyday and doesn't encounter any issues. Additionally, several of the issues listed here have been fixed by either updating Neovim or look to be related to file ownership and permissions which is, of course, not something we can do anything about. I'm going to close this for now but if you encounter further problems using our Language Server with Neovim and can provide:
I'll happily take another look! |
@thecrypticace happy to look into this myself if you've got any debugging tips handy in a neovim environment or else I can figure that out when I have some time. i've wiped my tailwind config entirely, and when I add a folder and chmod it to it's likely an edge case having folders with limited permissions in them, but it's something a project i work in has (docker generated postgres folder). I can probably fix it by adding that folder to the excluded file array or figure out docker permissions, but I do have 10-15 LSP's installed and tailwind is the only one that has an issue with it, so I do think there's a bug somewhere. again very happy to look through on my own if you're able to give some direction based on some of this info! |
@mttrms Yeah, try adding it to the excluded array. I suspect it has something to do with file watching trying to traverse into a folder that there are no permissions to read. Now that I understand that one in particular, that by itself seems like a simple-ish thing to look into. I'll see what I can figure out next week. |
awesome, thank you! I only recently converted my nvim config so still getting used to some of the config options, but i'll figure that out today and use it as a temp workaround. I was gonna push up a repo to send over but creating a repo that contains folders without read access is a little strange and git did not like it, wasn't sure that would be 100% reproducible but if you need me to give it a shot LMK. |
@mttrms I can't reproduce this — but I'm also not great with Vim. I just spun up a VM and installed Neovim, Mason, LSP configs for tailwind, etc… and am able to get completions and what not. I then created a folder that's owned by root and not readable by the current user (though it is writable because Any chance you could set up a repo with like a Dockerfile or some other kind of setup script? |
Interesting! Yeah I'll see if I can get this easily repro'd in docker or a setup script for you, sorry you weren't able to see it based on some of the config I shared above, hope it wasn't too much of a time sink. Not sure how you manage issues, feel free to close if it cleans things up and I can reply with a repo when ready, otherwise will reply once I've got better repro config. |
I had the same issue. That was mainly due to the missing npm package. Installed and restated Neovim and all is fine now. Using Arch Linux. |
@mttrms closing this for now but will take a look if you can get a repo set up! |
@thecrypticace sorry for insane delay here haha, lots of stuff got in the way and I just got used to updating the permissions on my project folder after every restart. I recently setup a new system though (Ubuntu on WSL) and went through my normal nvim setup and ran into it again. I decided to try fixing my config for a while, probably spent ~2 hours last night on that with no luck. I ended up installing LazyVim to see if an entirely separate config that seems to work with all LSPs would have the same issue.. and it did. I totally get not looking into this if it seems obscure or tiny. Last night I also updated my docker config to put the restricted folder outside of my project so at least I don't need to However I did spin up a little repo with some repro steps if you are interested in taking a look: https://github.com/mttrms/tailwind/tree/main README has everything you'll need for repro. Alternatively if you still know how you set your neovim config up I'd love to take a look at that to try that config out on either of my two linux boxes. |
Thanks! No worries on the delay — def get that hah. I'll take a look over the weekend! |
For the issue was the same as what @wxguy said in his comment I was trying to use the standalone cli version of it but the tailwindcss-language-server doesn't consider it at all. I wish this was more consistent with the mentioned promise of the standalone cli for those who would only use |
THANK YOU! I was pulling my hair trying to figure out why completions weren't working in Neovim. As soon as I installed the npm package, things went back to normal! Is there any way to configure the language server to use the standalone CLI instead ? |
Unfortunately, no there is not — sorry! I'd love for this to work in the future but that would require some significant work in the language server and in the CLI to make it possible. |
What version of VS Code are you using?
not using vscode, using neovim
What version of Tailwind CSS are you using?
v3.3.2
What package manager are you using?
npm
What operating system are you using?
linux
Tailwind config
Reproduction URL
any project just install the lsp and it's broke right now without doing anything
Describe your issue
install tailwindcss lsp, open project with tailwind no lsp and error:
Error 10:38:02 PM msg_show.lua_error Error executing vim.schedule lua callback: ...b/v0.9.1/nvim-linux64/share/nvim/runtime/lua/vim/lsp.lua:1309: RPC[Error] code_name = InternalError, message = "Request initialize failed with message: Bad file descriptor"
stack traceback:
[C]: in function 'assert'
...b/v0.9.1/nvim-linux64/share/nvim/runtime/lua/vim/lsp.lua:1309: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
The text was updated successfully, but these errors were encountered: