MIT License

项目介绍

vlang/vscode-vlang 是一个托管在 GitHub 上的开源项目,主要使用 TypeScript 编写,采用 MIT License 许可证,目前获得 411 个 Star、56 次 Fork。

仓库全名
vlang/vscode-vlang
开源许可证
MIT License
Star 数
411
Fork 数
56
未关闭 Issue
25

README 摘要

V language support for Visual Studio Code Provides V language support for Visual Studio Code. Preview Features Code Editing syntax highlighting code snippets for quick coding completion, diagnostics, navigation, inlay hints, and other language features via VLS runnable CodeLens actions for main and tests workspace build, run, and test tasks test coverage highlighting and a status bar summary V Language Server…

完整内容见 GitHub 原始 README 或本页 。

常见问题

vscode-vlang 用什么语言开发?

主要使用 TypeScript 编写,采用 MIT License 许可证,目前有 411 个 Star。

vscode-vlang 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 vscode-vlang 的源码?

可以直接克隆仓库:git clone https://github.com/vlang/vscode-vlang.git,默认分支为 master;安装与运行步骤见仓库 README。

vscode-vlang 最近还在维护吗?

仓库最近一次更新为 5 天前,当前有 25 个未关闭 Issue;Star 数为 411,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

V Language extension for Visual Studio Code.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
547
价值分
264
活跃状态
活跃

语言占比

JavaScript
TypeScript
V
Verilog

Release

README

V language support for Visual Studio Code

Version GitHub Workflow Status

Provides V language support for Visual Studio Code.

Preview

First demo screenshot

Features

Code Editing

  • syntax highlighting
  • code snippets for quick coding
  • completion, diagnostics, navigation, inlay hints, and other language features via VLS
  • runnable CodeLens actions for main and tests
  • workspace build, run, and test tasks
  • test coverage highlighting and a status bar summary

V Language Server

Install VLS and ensure the vls executable is in PATH. Alternatively, set v.vls.command to its absolute path. The extension starts VLS over stdio when a V workspace is opened.

The available VLS settings are:

  • v.vls.enable: enable or disable VLS
  • v.vls.command: path or command name for the VLS executable
  • v.vls.args: additional command-line arguments
  • v.vls.inlayHints.enabled: enable or disable inlay hints
  • v.vls.diagnostics: enable or disable live diagnostics
  • v.vls.coverage.enabled: collect coverage during test tasks and highlight covered and uncovered executable lines
  • v.executablePath: V compiler used by VLS and tasks; supports absolute paths, ~, ${env:NAME}, and ${workspaceFolder}

Settings from the former VLS extension (vls.command, vls.args, vls.vCommand, and its inlay hint, diagnostics, and coverage toggles) remain effective until replaced by the corresponding v.* settings.

Build, run, and test

Use V: Build, V: Run, or V: Test in the Command Palette, or select a V task from Tasks: Run Task. Build, Run, and Test operate on the workspace; Run uses the active V module or script when one is open, and Test uses the active _test.v file. The extension saves modified V files in the target before running.

V: Run current file uses the same run task. For a .v file, it runs the containing module; for a .vsh file, it runs the script.

VLS CodeLens actions such as Run Main, Run File, and Run Test use the same tasks. Test runs collect coverage by default. Covered executable lines are highlighted green and uncovered lines red. Click the coverage status item or run V: Clear Test Coverage to remove the highlights.

To create a test file from a source file, run V: Generate Test File. It creates the _test.v file beside the source with one test_ function per public function, each with a placeholder assertion to replace. It refuses to overwrite an existing test file.

Roadmap

Known gaps and what would close them, cheapest first — the missing Test Explorer integration, the absent debugger, and the parts of the test suite that fail on Windows. See ROADMAP.md; please read it before opening a pull request so we do not duplicate each other.

Usage

First you will need to install Visual Studio Code >= 1.105. In the command palette (Cmd+Shift+P) select Install Extensions and choose V. Alternatively you can install the extension from the Marketplace. Now open any .v, .vsh, .vh, or .vv file in VS Code.

Note: It is recommended to turn Auto Save on in Visual Studio Code (File -> Auto Save) when using this extension.

Commands

  • V: Run current file
  • V: Format current file
  • V: Build an optimized executable from current file
  • V: Generate Test File
  • V: Show V version
  • V: Update VLS
  • V: Restart VLS
  • V: Build, V: Run, and V: Test
  • V: Clear Test Coverage

You can access all of the above commands from the command palette (Cmd+Shift+P).

Debug the extension

Clone this repository and run npm install to install the dependencies. Then press F5 to open a new VS Code window with the extension loaded.

Open the output console (Cmd+Shift+U) to see the debug output from the extension.

Run Cmd+Shift+P and select Preferences: Open User Settings to update settings.

Run npm test for logic checks and npm run test:vscode for an extension-host check. The latter uses ~/code/vls/vls and ~/code/v/v by default and downloads a local VS Code test build if CODE_EXECUTABLE is unset. Set VLS_BINARY and V_BINARY to use other binaries. After npm run package, set TEST_PACKAGED=1 when running npm run test:vscode to install and test the VSIX in an isolated VS Code profile.

License

The extension is distributed under GPL-2.0-only because its task and coverage implementation comes from the VLS VS Code extension. Existing files covered by the MIT license retain that license.

评论

暂无评论