trevordevore / levure

Application development framework for LiveCode
MIT License
32 stars 14 forks source link

app.yml setting for external editor port #104

Closed macMikey closed 5 years ago

macMikey commented 5 years ago

It doesn't look like there's an option to define the port that levure will listen to when calling levureLoadExternalEditorServer

Granted you can call it with a port number (but I had to do a bit of reading to discover that). The wiki could be updated, the application.livecodescript could discuss it, or we could have an option right in app.yml to configure it.

The bonus of the last one is that there wouldn't be the need to uncomment the levureLoadExternalEditorServer call in app.livecodescript, then, either.

macMikey commented 5 years ago

Workaround: Create a .env file inside the app folder contents of the file:

EXTERNAL_EDITOR_PORT=<port number>

Note that if you don't include the CR after the end of the line, levure will throw an error because the read file routine won't see the eof.

trevordevore commented 5 years ago

To me this is just a documentation issue. The EXTERNAL_EDITOR_PORT setting in the .env file (preferred) and levureLoadExternalEditorServer taking a port parameter need to be added to the docs at https://github.com/trevordevore/levure/wiki/Using-Sublime-Text-with-Levure#notifying-livecode-of-script-only-stack-updates.

I don't like the idea of adding the port to app.yml as different developers on a project might use different ports.

Ideally a plugin would run in the IDE that watched project files being modified on disk and then reloaded them. Then we could do away with levureLoadExternalEditorServer completely.

trevordevore commented 5 years ago

I've added a description of using .env to the docs.