Giter Site home page Giter Site logo

vscode-emmylua's People

Contributors

317806903 avatar chrisniael avatar cppcxy avatar dependabot[bot] avatar heanrum avatar hugebug4ever avatar tangzx avatar tinymins avatar whitecostume avatar yefansky avatar zfl9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-emmylua's Issues

Roadmap to 1.0.0 release

a public roadmap for features that need to be implemented would make it easier for people to collaborate.

it could be put in the readme.md

0.3.36版本打开 lua 文件时一直卡在 Emmy parse fail

  • Linux
    升级到 ci 最新版本后遇到插件不工作问题,lua 文件打开后插件一直在 parse 同一个文件,使用商城最新版时时 ok 的
    image
    image
Nov 30, 2019 6:56:46 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 46

Option to disable auto-inserting --- on newline

I love this extension, but I find this feature quite annoying. The idea is great, but it makes it so I can't finish a comment without using the mouse to click somewhere else in the editor first.

There should be an option to disable this, or (better yet) it could be locked behind a hotkey (shift+enter, etc.)

Failed to start "EmmyLua" language server!

Hi, all, Emmylua is so good.
The breakpoint worked, but it tips an message on the right-bottom corner:

Failed to start "EmmyLua" language server! Launching server using command C:\Program Files\Java\jdk1.8.0_40\bin\java.exe failed.
Try again

Should I install the java.exe manually?

希望增加支持:table域子成员存在性的逻辑表达式检查

user.session or user.session.time 就是错误的表达,若前面 user.session 为false,后面的 user.session.time 将报错。
事实上,上例应是写错了,实际为 user.session and user.session.time ,但肉眼检查困难,类似的错误书写还有 not user.session and user.session.time
希望提示错误“后面的表达式在语法上错误”

从vscode市场安装的emmylua,打开我的项目报如下异常。

java.lang.UnsupportedClassVersionError: com/tang/vscode/MainKt : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Exception in thread "main" [Info - 11:36:16 AM] Connection to server got closed. Server will restart.

卡在load lua 文件

一直卡在load lua 文件, 大概3秒一个文件,我的lua项目有1000多个lua文件,没法调试一次等他全部加载完,有一个报错不知道是不是这个原因导致,输出日志如下:
[B]Symbol : 'udp_open'
[B]Symbol : 'udp_strerror'
Found all necessary Lua functions [M:ulua.dll, V:510]
Debugger attached to process.
file not found:

    local function index(obj,name)        

    local meta=getmetatable(obj)

    local cached=meta.cache[name]        

    if cached then

       return cached

    else

       local value,isFunc = get_object_member(obj,name)

       if value==nil and type(isFunc)=='string' then error(isFunc,2) end

       if isFunc then

        meta.cache[name]=value

       end

       return value

     end

end

return index

file not found:chunk
file not found:

    local rawget = rawget

    local rawset = rawset

    local getmetatable = getmetatable      

    local type = type  

    local function index(obj,name)  

        local o = obj            

        local meta = getmetatable(o)            

        local parent = meta

        local v = nil

        

        while meta~= nil do

            v = rawget(meta, name)

            

            if v~= nil then

                if parent ~= meta then rawset(parent, name, v) end



                local t = type(v)



                if t == 'function' then                    

                    return v

                else

                    local func = v[1]

            

                    if func ~= nil then

                        return func(obj)                         

                    end

                end

                break

            end

            

            meta = getmetatable(meta)

        end



       error('unknown member name '..name, 2)

       return nil	        

    end

    return index

file not found:

    local rawget = rawget

    local getmetatable = getmetatable   

    local rawset = rawset     

    local function newindex(obj, name, val)            

        local meta = getmetatable(obj)            

        local parent = meta

        local v = nil

        

        while meta~= nil do

            v = rawget(meta, name)

            

            if v~= nil then

                if parent ~= meta then rawset(parent, name, v) end

                local func = v[2]

                if func ~= nil then                        

                    return func(obj, nil, val)                        

                end

                break

            end

            

            meta = getmetatable(meta)

        end  

   

        error('field or property '..name..' does not exist', 2)

        return nil		

    end

    return newindex

file not found:

    local rawget = rawget

    local getmetatable = getmetatable     



    local function call(obj, ...)

        local meta = getmetatable(obj)

        local fun = rawget(meta, 'New')

        

        if fun ~= nil then

            return fun(...)

        else

            error('unknow function __call',2)

        end

    end



    return call

file not found:

    local rawget = rawget                

    local getmetatable = getmetatable         



    local function indexEnum(obj,name)

        local v = rawget(obj, name)

        

        if v ~= nil then

            return v

        end



        local meta = getmetatable(obj)  

        local func = rawget(meta, name)            

        

        if func ~= nil then

            v = func()

            rawset(obj, name, v)

            return v

        else

            error('field '..name..' does not exist', 2)

        end

    end



    return indexEnum

load:F:/dingjie/client/fcity/Assets/Lua/System/Global.lua
load:System/Wrap.lua
load:System/class.lua
load:System/Math.lua
load:System/Layer.lua
load:System/CList.lua
load:System/Time.lua
load:System/Event.lua
load:System/Timer.lua
load:System/Vector3.lua
load:System/Vector2.lua
load:System/Quaternion.lua
load:System/Vector4.lua
load:System/Raycast.lua
load:System/Color.lua
load:System/Touch.lua
load:System/Ray.lua
load:System/Plane.lua
load:System/Bounds.lua
load:System/Coroutine.lua
load:System/List.lua
load:Common/define.lua
load:Common/functions.lua
load:Common/inspect.lua
load:System/Dictionary.lua
load:F:/dingjie/client/fcity/Assets/Lua/System/Main.lua
load:F:/dingjie/client/fcity/Assets/Lua/Startup.lua
load:GeneratedLua/CommonModule_pb.lua
load:GeneratedLua/Common_pb.lua
load:protobuf.lua
load:wire_format.lua
load:type_checkers.lua
load:encoder.lua
load:decoder.lua
load:listener.lua
load:containers.lua
load:descriptor.lua

关于只有打开过文件才能使Go to Definition 功能生效的问题。

-- b.lua

local b = {}

function b:Test()

end

return b

-- a.lua

local b = require("b.lua")

b:Test()

a和b都在同一个文件夹下,在vscode中按照folder的形式打开的,如果我没有打开过b文件,则没有办法获得代码提示和Go To Definition功能。如果打开过了,这两个功能就好用了。

重启vscode过后,还得重新打开b文件,才能继续使用这两个功能。

其他的可能涉及到跨文件访问的功能还没有测使

IDEA上是OK的,vscode上是不支持吗?

VSCODE: Version: 1.32.3 (user setup)
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.16299

EmmyLua 0.2.3

十分感谢!

Debugging on Mac?

Out of the box, debugging does not appear to work and documentation is very light. The two configurations that I'm currently trying (I've tried many others):

                {
            "type": "emmylua_launch",
            "request": "launch",
            "name": "Attach by launch program",
            "program": "${workspaceFolder}/lua",
            "captureStd": true,
            "captureOutputDebugString": false,
            "workingDir": "",
            "arguments": []
        },

        {
            "type": "emmylua_new",
            "request": "launch",
            "name": "EmmyLua New Debug",
            "host": "localhost",
            "port": 9966,
            "ext": [
                ".lua",
                ".lua.txt",
                ".lua.bytes"
            ],
            "ideConnectDebugger": true
        }

(I have lua in the workspaceFolder)

emmylua_launch Starts, and says Launch program with x64 debugger. in the DEBUG CONSOLE menu, and then does nothing. Debugging does not start.

emmylua_new

Brings up an error "Error: connect ECONNREFUSED 127.0.0.1.:9966"

Adding this to the file i'm debugging has no effect.

package.cpath = package.cpath .. ";/Users/andrewstarks/.vscode/extensions/tangzx.emmylua-0.3.28/debugger/emmy/mac/emmy_core.dylib"
local dbg = require("emmy_core")
dbg.tcpListen("localhost", 9966)

Is debugging supported on the Mac? If not, it would be good to include a warning on the Readme file, and a suggestion on a workaround (another package?)

Thank you!

Adding
It may be that attaching to an external process through mobdebug (or some other socket based method) is the right way, but this fails with

Ctrl+鼠标左键,对表(table)成员跳转(转到定义)问题

例如:
testTime = {}
testTime .__index = testTime

function testTime :ShowData()
....
end

假如上面的代码保存在a.lua
我在别的文件中:
OperateData是testTime的一个实例
OperateData:ShowData()
这句代码,按住Ctrl键,然后鼠标在ShowData上点击以实现跳转,但是在VSCode里没有反映,在Interllij里是可以的。

希望 upvalue 下划线能开出去配置

现在默认都是开着的,很影响代码的美观度,希望能开出个配置来控制。

// annotator.js
function updateDecorations() {
    D_PARAM = createDecoration("colors.parameter");
    D_GLOBAL = createDecoration("colors.global");
    D_DOC_TYPE = createDecoration("colors.doc_type");
    D_UPVALUE = createDecoration("", { textDecoration: "underline" });
}

code auto complete crash

it shows in output panel
"
һ�� 25, 2019 11:46:56 ���� shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
����: Internal error: shadow.kotlin.KotlinNullPointerException
java.util.concurrent.CompletionException: shadow.kotlin.KotlinNullPointerException
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: shadow.kotlin.KotlinNullPointerException
at shadow.com.tang.intellij.lua.psi.LuaPsiFile.getVirtualFile(LuaPsiFile.kt:18)
at com.tang.vscode.LuaFileResolver$findFile$1.process(LuaFileResolver.kt:25)
at com.tang.vscode.LuaFileResolver$findFile$1.process(LuaFileResolver.kt:8)
at com.tang.vscode.LuaWorkspaceService$WProject$process$continueRun$1.invoke(LuaWorkspaceService.kt:45)
at com.tang.vscode.LuaWorkspaceService$WProject$process$continueRun$1.invoke(LuaWorkspaceService.kt:39)
at com.tang.vscode.api.impl.Folder.walkFiles(Folder.kt:92)
at com.tang.vscode.api.impl.Folder.walkFiles(Folder.kt:94)
at com.tang.vscode.LuaWorkspaceService$WProject.process(LuaWorkspaceService.kt:42)
at com.tang.vscode.LuaFileResolver.findFile(LuaFileResolver.kt:24)
at com.tang.vscode.LuaFileResolver.find(LuaFileResolver.kt:14)
at shadow.com.tang.intellij.lua.ext.ILuaFileResolver$Companion.findLuaFile(ILuaFileResolver.kt:28)
at shadow.com.tang.intellij.lua.psi.LuaFileUtil.findFile(LuaFileUtil.kt:13)
at shadow.com.tang.intellij.lua.psi.LuaPsiResolveUtilKt.resolveRequireFile(LuaPsiResolveUtil.kt:165)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:173)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:43)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessTypeAt(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.impl.LuaExprListImpl.guessTypeAt(LuaExprListImpl.java:50)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt:140)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:139)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:44)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:37)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessParentType(LuaPsiImplUtil.kt:266)
at shadow.com.tang.intellij.lua.psi.impl.LuaIndexExprImpl.guessParentType(LuaIndexExprImpl.java:86)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$retTy$1.compute(Expressions.kt:346)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$retTy$1.compute(Expressions.kt)
at shadow.com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:110)
at shadow.com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard(utils.kt:23)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard$default(utils.kt:22)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:305)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:49)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:181)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:43)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessTypeAt(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.impl.LuaExprListImpl.guessTypeAt(LuaExprListImpl.java:50)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt:140)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:139)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:44)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:37)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessParentType$1.compute(LuaPsiImplUtil.kt:152)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessParentType$1.compute(LuaPsiImplUtil.kt)
at shadow.com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:24)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessParentType(LuaPsiImplUtil.kt:136)
at shadow.com.tang.intellij.lua.psi.impl.LuaClassMethodDefImpl.guessParentType(LuaClassMethodDefImpl.java:63)
at shadow.com.tang.intellij.lua.psi.LuaClassMemberKt.guessClassType(LuaClassMember.kt:36)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.resolveParamType(Declarations.kt:238)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:113)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:43)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:37)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessTypeAt(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.impl.LuaExprListImpl.guessTypeAt(LuaExprListImpl.java:50)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$getType$2.invoke(Expressions.kt:266)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$getType$2.invoke(Expressions.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.getType(Expressions.kt:265)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.access$getType(Expressions.kt:1)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$set$1.compute(Expressions.kt:214)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$set$1.compute(Expressions.kt)
at shadow.com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:110)
at shadow.com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard(utils.kt:23)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard$default(utils.kt:22)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:210)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:47)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider.addMember(ClassMemberCompletionProvider.kt:141)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider$addClass$1.invoke(ClassMemberCompletionProvider.kt:122)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider$addClass$1.invoke(ClassMemberCompletionProvider.kt:42)
at shadow.com.tang.intellij.lua.ty.TyClass.processMembers(TyClass.kt:108)
at shadow.com.tang.intellij.lua.ty.ITyClass$DefaultImpls.processMembers(TyClass.kt:41)
at shadow.com.tang.intellij.lua.ty.TyClass.processMembers(TyClass.kt:69)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider.addClass(ClassMemberCompletionProvider.kt:118)
at shadow.com.tang.intellij.lua.editor.completion.LocalAndGlobalCompletionProvider.addCompletions(LocalAndGlobalCompletionProvider.kt:114)
at shadow.com.tang.intellij.lua.editor.completion.LuaCompletionProvider.addCompletions(LuaCompletionProvider.kt:27)
at shadow.com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at shadow.com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:129)
at shadow.com.tang.intellij.lua.editor.completion.CompletionService.collectCompletion(CompletionService.kt:61)
at com.tang.vscode.LuaTextDocumentService$completion$1.invoke(LuaTextDocumentService.kt:341)
at com.tang.vscode.LuaTextDocumentService$completion$1.invoke(LuaTextDocumentService.kt:43)
at com.tang.vscode.utils.UtilsKt$computeAsync$1.apply(utils.kt:164)
at com.tang.vscode.utils.UtilsKt$computeAsync$1.apply(utils.kt)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
... 6 more

[Error - 11:46:56 AM] Request textDocument/completion failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: shadow.kotlin.KotlinNullPointerException
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604)
at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: shadow.kotlin.KotlinNullPointerException
at shadow.com.tang.intellij.lua.psi.LuaPsiFile.getVirtualFile(LuaPsiFile.kt:18)
at com.tang.vscode.LuaFileResolver$findFile$1.process(LuaFileResolver.kt:25)
at com.tang.vscode.LuaFileResolver$findFile$1.process(LuaFileResolver.kt:8)
at com.tang.vscode.LuaWorkspaceService$WProject$process$continueRun$1.invoke(LuaWorkspaceService.kt:45)
at com.tang.vscode.LuaWorkspaceService$WProject$process$continueRun$1.invoke(LuaWorkspaceService.kt:39)
at com.tang.vscode.api.impl.Folder.walkFiles(Folder.kt:92)
at com.tang.vscode.api.impl.Folder.walkFiles(Folder.kt:94)
at com.tang.vscode.LuaWorkspaceService$WProject.process(LuaWorkspaceService.kt:42)
at com.tang.vscode.LuaFileResolver.findFile(LuaFileResolver.kt:24)
at com.tang.vscode.LuaFileResolver.find(LuaFileResolver.kt:14)
at shadow.com.tang.intellij.lua.ext.ILuaFileResolver$Companion.findLuaFile(ILuaFileResolver.kt:28)
at shadow.com.tang.intellij.lua.psi.LuaFileUtil.findFile(LuaFileUtil.kt:13)
at shadow.com.tang.intellij.lua.psi.LuaPsiResolveUtilKt.resolveRequireFile(LuaPsiResolveUtil.kt:165)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:173)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:43)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessTypeAt(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.impl.LuaExprListImpl.guessTypeAt(LuaExprListImpl.java:50)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt:140)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:139)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:44)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:37)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessParentType(LuaPsiImplUtil.kt:266)
at shadow.com.tang.intellij.lua.psi.impl.LuaIndexExprImpl.guessParentType(LuaIndexExprImpl.java:86)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$retTy$1.compute(Expressions.kt:346)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$retTy$1.compute(Expressions.kt)
at shadow.com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:110)
at shadow.com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard(utils.kt:23)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard$default(utils.kt:22)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:305)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:49)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:181)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:43)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessTypeAt(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.impl.LuaExprListImpl.guessTypeAt(LuaExprListImpl.java:50)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt:140)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt$infer$1.invoke(Declarations.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:139)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:44)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:37)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessParentType$1.compute(LuaPsiImplUtil.kt:152)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessParentType$1.compute(LuaPsiImplUtil.kt)
at shadow.com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:24)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessParentType(LuaPsiImplUtil.kt:136)
at shadow.com.tang.intellij.lua.psi.impl.LuaClassMethodDefImpl.guessParentType(LuaClassMethodDefImpl.java:63)
at shadow.com.tang.intellij.lua.psi.LuaClassMemberKt.guessClassType(LuaClassMember.kt:36)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.resolveParamType(Declarations.kt:238)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:113)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:43)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:37)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt$guessTypeAt$1.invoke(LuaPsiImplUtil.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.psi.LuaPsiImplUtilKt.guessTypeAt(LuaPsiImplUtil.kt:259)
at shadow.com.tang.intellij.lua.psi.impl.LuaExprListImpl.guessTypeAt(LuaExprListImpl.java:50)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$getType$2.invoke(Expressions.kt:266)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$getType$2.invoke(Expressions.kt)
at shadow.com.tang.intellij.lua.search.SearchContext.withIndex(SearchContext.kt:42)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.getType(Expressions.kt:265)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.access$getType(Expressions.kt:1)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$set$1.compute(Expressions.kt:214)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt$infer$set$1.compute(Expressions.kt)
at shadow.com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:110)
at shadow.com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:65)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard(utils.kt:23)
at shadow.com.tang.intellij.lua.ext.UtilsKt.recursionGuard$default(utils.kt:22)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.infer(Expressions.kt:210)
at shadow.com.tang.intellij.lua.ty.ExpressionsKt.inferExpr(Expressions.kt:47)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.inferInner(Declarations.kt:42)
at shadow.com.tang.intellij.lua.ext.ILuaTypeInfer$Companion.infer(ILuaTypeInfer.kt:27)
at shadow.com.tang.intellij.lua.ty.DeclarationsKt.infer(Declarations.kt:36)
at shadow.com.tang.intellij.lua.psi.LuaTypeGuessable.guessType(LuaTypeGuessable.java:30)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider.addMember(ClassMemberCompletionProvider.kt:141)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider$addClass$1.invoke(ClassMemberCompletionProvider.kt:122)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider$addClass$1.invoke(ClassMemberCompletionProvider.kt:42)
at shadow.com.tang.intellij.lua.ty.TyClass.processMembers(TyClass.kt:108)
at shadow.com.tang.intellij.lua.ty.ITyClass$DefaultImpls.processMembers(TyClass.kt:41)
at shadow.com.tang.intellij.lua.ty.TyClass.processMembers(TyClass.kt:69)
at shadow.com.tang.intellij.lua.editor.completion.ClassMemberCompletionProvider.addClass(ClassMemberCompletionProvider.kt:118)
at shadow.com.tang.intellij.lua.editor.completion.LocalAndGlobalCompletionProvider.addCompletions(LocalAndGlobalCompletionProvider.kt:114)
at shadow.com.tang.intellij.lua.editor.completion.LuaCompletionProvider.addCompletions(LuaCompletionProvider.kt:27)
at shadow.com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
at shadow.com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:129)
at shadow.com.tang.intellij.lua.editor.completion.CompletionService.collectCompletion(CompletionService.kt:61)
at com.tang.vscode.LuaTextDocumentService$completion$1.invoke(LuaTextDocumentService.kt:341)
at com.tang.vscode.LuaTextDocumentService$completion$1.invoke(LuaTextDocumentService.kt:43)
at com.tang.vscode.utils.UtilsKt$computeAsync$1.apply(utils.kt:164)
at com.tang.vscode.utils.UtilsKt$computeAsync$1.apply(utils.kt)
at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
... 6 more

"

变量类型声明

A.lua中

---@class A
local a = {}

--- @alias print fun():void
--- @desc 打印
--- @return void
function a.print()
end

return a

B.lua中

---@type A
local a = require "a"

---@see print
_G.print = a.print

在A.lua 中 查看函数的定义为
image

在B.lua 中 在 a.print处停留查看的信息为
image
在 _G.print 处查看定义为
image

想问问现有的机制中,如何才能让 _G.print处看到的定义 和 A.lua中还有B.lua中的 a.print处的一致

再延伸点
将一个写好emmylua注释标签的变量,作为等式左值赋值给等式右值。 左值能够用上右值的声明

期望的样子可能是:

  1. 针对上面的使用情景,类和类中的成员函数
---@type A#print
_G.print = a.print
  1. 或者更简单粗暴的, 直接等价于类型A,适用于所有类型的变量
---@aliasType A
_G.print = aDefinedFunValue

Configure indentation

EmmyLua ignores VSCode's indentation settings, as well as .editorconfig.
I am unable to select the indentation that is required for the project.

What I expect: When running "Format Document" action, EmmyLua should format the file with the configured indentation (tabs).

What happens: The file is formatted using 4 spaces as indentation.

Details

My `settings.json:

    "[lua]": {
        "editor.tabSize": 2,
        "editor.insertSpaces": false,
        "editor.defaultFormatter": "tangzx.emmylua"
    },

Selected indentation on the edited .lua file is Tab Size: 2

My .editorconfig:

root = true

[*]
indent_style = tab
indent_size = 2

vscode unity debug

使用attach方式附加到unity进程显示一堆
file not found: xxx

xxx 为我工程lua文件名

在lauch.json中添加
"cwd": "${workspaceFolder}",
还是一样


在settings.json中添加
"emmylua.source.roots": ["${workspaceFolder}"],
"emmylua.java.home": "C:/Program Files/Java/jdk1.8.0_181",
结果还是一样
我的workspaceFolder就是lua的工作目录
lua文件是以.lua结尾

VSCode的0.3.36版本配置lua脚本根目录在setting里面配置不生效

Environment(环境)

name version
IDEA version [e.g. IC2018.2 EAP, CL2018.1.2]
EmmyLua version [e.g. v1.2.5]
OS [e.g. OSX 10.13.4, Windows 10]

What are the steps to reproduce this issue?(重现步骤?)

What happens?(出现什么问题?)

What were you expecting to happen?(期望?)

Any logs, error output, etc?(有没有什么log, error输出?)

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?(其它说明)

Graphical glitch when using big Lua files (OutOfMemoryError).

I love this extension and cannot say thank you enough, but it only seems to work to a certain point in terms of how much code I write in a file. When the file is roughly 900+ lines long (or maybe it is because the annotation feature (i.e. ---@class, ---@param, etc...) are being used across too many files?) I tend to get the exception below and then all the colors of the code flickers and distorts. I think this is because of the Request textDocument/completion failed error due to java.lang.OutOfMemoryError but could be wrong. My machine has 32GB of RAM and I don't have any memory issues so not sure what to suggest. Seems like some sort of memory leak problem.

Also, I'm not sure if all of this is related to the same problem (maybe the remote endpoint exception is a different issue) but included the full error report just in case.

image

image

image

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at shadow.org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:67)
	at shadow.org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
	at shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
	at shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
	at shadow.org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:192)
	at shadow.org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:94)
	at shadow.org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:99)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at shadow.org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$null$0(GenericEndpoint.java:65)
	... 11 more
Caused by: java.lang.OutOfMemoryError: Java heap space

Feb 07, 2019 8:07:01 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint fallbackResponseError
SEVERE: Internal error: java.lang.OutOfMemoryError: Java heap space
java.util.concurrent.CompletionException: java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.OutOfMemoryError: Java heap space

[Error - 08:07:01] Request textDocument/completion failed.
  Message: Internal error.
  Code: -32603 
java.util.concurrent.CompletionException: java.lang.OutOfMemoryError: Java heap space
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
	at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:604)
	at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
	at java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:443)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.lang.OutOfMemoryError: Java heap space

Feb 07, 2019 8:07:04 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 222
Feb 07, 2019 8:07:06 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 223
Feb 07, 2019 8:07:07 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 227
Feb 07, 2019 8:07:12 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 226
Feb 07, 2019 8:07:15 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 234
Feb 07, 2019 8:07:24 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 264
Feb 07, 2019 8:07:24 AM shadow.org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 260

"Can't find Java!" on openjdk

Environment

  • EmmyLua version: 0.2.5
  • Java version: openjdk version "1.8.0_212-3-redhat"
  • VSCode version: 1.33.1

Error message

Can't find Java! Please install Java 1.8 or above and set JAVA_HOME environment variable.

Related commit

"validate java" commit b7eb826

"src/extension.ts"

async function validateJava() {
...
            let regexp:RegExp = /java version "((\d+)\.(\d+).+?)"/g;
...
}

This regexp will never match version string of openjdk.

  • java -version (RedHat openjdk) outputs:

    openjdk version "1.8.0_212-3-redhat"
    OpenJDK Runtime Environment (build 1.8.0_212-3-redhat-b04)
    OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
    
  • java -version (Oracle Java SE) outputs:

    java version "1.8.0_212"
    Java(TM) SE Runtime Environment (build 1.8.0_212-b10)
    Java HotSpot(TM) 64-Bit Server VM (build 25.212-b10, mixed mode)
    

about Java version information

How to find the JVM version from a program?

connect ECONNREFUSED

I'm currently using EmmyLua for vscode on Windows and came across this error with new debugger. I have already disabled firewall.

image

Option to ignore subdirectories

Hi,
Is it possible to have EmmyLua ignore (don't parse) certain directories? In my project I have an out/ directory with bundled and/or minified code. Sometimes "go to definition (F12)" goes to the built .lua files instead of actual sources, and type annotations don't update until I rebuild the bundles.

0.3.33及以上版本不能在unbuntu里运行

Environment(环境)

name version
IDEA version [e.g. IC2018.2 EAP, CL2018.1.2]
EmmyLua version [e.g. v1.2.5]
OS [e.g. OSX 10.13.4, Windows 10]

What are the steps to reproduce this issue?(重现步骤?)

What happens?(出现什么问题?)

What were you expecting to happen?(期望?)

Any logs, error output, etc?(有没有什么log, error输出?)

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Any other comments?(其它说明)

lua格式bug

在使用过程中发现2个格式方面的问题,需要大佬能优化下
1.有中文变量的时候不能 格式化文档[附图1]
2.在函数内写的代码如果顶格写了,折叠的时候不会折叠(虽然这么写代码看上去很不优雅)
[附图2]

Uploading 1.png…

2

How to use debugger in vscode

I'm new to Emmylua and have no idea how remote or attach debug works. Do i need mobdebug.lua in my source files for debugger to work? There are instructions for IntelliJ but not for vscode :(

Step over F10 not working as intended

I'm using EmmyLua with LOVE2D and not sure if this is a new feature or not. But when i put a breakpoint and then hit F10, the debugger doesn't move to next statement but instead goes back to that breakpoint on the next frame (similar to F5). I had to manually set continuous breakpoints as a workaround to debug next statements.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.