EmmyLua / EmmyLua-LanguageServer

153 stars 27 forks source link

No completion of built-in modules #13

Closed wbthomason closed 3 months ago

wbthomason commented 5 years ago

I cannot get any completions from built-in modules (e.g. os, io, etc.). Completion works for tables I define, and most of the rest of the LS functionality works fine, so I don't think I have a configuration error. All that seems to fail is getting completions from these built-in modules. I'm using coc.nvim with the instructions given for EmmyLua-LS here: https://github.com/neoclide/coc.nvim/wiki/Language-servers#lua - am I missing something? Thanks!

ZSaberLv0 commented 3 years ago

any updates?

I'v found the stdFolder option in LuaLanguageServer.kt, but it does not work:

call coc#config('languageserver.EmmyLua', {
        \   'command': &shell,
        \   'args': [&shellcmdflag, 'java -cp EmmyLua-LS-all.jar com.tang.vscode.MainKt'],
        \   'filetypes': ['lua'],
        \   'initializationOptions': {
        \     'stdFolder': 'path_to_this_repo/std/Lua54',
        \   },
        \ })

EDIT:

iqgrande commented 3 years ago

I just wanted to post that I am interested in this as well and would like for the server to handle the built-in modules. I am very appreciative of this project and all of the hard work this team has done. Thank you.

ZSaberLv0 commented 3 years ago

there's a workaround, copy the contents of https://github.com/EmmyLua/IntelliJ-EmmyLua/tree/master/src/main/resources/std/Lua54 to your project (or to one of your project's sub dir)

but obviously that's not very convenient

maximryzhov commented 3 years ago

any updates?

I'v found the stdFolder option in LuaLanguageServer.kt, but it does not work:

You need to specify it as a URI, e.g.

"stdFolder": "file:///C:/EmmyLua-LanguageServer/res/std"
ZSaberLv0 commented 3 years ago
"stdFolder": "file:///C:/EmmyLua-LanguageServer/res/std"

it works!

johalun commented 3 years ago

How do I pass stdFolder to emmy in spacemacs on macos?

CppCXY commented 3 months ago

use emmylua-analyzer instead of this