vscode-extensions

Visual Studio Code Language Extension Inherit Existing

不打扰是莪最后的温柔 提交于 2019-12-11 12:54:40
问题 In Visual Studio Code it is relatively easy to add your own Language Extension just by providing a grammar file, e.g. via JSON. I want to provide a syntax file for a particular script language I use. The script language is embedded in ARM Assembly source code, which there already exists a plugin for. So I basically want to extend the ARM Extension by my script language. Is that currently possible? This would IMO be the way to go in my case, because if I just copy the existing extension (Which

Is it possible to generate a Visual Studio Code extension with C#?

假装没事ソ 提交于 2019-12-11 10:57:07
问题 I am working on adding a new language support to vscode, and I have finished a debugger with C#, but this is modified from the mono-debugger sample provided in vscode document. Now I would like to make a language service, so I would like to know if it is possible to do it with C#? 回答1: This is possible if you use an abstraction layer called the Language Server Protocol. Theoretically, it gives you the freedom to implement language support in any language that supports socket communication.

How do I hide a command in the palette menu from my extension in VS Code

微笑、不失礼 提交于 2019-12-11 08:58:32
问题 I am building a VS Code extension starting from this page. Now I want to hide in the palette menu the command extension.timerStart after I run it. I have read this page, didn't helped. I have the code bellow for package.json. How do I make the varFromMyExtension===false part work? "contributes": { "commands": [ { "command": "extension.timerStart", "title": "Timer Start" } ], "menus": { "commandPalette": [ { "command": "extension.timerStart", "when": "varFromMyExtension===false" } ] } 回答1: I

Visual Studio Code extension that includes offline HTML

杀马特。学长 韩版系。学妹 提交于 2019-12-11 07:59:28
问题 Is it possible for a VSCode extension to include HTML that are written to disk somewhere (doesn't matter where) when the extension is installed, so that I can then open that HTML from links? E.g. I want a link to the offline documentation for a function in its tooltip. 回答1: Yes, your extension can use the standard node apis to download the files. Then you can: Use the standard VS Code apis to open the file as a text document Use the markdown.showPreview command to open the file as a html

Unit test functions that use vscode extension api functions

霸气de小男生 提交于 2019-12-11 06:51:56
问题 I am trying to figure out a way to unit test functions, which include helper functions included in the vscode extension api, such as showQuickPick . Example usage: vscode.window.showQuickPick(['one', 'two']); . I have been trying to stub and mock those, but while I am not sure if that's even the right way to go, I haven't had any luck with it anyway. A complete example could look something like: logic.js export async function unitTestMe(): Promise<string> { const quickPickAnswer: string =

How to customize command palette color when creating vscode theme

ぃ、小莉子 提交于 2019-12-11 01:37:08
问题 Creating a VSCode theme for myself. I like the color configuration I have at the moment, but when I open the command palette, it is 'see-through' making it hard to read. How can I configure the palette when designing my theme? 回答1: To change the background of the command palette, modify the sideBar.background setting. More info I had the exact same problem as you so I went hunting for it in the docs. At first I thought it was a list colour setting because changing list.focusBackground changes

Can I Extend an Existing Colorizer or Language in VS Code

这一生的挚爱 提交于 2019-12-11 00:15:49
问题 What I'd like to do is create an extension that extends HTML support - that is it does everything that HTML support does and more, which includes the following: Syntax Highlighting (colorizer) IntelliSense Format HTML Emmet snippets These details are listed on this page HTML Programming in VS Code Ultimately I would like to create an extension that supports Liquid Templating syntax highlighting and auto complete. I've gotten #1 to work on it's own as a colorizer, and #2 can be accomplished

Can VS Code extensions get URI requests from other programs?

女生的网名这么多〃 提交于 2019-12-10 23:26:27
问题 I found information on the official docs that onUri can be used as an activation event. So, my extension can be activated from, say, a WPF program written in C# by calling the URI such as vscode://myextension/arg1=foo&arg2=bar . But nowhere does it say how I can get the arguments that were passed with the URI request. Or even just get a raw string of it. My question is, can it be done and if not, is there any other way to make a VS Code extension interact with another program? 回答1: Yes, you

VSCode: Add new activity bar entries & custom “pages”

只愿长相守 提交于 2019-12-10 21:38:20
问题 I'd like to add new activity bar entries and create a custom "page" when developing an extension. Is that even possible? My idea is create a database manager like Sequel Pro inside VSCode. 回答1: v.1.23 added the ability for extension authors to add icons to the activity bar. custom activity bar views extension code for contributing to the activity bar 回答2: This concrete extension implements a custom Activity Bar. As far as I know, you can put only a treeview there: https://github.com/Microsoft

How can I access the AST that VSCode creates

依然范特西╮ 提交于 2019-12-10 18:13:56
问题 I write a VSCode Extension for UI5 JavaScript. The most missing Feature is to have IntelliSense for UI5. Using UI5 typings it will work but not in all. This works: var testvar1 = new sap.m.Button(); Now i can use IntelliSense in VSCode in the testvar1. The Problem e.g.: sap.ui.define([ "sap/ui/core/mvc/Controller" ], function (Controller) { "use strict"; return Controller.extend("", { }); }); In this case there is a Controller variable in the function, this variable is defined with the