我想为Visual Studio Code编写一个简单的扩展,以允许基本的拖放复制/粘贴功能,但我找不到任何方式来通知鼠标事件.我是否忽略了一些显而易见的事情,或者是否故意将编辑器设计为仅限键盘(主要是)?
注意:我指的是基于TypeScript的Visual Studio代码编辑器,而不是完整的Visual Studio.
我正在尝试创建一个简单的VSCode扩展,以便在打开文件夹时运行一组命令.基本上这些命令将建立我们的开发环境.我已经开始创建锅炉并运行VSCode提供的示例,但我不清楚如何运行系统命令.感谢任何帮助或指出我有关此主题的一些文档.
我有一个扩展程序,可以获取打开文件的文本并对其进行更改。更改文本后,如何将其放回 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 your extension is activated
console.log('Congratulations, your extension "myExtension" is now active!');
console.log(process.versions);
// The command has been defined in the package.json file
// Now provide the …Run Code Online (Sandbox Code Playgroud) 我在 vs code 中安装了 live sass 编译器。无论我在 scss 文件中写入什么,终端都会打开(观看随附的视频以更好地理解问题)请建议一种在后台“静默”运行编译器的方法。啊看起来我无法在此处添加视频,所以我正在添加图像
Python 服务器意外崩溃。我能够在调试模式下运行,但 Linting 不起作用。有人可以帮我吗?
<template>
<ConfigProvider :locale="getAntdLocale">
<AppProvider>
<RouterView />
</AppProvider>
</ConfigProvider>
</template>
Run Code Online (Sandbox Code Playgroud)
<script lang="ts" setup>
import { ConfigProvider } from 'ant-design-vue';
import { AppProvider } from '/@/components/Application';
import { useTitle } from '/@/hooks/web/useTitle';
import { useLocale } from '/@/locales/useLocale';
// support Multi-language
const { getAntdLocale } = useLocale();
// Listening to page changes and dynamically changing site titles
useTitle();
</script>
Run Code Online (Sandbox Code Playgroud)
Vetur 显示此警告:
'ConfigProvider' is declared but its value is never read.Vetur(6133)
'getAntdLocale' is declared but its value is never read.Vetur(6133)
Run Code Online (Sandbox Code Playgroud)
模板似乎无法使用设置语法变量读取脚本。我怎样才能避免这个警告?
我正在开发 VSCode 扩展(图形建模器,不是基于文本的)。验证时,某些错误/问题可能会显示在 VSCode 问题选项卡中。(诊断集合)。如何拦截问题选项卡中列出的特定问题的点击事件?我需要在自定义建模器中突出显示相关对象。VSCode 中似乎只有一个标准的内置行为来滚动到文本行。我找不到 API 来订阅 VSCode 问题选项卡中问题的点击事件。
设想:
切换到 vscode 1.68.1 后
每次保存文件时,它都会首先自动从导入中删除 React,虽然这可能是 eslint 问题,因为我使用 eslint 进行格式化,但删除 eslint 插件后问题仍然相同
这是我的settings.json
{
"eslint.alwaysShowStatus": true,
"editor.formatOnSave": true,
"files.eol": "\r\n",
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"prettier.arrowParens": "avoid",
"prettier.embeddedLanguageFormatting": "off",
"prettier.enable": false,
"eslint.format.enable": false,
"[css]": {
"editor.defaultFormatter": "aeschli.vscode-css-formatter"
},
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
}
Run Code Online (Sandbox Code Playgroud)
这是 .eslintrc
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": "airbnb",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": …Run Code Online (Sandbox Code Playgroud) 问题陈述
在过去的几天里,我注意到 GitHub Copilot 每次提出代码片段建议时都会发出声音。起初,我以为我的电脑出了问题,担心键盘上的某个按键卡住了。我花了两天时间才弄清楚声音实际上是来自 GitHub Copilot。
另一个问题是,我检查了扩展程序的设置,发现与禁用它产生的声音无关,并且该插件没有更新到任何更高版本。
要求
我如何让这种声音消失,因为每次提出代码建议时它实际上都让我烦恼?
我正在 Ubuntu 上工作,并通过 VSCode 使用 MS Remote SSH 作为远程资源管理器的一部分。当我安装 C/C++ (ms-vscode.cpptools) 扩展时,它占用了大量 CPU%,通常约为 95%。我认为这可能是一次性的事情,但它一直以该百分比运行,使得其他一切 (编译项目)非常慢。
我喜欢这个扩展的功能,因为我之前在其他机器上使用过它,没有出现任何问题。但是,如果它保持在该使用水平,我就无法使用它。有什么解决方法吗?我看过一些 github 辩论,但没有什么进展。