Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Lua Image HoverNew to Visual Studio Code? Get it now.
Lua Image Hover

Lua Image Hover

342352172

| (0) | Free
Hover to preview images in Lua strings
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Lua Image Hover

在 Lua 代码中悬停图像路径时,实时预览 .png、.jpg 和 .tga 图标! 支持无后缀.tga,支持lua所有类型字符串,包括"",'',[[]].[===[]===] 适用于 Warcraft III 地图开发、自定义游戏项目等使用 Lua + 资源路径的场景。

示例动图:悬停显示图标预览


✨ 功能亮点

  • 在 Lua 字符串中悬停资源路径(如 "icon/Attack"),自动显示对应图片
  • 支持格式:
    • ✅ .png、.jpg、.jpeg:开箱即用
    • ✅ .tga:自动转换为 PNG 并预览(需安装 ImageMagick)
  • 自动在常见目录(如 assets/)中搜索图像文件
  • 支持自定义搜索路径(见下方配置说明)

⚙️ 配置

你可以在 VS Code 设置中自定义图像搜索路径:

  1. 打开设置(Ctrl+, 或 Cmd+,)
  2. 搜索 Lua Image Hover
  3. 编辑 “Lua Image Hover: Paths”

或直接在 settings.json 中添加:

{
  "luaImageHover.paths": [
    "assets/war3mapIcon/*",
    "res/icons/*",
    "ui/assets/*"
  ]
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft