Code completion from script editor in custom CodeEdit?

There is a completion() function in the GDScriptTextDocument class, both are considered depricated, however. You are supposed to create your own LSP client as described here: