vscode-extensions

How to make VSCode Intellisense window wider

喜欢而已 提交于 2020-08-19 11:56:36
问题 I have a VSCode extension that helps me autocomplete file paths, however many file paths grow long and are truncated in the VSCode intellisense popover window. How can I set VSCode to either: have a fixed width that I can set to be large automatically expand to fit the intellisense options (preferable) I happen to have written the extension so if needed I can update it if that is required. 回答1: I don't think this is possible, VSCode generally gives extensions very little control over the

How to make VSCode Intellisense window wider

喜你入骨 提交于 2020-08-19 11:53:54
问题 I have a VSCode extension that helps me autocomplete file paths, however many file paths grow long and are truncated in the VSCode intellisense popover window. How can I set VSCode to either: have a fixed width that I can set to be large automatically expand to fit the intellisense options (preferable) I happen to have written the extension so if needed I can update it if that is required. 回答1: I don't think this is possible, VSCode generally gives extensions very little control over the

VSCode extension - how to alter file's text

家住魔仙堡 提交于 2020-08-07 05:04:51
问题 I have an extension that grabs the open file's text and alters it. Once the text is altered, how do I put it back into the file that is displayed in VSCode? // this method is called when your extension is activated // your extension is activated the very first time the command is executed export function activate(context: vscode.ExtensionContext) { // Use the console to output diagnostic information (console.log) and errors (console.error) // This line of code will only be executed once when

Command not found in VSCode extension

人走茶凉 提交于 2020-07-06 05:42:11
问题 I am trying to create a VSCode extension. This extension provides two commands, never mind their implementation: export function activate(context: ExtensionContext) { const provider = new ContentProvider(); const providerRegistrations = Disposable.from( workspace.registerTextDocumentContentProvider(ContentProvider.scheme, provider) ); // Open the dynamic document, and shows it in the next editor const openMyExtensionCommandRegistration = commands.registerTextEditorCommand('extension

Create diagnostics entries without language server in Visual Studio Code

别说谁变了你拦得住时间么 提交于 2020-07-03 07:51:42
问题 I have a reasonably simple extension for Visual Studio Code where I want to apply some warning, if possible, without having to implement an entire language server for it. Is there a way to do this directly on the document or editor objects? I'm not finding anything when inspecting the objects. 回答1: So, I was able to do this after a bunch of digging. import { languages, Diagnostic, DiagnosticSeverity } from 'vscode'; ... let diagnosticCollection = languages.createDiagnosticCollection("stuff");

What's wrong with my syntax highlighting grammar injection?

冷暖自知 提交于 2020-06-27 13:59:19
问题 I am following this example for a simple grammar injection in markdown. { "fileTypes": [], "injectionSelector": "L:markup.fenced_code.block.markdown", "patterns": [ { "include": "#superjs-code-block" } ], "repository": { "superjs-code-block": { "begin": "superjs", "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)", "contentName": "meta.embedded.block.superjs", "patterns": [ { "include": "source.js" } ] } }, "scopeName": "markdown.superjs.codeblock" } There is a small problem with the above code - As long