vscode-lua icon indicating copy to clipboard operation
vscode-lua copied to clipboard

Module 'self' autocompletion

Open macjabeth opened this issue 8 years ago • 2 comments

It would be nice to have autocompletion for modules using the 'self' parameter.

module = {
  enabled = false,
  toggle = function(self)
    -- autocompletion for 'enabled' here
    self.enabled = not self.enabled
  end
}

macjabeth avatar Apr 24 '17 17:04 macjabeth

This might be a little tricky as self isn't explicitly tied to the table, so it could become ambiguous on more complex scenarios. The same issue appears on methods where self is transparently passed into the scope, as meta-methods can affect how fields are accessed and throw off the analysis pass.

trixnz avatar May 28 '17 17:05 trixnz

This will make vscode-lua a REAL lua ide 👍

momadacoding avatar Aug 07 '17 06:08 momadacoding