In the company where I am right now we use Lua for some smaller macros in our software, the software is programmed in Object Pascal. We have made our own Lua Functions we often use when developing macros.
Is there any possibility to integrate our own Lua Functions in Visual Studio Code ?
We would like to use Visual Studio Code to develop the Lua Scripts for our macros, it lightweight, easy to use and has plenty of extensions.
There are some extensions in VSCode that allow you to edit them for this type of thing, but they are very rare.
What you can do is try to create your own extension for your company, it's really easy, you can see how to start here, and see how to create content for your extension like commands here
Related
Recently I've been working on creating a new coding language with Python. Currently, I'm building the language on Replit, but I would like to switch to Visual Studio Code. I have a script containing the launguage's lexer, parser, etc, and I don't want to write a whole grammar (I'm currently making the language in a different way than most) for the language in order to switch to Visual Studio Code.
Is there a way I can "run" a text file and have Visual Studio Code provide the script for my language with the path to that file, and run it?
If this post isn't specific enough, please advise me on how to fix that.
I use AppleScript in my Mac for automating various processes in my computer. I know that Visual Studio Code does not have an AppleScript dictionary.
Is there any way to programmatically control Visual Studio Code eg using Python or any other programming language?
As an example I would like to programmatically get the path of the frontmost document.
I know that VSC has a JavaScript API . Can I use this for automation purposes?
I guess a lot of such automation / programmatic control can be done via the JavaScript extension API.
There is vscode.window.activeTextEditor, and that gives you document.fileName or document.uri for the filename, and selection.active to get you the cursor position (example).
It looks like this API allows for a lot of automation, e.g. moving cursor around, inserting text, etc.
There is vscode-ext (active fork) to write Python extensions. When you look at the code, you see that this provides a websockets bridge from JavaScript inside VSCode to Python in a separate process. This bridge could be use for controlling VSCode from some external process.
Further, I just learned about the Robot Framework / Robotic Process Automation (RPA) Framework (also with Python backend). I'm not sure but it might be helpful.
Pursuant to the discussion in Add XHTML support, I'd like to start creating an extension for Visual Studio Code which would implement support for XHTML. Which is HTML with XML syntax, so the the desired functionality is already (mostly?) implemented elsewhere – for XML and HTML languages, the latter having two extensions bundled with VS Code: html and html-language features. But it's disparate.
As the first step, should I clone the VS Code repo and delete everything except the two directories named html and html-language features? Or Language services for HTML? Or the latter and html from the former? Or start with html, make it work for XHTML and only then deal with language features?
Should the second step be just adding the extension(s) I'm developing on my computer to my installation of VS Code? The GUI seems to allow adding only extensions from the Visual Studio Marketplace. Is it the right solution to place the extensions under development into VS Code's directory for extensions (either directly or with symbolic links)? I'm on Manjaro Linux.
If you can offer any other helpful advice, I welcome it too.
I am totally new to creating extensions in VS Code, and all the official examples of extensions are written in Typescript/Javascript, which I have no experience with. Is it possible to create VS Code extensions in other languages, such as Python or C++?
If so, could anyone point me to any resources to get me started?
It is possible by creating a C++ module for Node.js, which can then be loaded like any other node module. Of course, some glue code written in JS or TS is necessary to register the extension and translate calls to/from vscode.
I've gone this way in my ANTLR4 extension, but gave up eventually, because of the troubles I had due to incompatible dependencies (you have to make sure the extension uses the exact same V8 version, which was used to build the underlying Node.js used by vscode, on all supported platforms).
This situation might have change, I don't know, but with that in the background I don't recommend it.
If you want to add support for a new language in vscode you can also write a separate language server, as is mentioned in the linked SO answer. For other type of work, I'm afraid, you have no alternative to use.
No, as #rioV8 said, since VSCode is an electron app and runs on Javascript.
We have a QA tool (SmartBear's TestComplete) that uses javascript as a scripting language, but names the file with a ".sj" extension instead of ".js". I would like to use Visual Studio Code to edit those files, with all the nice intellisense and other tooling that comes with it, but I can't figure out how to configure it to recognize .sj files as javascript files. Any ideas?
Answering my own question, just for future readers that may be searching for the same thing.
According to a tweet from #code, this is not yet possible, but is coming "soon".