Alloyed / lua-lsp

A Lua language server
MIT License
288 stars 21 forks source link

copy from the atom plugin #1

Closed Alloyed closed 6 years ago

Alloyed commented 7 years ago

https://github.com/dapetcu21/atom-autocomplete-lua

Alloyed commented 7 years ago

Update: I've got a weird 3-step solution for taking the builtin completion files written for atom-autocomplete and integrating them into lua-lsp. This involves compiling the json to require()able lua files, and then translating the fields at runtime. Not the most efficient approach but it works.

The same thing should work for loading the json files directly at runtime (minus the compilation step), which means we'll be able to support the .luacompleterc format

pablomayobre commented 7 years ago

It would be great if you also supported packages compatibles with autocomplete-lua like love-atom

Alloyed commented 7 years ago

I found the love-atom completions already, actually, and naturally felt like it'd be something to include~

I'm not sure what the right approach is for user packages, though, because for example the defold package has a lot of custom code to get the right completion set. Maybe "send me an issue" is good enough?

pablomayobre commented 7 years ago

I think it would be better if you had a command to provide a JSON string in .luacheckrc format in runtime and that is probably is it