dapetcu21 / atom-autocomplete-lua

Extensible autocomplete+ provider for Lua
35 stars 6 forks source link

.luacompleterc has no effect #3

Closed ThaisRobba closed 7 years ago

ThaisRobba commented 7 years ago

I've been trying to add some entries to my .luacompleterc but nothing seems to get triggered. For example:

{
  "global": {
    "type": "table",
    "fields": {
      "counter": {
        "type": "number"
      }
    }
  }
}

This should work but I get no autocomplete suggestions. The rc file is in my project root, I have tried reloading Atom... am I doing something wrong?

Runnning on: Linux, Atom 1.11.2

PS: I freaking love this plugin, great work!

dapetcu21 commented 7 years ago

I can't seem to be able to reproduce. I tried adding your .luacompleterc in my project root and it works. Is the file you're trying to edit saved or untitled? For it to work, the file must be saved somewhere inside the directory where you have .luacompleterc.

I'll try on Linux tomorrow, but I doubt there would be anything different. (I'm on OS X)

ThaisRobba commented 7 years ago

Files are saved and within the project. Attached a screenie of the file structure:

captura de tela de 2016-10-23 19-28-33

dapetcu21 commented 7 years ago

That's weird. Can you confirm this happens with an empty project? Like, just the .luacompleterc and a lua file?

Also, if you're interested in debugging, you can open the dev tools and place breakpoints in lib/options/luacompleterc.js to try to find out what's happening there. The code is pretty straightforward. Only thing to watch out is that stepping behaves a little funky in async and generator functions.

ThaisRobba commented 7 years ago

Apparently it is a problem with the community package of Atom, in Arch Linux. Using the package in AUR fixed the issue. Sorry about that! :-)