Bug 109034 - Suggestion -- VS Code integration into LibreOffice
Summary: Suggestion -- VS Code integration into LibreOffice
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-09 13:27 UTC by Zev Spitz
Modified: 2017-09-14 21:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zev Spitz 2017-07-09 13:27:43 UTC
Description:
Currently, LibreOffice supports 4 different macro languages (Basic, Javascript, BeanShell, Python) using 3 different editors (Python doesn't have a built-in editor). Of these, the Base editor, which has seen the most investment, still has rudimentary Intellisense (no description of items, no parameter lists for methods) as an only experimental feature.

VS Code is a mature and extensible editor for multiple languages. It can be used with any language server that communicates over the Language Server Protocol (https://github.com/Microsoft/language-server-protocol). (There are already language server implementations for Javascript and Python). Debugging is provided with a debugging extension (https://code.visualstudio.com/docs/extensions/example-debuggers).

I think that providing a unified code editing experience for multiple languages, built on VS Code's powerful UI, intellisense and debugging framework, would be a great boon for macro editing in LibreOffice. It would also free up development efforts from reinventing the wheel when adding features to the various code editors.

(I've opened an corresponding issue on VS Code at https://github.com/Microsoft/vscode/issues/30307).

Steps to Reproduce:
Tools -> Macros -> Organize Macros

Actual Results:  
NA

Expected Results:
NA


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Comment 1 Zev Spitz 2017-09-14 21:58:20 UTC
There are now TypeScript definitions for the LibreOffice API under an Automation host. This allows using VS Code (and other TypeScript supporting editors) to write code that automates LibreOffice (via Automation), with Intellisense for members and parameters, type-safety, Find all references / Go to definition, and in-place displayed documentation (via JsDoc).

This serves as a proof-of-concept for the idea of creating language servers and implementing the VS Code debug API, for the various LibreOffice embeddable macro languages.