NightrainsRbx / RobloxLsp

Roblox Luau Language Server based on Lua by sumneko.
https://devforum.roblox.com/t/roblox-lsp-full-intellisense-for-roblox-and-luau/717745
MIT License
213 stars 51 forks source link

How Can I Use This With Neovim LSP #183

Open amarakon opened 2 years ago

amarakon commented 2 years ago

I am using nvim-lspconfig and nvim-cmp for Language Server Protocol completion. How can I use RobloxLsp to autocomplete with my setup?

WorshipMeOrElse commented 2 years ago

I have found a multitude of people talking about this over the roblox open source community discord. Haven't been able to fully figure it out but it is based off of sumneko's lua lsp so do with that what you will ^-^

techs-sus commented 2 years ago

hello, fellow neovim user here the hack im using to load robloxlsp is symlinking it to /usr/bin/lua-language-server note this is not a finished solution, it might break in sometime, but I have been using this for a few months now

https://user-images.githubusercontent.com/92276908/190870502-2d0cb682-678a-4565-941e-c9cd59f9d48c.mp4

WorshipMeOrElse commented 2 years ago

alright, I found a more detailed solution you can just use the sunmeko lua setup, since it just looks for a path variable named "lua-language-server" and roblox-lsp uses the same name for its binary, you could just slap it into the path and neovim will start using that

as for nvim-cmp you should be able to find a wiki page on how to use it with the native lsp config

amarakon commented 2 years ago

But I don't want to replace sumneko lua's binary.

NightrainsRbx commented 2 years ago

Using sumneko-lua is the easiest way to do it, since Roblox LSP is a fork of it, the binaries should be the same, You have to replace the server folder