Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

IntelliSense for CMO via VSCode Sumneko and Emmy

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> IntelliSense for CMO via VSCode Sumneko and Emmy Page: [1]
Login
Message << Older Topic   Newer Topic >>
IntelliSense for CMO via VSCode Sumneko and Emmy - 8/30/2021 7:26:27 PM   
KnightHawk75

 

Posts: 1244
Joined: 11/15/2018
Status: offline
So I've been working on this for myself but but figured I'd share it since it's in a ~usable state, for myself anyway.

I've implemented nearly the entire CMO Lua documentation in a EmmyLua/sumneko workspace library that can be used with VSCode if you have sumneko's Lua language extension installed (a few easy clicks and a restart of VSCode).

VSCode: https://code.visualstudio.com/Download (free)
Finding sumneko's plugin for install and configuration after install and restarting VSCode (free)

Configuring your workspace to use the CMO_1147 workspace library files.


Example of what this buys you with a little usage of Emmy Lua comment 'type' tagging. If nothing else it's been handy as hell to not have to leave VSCode to look something up. The CMO__Constants are really just for hints and quick lookup reminders (though there is nothing preventing you from actually using them and loading them into a scene if you wanted too, though I may rework some of them. Also saves one from having to exclude all the built-in CMO functions to be ignored by the undefined-globa-diagnostics.

All functions are in there (unless I forgot one due to eyes glazing over) including some deprecated ones so that it could still be used for CMANO maybe too I think, though flagged a bunch depreciated. Additionally some less than documented ones are in there, along with fields here and there that have never made it into the docs. That said more or less it's the same as the website, with some corrections, and probably now a few of my own goofs.

Now onto the pics to give you idea of how it looks when in use. [click thumbnails for full image (and maybe a second time if better res is needed)]





Now I don't really use it the way it's demo'd there (I use it more for hints to jog memory), nor is any of that code remotely logical I was just typing random stuff to provoke the IntelliSense. I still have more to do over time, such as circle back to dbquery, implement each specific event trigger and action type separately for more convenience, not to mention lord knows how many spelling mistaking and display formatting that needs more tweaking. But don't expect too much more or things to work like other languages might I'm surprised I got working decently at all tbh give limitations of emmy and lua types in general.


In the attached zip there are two folders:
\CMO_1147 - The content in here represents the emmy-sumneko library.
\CMO_TestWorkspace - A sample VSCode workspace that you should just be able to open and then re-configure the Lua workspace user library setting to point to the path where ever you unzipped \CMO_1147 too.

If any of you actually try it out and have questions or actually find it useful let me know.



Attachment (1)

< Message edited by KnightHawk75 -- 9/5/2021 11:13:13 AM >
Post #: 1
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 8/30/2021 8:19:50 PM   
BDukes

 

Posts: 1444
Joined: 12/27/2017
Status: offline
Well done. Will check it out

Mike

_____________________________

Don't call it a comeback...

(in reply to KnightHawk75)
Post #: 2
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/5/2021 12:23:04 AM   
BDukes

 

Posts: 1444
Joined: 12/27/2017
Status: offline
Installed tonight.

Very helpful. I've scratched the surface but it's already saved me a buttload of time not having to look something up.. Enjoy Sainthood!

Mike

_____________________________

Don't call it a comeback...

(in reply to BDukes)
Post #: 3
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/5/2021 5:08:51 AM   
Kushan04


Posts: 620
Joined: 6/29/2005
Status: offline
Got it setup tonight as well and merged my existing lua workspaces into it.

Thank you for this. Only scratched the surface as well but I can already tell this is going to save me a lot of time.

_____________________________


(in reply to BDukes)
Post #: 4
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/5/2021 11:11:06 AM   
KnightHawk75

 

Posts: 1244
Joined: 11/15/2018
Status: offline

quote:

ORIGINAL: Kushan04

Got it setup tonight as well and merged my existing lua workspaces into it.

Thank you for this. Only scratched the surface as well but I can already tell this is going to save me a lot of time.


Glad to hear it.

(in reply to Kushan04)
Post #: 5
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/6/2021 5:13:54 PM   
Dimitris

 

Posts: 13122
Joined: 7/31/2005
Status: online
This is SUPER helpful, thanks a lot!

_____________________________


(in reply to KnightHawk75)
Post #: 6
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/6/2021 10:54:59 PM   
KnightHawk75

 

Posts: 1244
Joined: 11/15/2018
Status: offline

quote:

ORIGINAL: Dimitris

This is SUPER helpful, thanks a lot!

You're welcome. Thanks for the feedback.
I'll try and keep it up to date and improve it over time (where possible).


(in reply to Dimitris)
Post #: 7
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/13/2021 12:49:21 AM   
Struan76


Posts: 36
Joined: 9/3/2019
Status: offline
This is really nice, I just got around to setting it up today. Thanks for being so generous in sharing your code and your time.

(in reply to KnightHawk75)
Post #: 8
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/13/2021 7:47:06 AM   
Parel803

 

Posts: 475
Joined: 10/10/2019
From: Netherlands
Status: online
KnightHawk, thank you, looks great. No doubt I'll gonna have quetions later on :-)
For now it looks for me to be used as reference.
best regards Gert-Jan

(in reply to Struan76)
Post #: 9
RE: IntelliSense for CMO via VSCode Sumneko and Emmy - 9/21/2021 12:05:49 AM   
jkgarner

 

Posts: 174
Joined: 4/30/2020
Status: offline
Most excellent!
Thank you Knight Hawkings!

(in reply to Parel803)
Post #: 10
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Command: Modern Operations series >> Mods and Scenarios >> Lua Legion >> IntelliSense for CMO via VSCode Sumneko and Emmy Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.188