[
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\nindent_size = 4\nindent_style = tab\ninsert_final_newline = true\nmax_line_length = 90\ntrim_trailing_whitespace = true\n\n[*.{yml,yaml}]\nindent_style = space\nindent_size = 2\n"
  },
  {
    "path": ".github/dependabot.yml",
    "content": "version: 2\nupdates:\n  - package-ecosystem: \"npm\"\n    directory: \"/\"\n    schedule:\n      interval: \"weekly\"\n"
  },
  {
    "path": ".github/workflows/ci.yml",
    "content": "name: CI\n\non: [push, pull_request]\n\njobs:\n  build-and-package:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v5\n      - uses: actions/setup-node@v5\n        with:\n          node-version: \"24\"\n      - name: Install dependencies\n        run: npm install\n      - name: Build\n        run: npm run build\n      - name: VSCE package\n        run: npm run package\n\n  code-style:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v5\n      - uses: actions/setup-node@v5\n        with:\n          node_version: \"24\"\n      - name: Install dependencies\n        run: npm install\n      - name: Run eslint\n        run: npm run lint\n\n  grammar-tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v5\n      - uses: actions/setup-node@v5\n        with:\n          node_version: \"24\"\n      - name: Install dependencies\n        run: npm install\n      - name: Run grammar tests\n        run: npm run test:grammar\n"
  },
  {
    "path": ".github/workflows/docs_ci.yml",
    "content": "name: Docs CI\n\non: [push, pull_request]\n\njobs:\n  markdown-lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v5\n      - uses: actions/setup-node@v5\n        with:\n          node-version: \"24\"\n      - name: Install dependencies\n        run: npm install\n      - name: Check readme linting\n        run: npm run lint:md\n"
  },
  {
    "path": ".gitignore",
    "content": ".vscode/ipch\n*.code-workspace\n*.exe\n*.tmp.json\n\n# MacOS\n.DS_Store\n*.dSYM/\n\n# Node\n**/node_modules/\n**/out/\n**/*.tsbuildinfo\n**/*.vsix\n"
  },
  {
    "path": ".prettierrc.json",
    "content": "{\n\t\"$schema\": \"https://json.schemastore.org/prettierrc\",\n\t\"semi\": false,\n\t\"singleQuote\": false,\n\t\"printWidth\": 100\n}\n"
  },
  {
    "path": ".vscode/extensions.json",
    "content": "{\n\t\"recommendations\": [\"dbaeumer.vscode-eslint\", \"esbenp.prettier-vscode\"]\n}\n"
  },
  {
    "path": ".vscode/launch.json",
    "content": "{\n\t\"version\": \"0.2.0\",\n\t\"configurations\": [\n\t\t{\n\t\t\t\"type\": \"extensionHost\",\n\t\t\t\"request\": \"launch\",\n\t\t\t\"name\": \"Launch Extension\",\n\t\t\t\"runtimeExecutable\": \"${execPath}\",\n\t\t\t\"args\": [\"--extensionDevelopmentPath=${workspaceFolder}\"],\n\t\t\t\"outFiles\": [\"${workspaceFolder}/out/**/*.js\"],\n\t\t\t\"preLaunchTask\": \"Build Extension\"\n\t\t}\n\t]\n}\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "// Place your settings in this file to overwrite default and user settings.\n{\n\t\"files.exclude\": {\n\t\t\"out\": false // set this to true to hide the \"out\" folder with the compiled JS files\n\t},\n\t\"search.exclude\": {\n\t\t\"out\": true // set this to false to include \"out\" folder in search results\n\t},\n\t\"editor.defaultFormatter\": \"esbenp.prettier-vscode\"\n}\n"
  },
  {
    "path": ".vscode/tasks.json",
    "content": "// See https://go.microsoft.com/fwlink/?LinkId=733558\n// for the documentation about the tasks.json format\n{\n\t\"version\": \"2.0.0\",\n\t\"tasks\": [\n\t\t{\n\t\t\t\"label\": \"Build Extension in Background\",\n\t\t\t\"group\": \"build\",\n\t\t\t\"type\": \"npm\",\n\t\t\t\"script\": \"watch\",\n\t\t\t\"problemMatcher\": {\n\t\t\t\t\"base\": \"$tsc-watch\"\n\t\t\t},\n\t\t\t\"isBackground\": true\n\t\t},\n\t\t{\n\t\t\t\"label\": \"Build Extension\",\n\t\t\t\"group\": \"build\",\n\t\t\t\"type\": \"npm\",\n\t\t\t\"script\": \"build\",\n\t\t\t\"problemMatcher\": {\n\t\t\t\t\"base\": \"$tsc\"\n\t\t\t}\n\t\t}\n\t]\n}\n"
  },
  {
    "path": ".vscodeignore",
    "content": ".vscode/**\n.vscode-test/**\n\n# Node / npm\nnode_modules/\npackage-lock.json\n\n# Source and build outputs\nsrc/\nbuild/\n*.vsix\n\n# TypeScript build artifacts\ntsconfig.json\ntsconfig.*.json\ntsconfig.tsbuildinfo\n\n# Images and bundled assets\nimages/\n\n# Test and CI\ntests/**\ntest/**\n**/tests\n**/*.spec.*\n**/*.test.*\ncoverage/**\n\n# Configuration and metadata\n.github/**\n.eslintrc*\n.eslintignore\n.prettierrc*\n.prettierignore\n.editorconfig\n\n# Misc\n.gitignore\n.v\n.go\n.yarn*\n*.log\n.vscodeignore"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## 0.2.0\n\n_13 October 2025_\n\n### Features\n\n- ⏫ Update extension to prompt to install v and vls if not found\n- ⏫ Use the new vls (https://github.com/vlang/vls)\n- ⏫ Add syntax support for v.mod files\n\n## 0.1.14\n\n_1 September 2022_\n\n### Features\n\n- ℹ️ VLS installation and server launch is now handled by `v ls` (thanks @nedpals #450)\n\n### Fixes\n\n- Fix `defer` sniffet (thanks @StunxFS #467)\n- Fix syntax highlighting `unsafe` and `callconv` attributes (thanks @StunxFS #468)\n\n## 0.1.13\n\n_17 May 2022_\n\n### Fixes\n\n- 🐛 Fix compiling VLS using `v run build.vsh` (thanks @nedpals)\n\n## 0.1.12\n\n_12 May 2022_\n\n### Fixes\n\n- 🐛 Fix syntax highlighting. (thanks @danieldaeschle #331, #304 #373)\n\n## 0.1.11\n\n_12 November 2021_\n\n### Fixes\n\n- 🐛 Fix critical bug when launching / stopping VLS process. (thanks @nedpals #337)\n- 🐛 Fix launching VLS process on TCP after \"Remote Server\" was disabled.\n\n## 0.1.10\n\n_3 October 2021_\n\n### Features\n\n- ℹ️ VLS has now support for connecting via TCP! (thanks @nedpals #283)\n- 🔄 Added dialog when updating settings related to VLS (thanks @nedpals #283)\n- ℹ️ Added custom CLI arguments setting that can be passed to the VLS executable (thanks @nedpals #302)\n\n### Fixes\n\n- 🐛Fix syntax highlighting for numeric methods (e.g. `.int()`) (thanks @pouyakary #281)\n- 🐛Fix comma not identified by the grammar (thanks @pouyakary #282)\n- ⏫ Improved VLS connection flow (thanks @nedpals #283)\n- ⏫ Fix / update VLS compilation command (thanks @nedpals #303)\n- ⏫ Fix VLS restart command (thanks @nedpals #303 #310)\n\n## 0.1.9\n\n_11 August 2021_\n\n### Features\n\n- 🔄 You can now update or restart the language server without restarting VSCode! (Press `Ctrl+Shift+P` and select `V: Update VLS` or `V: Restart VLS`) (thanks @carterisonline #239)\n- ⏫ Add more settings for VLS including support for custom VROOT path and debug mode setting (thanks @nedpals #271)\n- ⏫ v.mod files are now syntax highlighted! (thanks @serkonda7).\n- ⏫ Accessors, `size_t` and option symbol (`?`) are now properly syntax highlighted! (thanks @pouyakary #245 #248 #249)\n- ℹ️ Added more helpful information when encountering VLS installation errors.\n- 🚮 Removed deprecated commands including for testing and showing help information.\n\n### Fixes\n\n- 🐛Fixed \"Open current code on DevBits V playground\" command showing on non-V files.\n- 🐛Fixed syntax highlighting underline-separated numbers (e.g `1_000`).\n- Simplification of the URL opening mechanism when opening DevBits Playground.\n- 🐛Fixed syntax highlighting for string literals and hash directives (e.g `#include`) (#244)\n- 🐛Fixed syntax highlighting for float exponents.\n\n### Internal / Infrastructure Changes\n\n- Build system was migrated from Webpack to ESBuild resulting ~5x faster builds.\n- Added ESLint integration.\n- Added unit tests for syntax highlighting.\n- Added CI for running grammar tests.\n\n## 0.1.8\n\n_25 March 2021_\n\n### Features\n\n- ⏫ You can update vls by a vscode command! Just press Ctrl+Shift+P and type `update vls`. That's it!\n- Support for enabling feature using flags (thanks @nedpals)\n- Highlight for #define and #pkgconfig (thanks @crackedmind #213)\n- Update snippets to the current syntax (thanks @StunxFS #218)\n- Improved syntax support (thanks @AliChraghi #221 #223)\n\n### Fixes\n\n- 🐛Fixes installing vls automatically (#224)\n\n## 0.1.7\n\n_9 January 2021_\n\n### Features\n\n- ⏫ Updated language client package.\n- 📩 Newest Version on vscode marketplace!\n\n### Fixes\n\n- 🐛 Fixes syntax highlight for struct.\n\n## 0.1.6\n\n_26 December 2020_\n\n### Features\n\n- ⏫ Updated typescript version to 4.1.\n- 🔄 Progress notification when installing vls.\n\n### Fixes\n\n- 🐛 Fixes bug on windows where executable path was without `.exe` suffix.\n\n## 0.1.5\n\n_24 December 2020_\n\n### Features\n\n- ⬇️ Automatically install vls (keep in mind that vls is still alpha)!\n- 🔄 Disable and enable vls on the fly\n\n### Fixes\n\n- 🚮 Removed unused and old lint & fmt functionality which is now done by the vls!\n- 🐛 Fixes `#include` keyword highlighting\n\n## 0.1.4\n\n_12 December 2020_\n\n### Features\n\n- 🔴 Breakpoints are now part of the party!\n\n### Fixes\n\n- 👨🏼 Updated publisher name.\n- 🌐 Updated URLs in package.json.\n- Union is now recognized as a keyword.\n\n## 0.1.2\n\n_17 April 2020_\n\n### Added\n\n- Added region folding support [13084c1](https://github.com/vlang/vscode-vlang/commit/13084c158e981ec9983e86f7637c403e653d140f)\n- Added highlighting for `flag` attribute [ec2bffa](https://github.com/vlang/vscode-vlang/commit/ec2bffa670d7761267026f4cb5c1bf620e12e81e)\n- Added binary, octal, exponental highlighting [6b58431](https://github.com/vlang/vscode-vlang/commit/6b58431cd51cb4449924aece54998d5b0751c4a1)\n- Added highlighting for `is`, `var` keywords [172ecae](https://github.com/vlang/vscode-vlang/commit/172ecae2849a551c8b0c04d7d3eb04dcb94b135c)\n\n### Changed\n\n- Fixed invalid pattern for standart numeric types [8fd5e7e](https://github.com/vlang/vscode-vlang/commit/8fd5e7ec6867d99c04b1662503f65e512f02aa67)\n- Fixed #include VALUE bug [b290d2d](https://github.com/vlang/vscode-vlang/commit/b290d2d074d2150079a4dbb78367412d5a38bdba)\n- Fixed saving error [6a85e45](https://github.com/vlang/vscode-vlang/commit/6a85e45e6509ac2217f68190a4693ff2134c0dd3)\n- Fixed column of error [dd4c11d](https://github.com/vlang/vscode-vlang/commit/dd4c11daa03ce268681be64eefcfd615e0814ced)\n- Fixed error message filepath [fc526f9](https://github.com/vlang/vscode-vlang/commit/fc526f96f4743d0bb9ff16b79d32e50b24c1f79c)\n- Fixed incorrect struct highlighting with variable name [3b682a9](https://github.com/vlang/vscode-vlang/commit/3b682a9e31ec72257e351510be77126474921834)\n\n## 0.1.1\n\n_16 January 2020_\n\n### Added\n\n- Linter [35d9805](https://github.com/vlang/vscode-vlang/commit/35d9805cdadb49335de70484b5bf1815f356857f)\n- Implemented \"Show Version Info\" [28420de](https://github.com/vlang/vscode-vlang/commit/28420dee18c6c52050a29a7a8bde648bafed85f0)\n- Implemented \"Build an optimized executable from current file\" [37e5049](https://github.com/vlang/vscode-vlang/commit/37e50499e38552b1d025ab4c3ada3ad6a30c6113)\n- Snippet for `charptr` [503f796](https://github.com/vlang/vscode-vlang/commit/503f796e2f5ac372c023c119525b1fa8cd580a97)\n- Added `unsafe` keyword, `typedef` attribute [f873252](https://github.com/vlang/vscode-vlang/commit/f873252d43422d9d1317ce735f31c158a523afe2)\n\n### Changed\n\n- Fixed inconsistent `struct` highlighting [3170227](https://github.com/vlang/vscode-vlang/commit/31702271d55313ac97b17433111465ee74d3902d)\n- Replaced VSCode deprecated API with new API [6f829d9](https://github.com/vlang/vscode-vlang/commit/6f829d9469be9202aa331abb46479e362c9d43bd)\n\n### Removed\n\n- Removed icon theme [827171b](https://github.com/vlang/vscode-vlang/commit/827171bb0c4eca127a6e90a8b92f9de8ebdf68a9)\n\n## 0.0.9\n\n_30 December 2019_\n\n### Added\n\n- Highlighting for `as` keyword [e7c72b2](https://github.com/vlang/vscode-vlang/commit/e7c72b2cb23444d5c1fa5e5aa2f61e64eaa8264f)\n- Highlighting for `charptr` keyword [b9f16bc](https://github.com/vlang/vscode-vlang/commit/b9f16bce1e8089d0b2b2dd50bf09ff8aec621122)\n- Support for `.vsh` [e79a22e](https://github.com/vlang/vscode-vlang/commit/e79a22e72dabeca2cc26e08829e6da6f1a957e3c)\n- Some more snippets [b06ae81](https://github.com/vlang/vscode-vlang/commit/b06ae81b47ec6354ef1ed887ce6357ef03cd712c)\n\n### Changed\n\n- Fixed invalid icon theme [be3fcb3](https://github.com/vlang/vscode-vlang/commit/be3fcb399a309d52e8869f6ac9067aa454dd3b8a)\n- Fixed `vfmt` [3522196](https://github.com/vlang/vscode-vlang/commit/3522196890c4f89da2f173684fe326e79fbb4c52)\n- Cleaned up resource usage [4f587ed](https://github.com/vlang/vscode-vlang/commit/4f587ed1cbcd6e884da250528ba7f2e0728127cb)\n- Removed unused entries from `.travis.yml` [96e1a0b](https://github.com/vlang/vscode-vlang/commit/96e1a0b06946d2659d5e92242aeabbfc56faf909)\n\n## 0.0.8\n\n_20 October 2019_\n\n### Added\n\n- Highlighting for attributes. [f85aec5](https://github.com/vlang/vscode-vlang/commit/f85aec57a46116204c9f3fbe370277907ff00a9c)\n- Highlighting for `${...}` syntax [f11581d](https://github.com/vlang/vscode-vlang/commit/f11581dcaaadb88da2130a4d9b444d4281f1c0d4)\n- Highlighting for `none` keyword. [d682dbe](https://github.com/vlang/vscode-vlang/commit/d682dbefb6330b9383d849334da7677d6f6cf2d6)\n\n### Changed\n\n- Fixed nested comments. [f19d486](https://github.com/vlang/vscode-vlang/commit/f19d4868dd34a729bee01441eb62c6a59a16a1e6)\n- Insert tabs instead of spaces. [f4525ca](https://github.com/vlang/vscode-vlang/commit/f4525ca1eb3d514eeb2bb2956724dc18a2645235)\n- Corrupted icon. [beeb022](https://github.com/vlang/vscode-vlang/commit/beeb0223c03a1a40b976ef350d546282b3cfa8ff)\n- Infinity recursion in certain grammar patterns [a40e951](https://github.com/vlang/vscode-vlang/commit/1638585f838e30c2587eaf9ee8a08c28785b6f42)\n\n## 0.0.7\n\n_12 August 2019_\n\n### Added\n\n- New demos [636c358](https://github.com/vlang/vscode-vlang/commit/636c358eb53104f0b3f42f214305f9ef10fb9599)\n- New badges [ab94ea7](https://github.com/vlang/vscode-vlang/commit/ab94ea75950a59a5832cb6a6f32e6e8d5197e63a)\n\n### Changed\n\n- Fixed function declaration from new line [cede5204](https://github.com/vlang/vscode-vlang/commit/cede52044e7acd56f880b0729dc3280c16d4c3e9)\n- Fixed invalid function space pattern [88477c2](https://github.com/vlang/vscode-vlang/commit/88477c24709836dd8e7d5fdd01d0f729870c278b)\n- Fixed import, module (s) bag [ef56b2c](https://github.com/vlang/vscode-vlang/commit/ef56b2c8020d7b6d4d5408635339fa29265ad216)\n\n### Removed\n\n- Old demos [636c358](https://github.com/vlang/vscode-vlang/commit/636c358eb53104f0b3f42f214305f9ef10fb9599)\n- testv.tmLanguage.json [4e3a353](https://github.com/vlang/vscode-vlang/commit/4e3a35358d7927efbd47b25911b50e9ad3ee1cd2)\n- Themes for prefering used defined themes [ef56b2c](https://github.com/vlang/vscode-vlang/commit/ef56b2c8020d7b6d4d5408635339fa29265ad216)\n\n## 0.0.6\n\n_15 July 2019_\n\n### Added\n\n- Metadata properties [37dd64b](https://github.com/vlang/vscode-vlang/commit/37dd64bcaf1a7799260d29773f55bf23f5f28247)\n- Ignore for specify files [45fbdd9](https://github.com/vlang/vscode-vlang/commit/45fbdd952a7c8dc6e971f52388b9629c9fd6ba4e)\n- Pattern for reference [b495745](https://github.com/vlang/vscode-vlang/commit/b495745e4354aee7d609adef164fc48be3a75d7e)\n\n### Fixed\n\n- Invalid pattern for `ustring` [f7f32d1](https://github.com/vlang/vscode-vlang/commit/f7f32d108f2aa031b8335073ef77ab774a77f284)\n- Travis support [d1931ed](https://github.com/vlang/vscode-vlang/commit/d1931ed55b42161f6bd1df023685c1d060471165)\n- Invalid pattern for `variable-assignment` [c2ad846](https://github.com/vlang/vscode-vlang/commit/c2ad846e79aed3e5c4add8ee2e48aa3d20f18607)\n- `#include` pattern [ecf50c0](https://github.com/vlang/vscode-vlang/commit/ecf50c0a830923090b6f13700e8baca9bc3c3c86)\n\n### Changed\n\n- types/vscode version to 1.20.0 [37dd64b](https://github.com/vlang/vscode-vlang/commit/37dd64bcaf1a7799260d29773f55bf23f5f28247)\n\n### Removed\n\n- Autoclosed multilines comments (block) [012e640](https://github.com/vlang/vscode-vlang/commit/012e640a84772162a7d822c3b87890c20244fa78)\n\n## 0.0.5\n\n_30 June 2019_\n\n### Added\n\n- Pattern for static type `intptr`\n- Pattern for control keyword `$else`\n- Pattern for builtin casting/control function ([f877c3b](https://github.com/vlang/vscode-vlang/commit/f877c3b844564125431f9bd4accda0b4924f5f6c)).\n- String placeholder, escaped characters.\n- Auto closed multiline comments ([b173e1e](https://github.com/vlang/vscode-vlang/pull/8))\n- Launch script for debuggin ([24b183a](https://github.com/vlang/vscode-vlang/commit/24b183aa79964962a1e6083ac5847a207935629b))\n- Added two commands `v.ver, v.prod` ([d1d99a9](https://github.com/vlang/vscode-vlang/commit/d1d99a9806f9ffbbe235974f153fa837f2eb6b3b))\n- Added TypeScript based project ([9fa4992](https://github.com/vlang/vscode-vlang/commit/9fa4992a7f549351c97d17b1ff95c94970e74bb3))\n- Created `package-lock.json` ([16114d6](https://github.com/vlang/vscode-vlang/commit/16114d69ece533c217a0153655a2796c717fd02c))\n\n### Fixed\n\n- Invalid pattern for new-exist-extend-limited-overloaded functions ([8952a71](https://github.com/vlang/vscode-vlang/commit/8952a717ecd2683cfc69caca52f232a5540cd2b5))\n- Invalid pattern for `module, import, #include`\n- Invalid pattern for `enum, type, struct, interface` ([83e27e0](https://github.com/vlang/vscode-vlang/commit/83e27e0e64a4a51414ec8ed80dbc6f03fb8bb517))\n- Invalid typo `ligth` to `light` ([09b5257](https://github.com/vlang/vscode-vlang/commit/09b5257c7e0d4e10735d3c23d9cfa2eb27735dab))\n- Invalid pattern for variable assignment.\n\n## 0.0.4\n\n_22 June 2019_\n\n### Added\n\n- Pattern for static types `byteptr, voidptr, ustring`\n- Pattern for extend (extra) function syntax `fn (a mut Vector) Set() {}`\n- Pattern for limited operator overloading `fn (a Operand) + (b Operand)Operand {}`\n- String placeholder.\n- String escaped characters.\n- Highlighting for V compiler headers without open source code **`.vh`**\n\n### Fixed\n\n- Invalid pattern for floating point numbers.\n- Invalid pattern for single, double strings.\n- Invalid pattern for new function declaration.\n- Invalid pattern for exist function.\n- Invalid patterns for `module, import, #include, #flag`\n- Invalid pattern for generic `<T>`\n- Invalid pattern for variable assignment.\n- Invalid pattern for label (conflict with default keyword) **`default:`**\n\n- Included pattern for variable increment, decrement.\n\n## 0.0.3\n\n_16 June 2019_\n\n### Added\n\n- Pattern for generics.\n- Generic highlighting.\n- Assignment operators `&=, |=, ^=, &&=, ||=, >>=, <<=`.\n\n### Fixed\n\n- Invalid pattern for float numeric.\n- Invalid pattern for new/exist function.\n\n## 0.0.2\n\n_12 June 2019_\n\n### Added\n\n- Pattern for new-function variables, punctuation characters.\n- Pattern for exist-function punctuation characters.\n- Pattern for arithmethic, relation, logical, bitwise, assignment operators.\n\n### Fixed\n\n- Invalid patterns for assignment operator.\n- Invalid patterns for integer, float, hex numerics.\n- Invalid patterns for new/exist function arguments.\n\n### Changed\n\n- Highligting for `module, import, struct, enum, interface` from `default` to `bold underline`.\n\n## 0.0.1 - 2019-06-10\n\n_10 June 2019_\n\n### Added\n\n- Code snippets for standart keywords and expressions.\n- Developer dark theme for **V**.\n- TextMate Language Support for **V**.\n- Icons in `/icons` folder.\n- Images in `/images` folder.\n- Icon theme in `/theme/icon-theme.json`.\n- Icon for `.v` based files in `theme/images/v.svg`.\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2019 0x9ef\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "# V language support for Visual Studio Code\n\n[![Version](https://img.shields.io/visual-studio-marketplace/v/vlanguage.vscode-vlang.svg)](https://marketplace.visualstudio.com/items?itemName=vlanguage.vscode-vlang)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/vlang/vscode-vlang/ci.yml?branch=master)](https://github.com/vlang/vscode-vlang/actions/)\n\nProvides [V language](https://vlang.io) support for Visual Studio Code.\n\n## Preview\n\n![First demo screenshot](./images/demo.png)\n\n## Features\n\n### Code Editing\n\n- syntax highlighting\n- code snippets for quick coding\n\n## Usage\n\nFirst you will need to install [Visual Studio Code][vs-code] >= `1.105`.\nIn the command palette (`Cmd+Shift+P`) select `Install Extensions` and choose `V`.\nAlternatively you can install the extension from the [Marketplace][market-ext-link].\nNow open any `.v`, `.vsh`, `.vv` file in VS Code.\n\n_Note_: It is recommended to turn `Auto Save` on\nin Visual Studio Code (`File -> Auto Save`) when using this extension.\n\n## Commands\n\n- `V: Run current file`\n- `V: Format current file`\n- `V: Build an optimized executable from current file`\n- `V: Show V version`\n- `V: Update VLS`\n- `V: Restart VLS`\n\nYou can access all of the above commands from the command palette (`Cmd+Shift+P`).\n\n## Debug the extension\n\nClone this repository and run `npm install` to install the dependencies.\nThen press `F5` to open a new VS Code window with the extension loaded.\n\nOpen the output console (`Cmd+Shift+U`) to see the debug output from the extension.\n\nRun `Cmd+Shift+P` and select `Preferences: Open User Settings` to update settings.\n\n## License\n\n[MIT](./LICENSE)\n\n<!-- Links -->\n\n[vs-code]: https://code.visualstudio.com/\n[market-ext-link]: https://marketplace.visualstudio.com/items?itemName=vlanguage.vscode-vlang\n"
  },
  {
    "path": "eslint.config.mjs",
    "content": "import eslint from \"@eslint/js\"\nimport tseslint from \"@typescript-eslint/eslint-plugin\"\nimport tsparser from \"@typescript-eslint/parser\"\nimport globals from \"globals\"\n\nexport default [\n\t{\n\t\t// ignore generated and dependency folders\n\t\tignores: [\"node_modules/**\", \"out/**\"],\n\t},\n\teslint.configs.recommended,\n\t{\n\t\tfiles: [\"**/*.ts\"],\n\t\tlanguageOptions: {\n\t\t\tparser: tsparser,\n\t\t\tparserOptions: {\n\t\t\t\tprojectService: true,\n\t\t\t\ttsconfigRootDir: import.meta.dirname,\n\t\t\t},\n\t\t\tglobals: {\n\t\t\t\t...globals.node,\n\t\t\t},\n\t\t},\n\t\tplugins: {\n\t\t\t\"@typescript-eslint\": tseslint,\n\t\t},\n\t\trules: {\n\t\t\t...tseslint.configs.recommended.rules,\n\t\t\t...tseslint.configs[\"recommended-type-checked\"].rules,\n\t\t\t// Custom rules from old config\n\t\t\t\"prefer-const\": \"error\",\n\t\t\t\"no-array-constructor\": \"error\",\n\t\t\t\"no-new-object\": \"error\",\n\t\t\t\"no-shadow\": \"error\",\n\t\t\t\"no-undef-init\": \"error\",\n\t\t\t\"no-var\": \"error\",\n\t\t\t\"object-shorthand\": \"error\",\n\t\t\t\"prefer-template\": \"error\",\n\t\t\t// Stylistic rules\n\t\t\t\"array-bracket-spacing\": \"error\",\n\t\t\t\"brace-style\": \"error\",\n\t\t\t\"block-spacing\": \"error\",\n\t\t\tcamelcase: \"error\",\n\t\t\t\"comma-spacing\": \"error\",\n\t\t\t\"eol-last\": \"error\",\n\t\t\t\"func-call-spacing\": \"error\",\n\t\t\tquotes: [\"error\", \"double\"],\n\t\t\tsemi: [\"error\", \"never\"],\n\t\t\t\"no-extra-semi\": \"error\",\n\t\t},\n\t},\n]\n"
  },
  {
    "path": "language-configuration.json",
    "content": "{\n\t\"comments\": {\n\t\t\"lineComment\": \"//\",\n\t\t\"blockComment\": [\"/*\", \"*/\"]\n\t},\n\t\"folding\": {\n\t\t\"markers\": {\n\t\t\t\"start\": \"^\\\\s*//\\\\s*#?region\\\\b\",\n\t\t\t\"end\": \"^\\\\s*//\\\\s*#?endregion\\\\b\"\n\t\t}\n\t},\n\t\"brackets\": [\n\t\t[\"{\", \"}\"],\n\t\t[\"[\", \"]\"],\n\t\t[\"(\", \")\"]\n\t],\n\t\"autoClosingPairs\": [\n\t\t[\"{\", \"}\"],\n\t\t[\"[\", \"]\"],\n\t\t[\"(\", \")\"],\n\t\t[\"\\\"\", \"\\\"\"],\n\t\t[\"'\", \"'\"]\n\t],\n\t\"surroundingPairs\": [\n\t\t[\"{\", \"}\"],\n\t\t[\"[\", \"]\"],\n\t\t[\"(\", \")\"],\n\t\t[\"\\\"\", \"\\\"\"],\n\t\t[\"'\", \"'\"]\n\t]\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n\t\"name\": \"vscode-vlang\",\n\t\"displayName\": \"V\",\n\t\"description\": \"V language support (syntax highlighting, formatter, snippets) for Visual Studio Code.\",\n\t\"publisher\": \"vlanguage\",\n\t\"icon\": \"icons/icon.png\",\n\t\"version\": \"0.2.0\",\n\t\"license\": \"MIT\",\n\t\"engines\": {\n\t\t\"vscode\": \"^1.105.0\"\n\t},\n\t\"extensionPack\": [\n\t\t\"ms-vscode.cpptools\"\n\t],\n\t\"homepage\": \"https://vlang.io/\",\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/vlang/vscode-vlang/issues\"\n\t},\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"https://github.com/vlang/vscode-vlang\"\n\t},\n\t\"scripts\": {\n\t\t\"build:base\": \"esbuild src/extension.ts --bundle --external:vscode --outdir=out --platform=node --target=node24 --format=cjs\",\n\t\t\"build\": \"npm run build:base -- --sourcemap\",\n\t\t\"build:prod\": \"npm run build:base -- --minify\",\n\t\t\"watch\": \"npm run build:base -- --sourcemap --watch\",\n\t\t\"typecheck\": \"tsc --noEmit\",\n\t\t\"lint\": \"eslint src --ext ts\",\n\t\t\"lint:md\": \"markdownlint README.md\",\n\t\t\"fmt\": \"prettier -w .\",\n\t\t\"test\": \"npm run typecheck && npm run lint\",\n\t\t\"vscode:prepublish\": \"npm run build:prod\",\n\t\t\"package\": \"npm run build:prod && vsce package\",\n\t\t\"test:grammar\": \"vscode-tmgrammar-test source.v -g syntaxes/v.tmLanguage.json  syntaxes/tests/*.v\"\n\t},\n\t\"keywords\": [\n\t\t\"V\",\n\t\t\"v\",\n\t\t\"v language\",\n\t\t\"vlang\",\n\t\t\"extension\",\n\t\t\"autocompletion\"\n\t],\n\t\"categories\": [\n\t\t\"Snippets\",\n\t\t\"Programming Languages\"\n\t],\n\t\"contributes\": {\n\t\t\"snippets\": [\n\t\t\t{\n\t\t\t\t\"language\": \"v\",\n\t\t\t\t\"path\": \"snippets/snippets.json\"\n\t\t\t}\n\t\t],\n\t\t\"languages\": [\n\t\t\t{\n\t\t\t\t\"id\": \"v\",\n\t\t\t\t\"aliases\": [\n\t\t\t\t\t\"V\",\n\t\t\t\t\t\"v\"\n\t\t\t\t],\n\t\t\t\t\"extensions\": [\n\t\t\t\t\t\".v\",\n\t\t\t\t\t\".vsh\"\n\t\t\t\t],\n\t\t\t\t\"configuration\": \"language-configuration.json\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"id\": \"v.mod\",\n\t\t\t\t\"aliases\": [\n\t\t\t\t\t\"v.mod\"\n\t\t\t\t],\n\t\t\t\t\"extensions\": [\n\t\t\t\t\t\"v.mod\"\n\t\t\t\t],\n\t\t\t\t\"configuration\": \"language-configuration.json\"\n\t\t\t}\n\t\t],\n\t\t\"grammars\": [\n\t\t\t{\n\t\t\t\t\"language\": \"v\",\n\t\t\t\t\"scopeName\": \"source.v\",\n\t\t\t\t\"path\": \"syntaxes/v.tmLanguage.json\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"language\": \"v.mod\",\n\t\t\t\t\"scopeName\": \"v.mod\",\n\t\t\t\t\"path\": \"syntaxes/v.mod.tmLanguage.json\"\n\t\t\t}\n\t\t],\n\t\t\"configuration\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"title\": \"V\",\n\t\t\t\"properties\": {\n\t\t\t\t\"v.vls.command\": {\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"default\": \"v\",\n\t\t\t\t\t\"description\": \"Path to the V language server binary.\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.args\": {\n\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\"default\": [],\n\t\t\t\t\t\"description\": \"Arguments to pass to the V language server.\"\n\t\t\t\t},\n\t\t\t\t\"v.executablePath\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"default\": \"v\",\n\t\t\t\t\t\"description\": \"Custom path to the V compiler executable (`v`).\\nNOTE: Setting this won't change the VROOT path in VLS.\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.debug\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"description\": \"Enables / disables the language server's debug mode.\\nSetting it to true will create a log file to your workspace folder for bug reports.\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.customVrootPath\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\"description\": \"Custom path to the V installation directory (VROOT).\\nNOTE: Setting this won't change the V compiler executable to be used.\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.customPath\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"default\": \"\",\n\t\t\t\t\t\"description\": \"Custom path to the VLS (V Language Server) executable.\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.enable\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"default\": false,\n\t\t\t\t\t\"description\": \"Enables the language server. (alpha)\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.build\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"default\": true,\n\t\t\t\t\t\"description\": \"Automatically build VLS if it's not found. (Requires V to be installed)\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.forceCleanInstall\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"default\": false,\n\t\t\t\t\t\"description\": \"Removes any existing VLS binary and forces a clean install on startup or vls enabled.\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.buildPath\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"Path to vls source to build.\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.enableFeatures\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"Enables specific language server features. Multiple values must be separated with a comma (,).\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.disableFeatures\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"Disables specific language server features. Multiple values must be separated with a comma (,).\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.connectionMode\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"default\": \"stdio\",\n\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\"stdio\",\n\t\t\t\t\t\t\"tcp\"\n\t\t\t\t\t],\n\t\t\t\t\t\"description\": \"Specify the mode to be used when connecting to VLS. (Only stdio is working currently)\",\n\t\t\t\t\t\"enumDescriptions\": [\n\t\t\t\t\t\t\"Connects to the language server via standard input/output. (Default)\",\n\t\t\t\t\t\t\"Connects to the language server via TCP\"\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"v.vls.tcpMode.port\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\"default\": 5007,\n\t\t\t\t\t\"description\": \"Port to be used when connecting to the language server. (Only in TCP mode)\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.tcpMode.useRemoteServer\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"default\": false,\n\t\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\t\"description\": \"Connect to a remote server instead of launching a new local process. (Only in TCP mode)\"\n\t\t\t\t},\n\t\t\t\t\"v.vls.customArgs\": {\n\t\t\t\t\t\"scope\": \"resource\",\n\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\"description\": \"Custom arguments to be passed to the VLS executable.\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"configurationDefaults\": {\n\t\t\t\"[v]\": {\n\t\t\t\t\"editor.insertSpaces\": false\n\t\t\t}\n\t\t},\n\t\t\"keybindings\": [\n\t\t\t{\n\t\t\t\t\"command\": \"v.fmt\",\n\t\t\t\t\"key\": \"ctrl+shift+i\"\n\t\t\t}\n\t\t],\n\t\t\"commands\": [\n\t\t\t{\n\t\t\t\t\"command\": \"v.run\",\n\t\t\t\t\"title\": \"Run current file\",\n\t\t\t\t\"category\": \"V\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"command\": \"v.fmt\",\n\t\t\t\t\"title\": \"Format current file\",\n\t\t\t\t\"category\": \"V\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"command\": \"v.prod\",\n\t\t\t\t\"title\": \"Build an optimized executable from current file\",\n\t\t\t\t\"category\": \"V\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"command\": \"v.ver\",\n\t\t\t\t\"title\": \"Show V version\",\n\t\t\t\t\"category\": \"V\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"command\": \"v.vls.update\",\n\t\t\t\t\"title\": \"Update VLS\",\n\t\t\t\t\"category\": \"V\"\n\t\t\t},\n\t\t\t{\n\t\t\t\t\"command\": \"v.vls.restart\",\n\t\t\t\t\"title\": \"Restart VLS\",\n\t\t\t\t\"category\": \"V\"\n\t\t\t}\n\t\t],\n\t\t\"menus\": {\n\t\t\t\"commandPalette\": [\n\t\t\t\t{\n\t\t\t\t\t\"command\": \"v.run\",\n\t\t\t\t\t\"when\": \"editorLangId == v\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"command\": \"v.fmt\",\n\t\t\t\t\t\"when\": \"editorLangId == v\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"command\": \"v.prod\",\n\t\t\t\t\t\"when\": \"editorLangId == v\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"command\": \"v.vls.restart\",\n\t\t\t\t\t\"when\": \"editorLangId == v && config.v.vls.enable\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"breakpoints\": [\n\t\t\t{\n\t\t\t\t\"language\": \"v\"\n\t\t\t}\n\t\t]\n\t},\n\t\"activationEvents\": [\n\t\t\"workspaceContains:**/*.v\"\n\t],\n\t\"main\": \"./out/extension.js\",\n\t\"dependencies\": {\n\t\t\"vscode-languageclient\": \"10.0.0-next.15\"\n\t},\n\t\"devDependencies\": {\n\t\t\"esbuild\": \"^0.25.10\",\n\t\t\"@types/node\": \"24\",\n\t\t\"@types/vscode\": \"1.105.0\",\n\t\t\"@typescript-eslint/eslint-plugin\": \"^8.46\",\n\t\t\"@typescript-eslint/parser\": \"^8.46\",\n\t\t\"@vscode/vsce\": \"^3.6.2\",\n\t\t\"eslint\": \"^9.37.0\",\n\t\t\"globals\": \"^15.9.0\",\n\t\t\"markdownlint-cli\": \"^0.45.0\",\n\t\t\"prettier\": \"^3.6.2\",\n\t\t\"typescript\": \"^5.9.3\",\n\t\t\"vscode-tmgrammar-test\": \"~0.1.3\"\n\t}\n}\n"
  },
  {
    "path": "snippets/snippets.json",
    "content": "{\n\t\"snippet.assert\": {\n\t\t\"body\": [\"assert ${1:expression}\"],\n\t\t\"description\": \"Code snippet for testing 'assert'\",\n\t\t\"prefix\": \"as\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.unimpl\": {\n\t\t\"body\": [\"assert false, 'unimplemented'\"],\n\t\t\"description\": \"Code snippet for unimplemented 'assert'\",\n\t\t\"prefix\": \"unimpl\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.unreach\": {\n\t\t\"body\": [\"assert false, 'unreachable'\"],\n\t\t\"description\": \"Code snippet for unreachable 'assert'\",\n\t\t\"prefix\": \"unreach\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.break\": {\n\t\t\"body\": [\"break$0\"],\n\t\t\"description\": \"Code snippet for 'break'\",\n\t\t\"prefix\": \"br\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.const\": {\n\t\t\"body\": [\"const ${1:name} = ${2:value}\"],\n\t\t\"description\": \"Code snippet for 'const'\",\n\t\t\"prefix\": \"co\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.const.multiply\": {\n\t\t\"body\": [\"const (\", \"\\t$0\", \")\"],\n\t\t\"description\": \"Code snippet for multiply 'const'\",\n\t\t\"prefix\": \"cons\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.continue\": {\n\t\t\"body\": [\"continue$0\"],\n\t\t\"description\": \"Code snippet for 'continue'\",\n\t\t\"prefix\": \"con\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.defer\": {\n\t\t\"body\": [\"defer {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'defer' block\",\n\t\t\"prefix\": \"def\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.else\": {\n\t\t\"body\": [\"else {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'else' statement\",\n\t\t\"prefix\": \"el\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.elseif\": {\n\t\t\"body\": [\"else if ${1:expression} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'else if' statement\",\n\t\t\"prefix\": \"elf\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.enum\": {\n\t\t\"body\": [\"enum ${1:name} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'enum'\",\n\t\t\"prefix\": \"en\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.flag\": {\n\t\t\"body\": [\"#flag ${1:-flag}\"],\n\t\t\"description\": \"Code snippet for '#flag'\",\n\t\t\"prefix\": \"fl\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.fn.eprint\": {\n\t\t\"body\": [\"eprint('${1:text}')\"],\n\t\t\"description\": \"Code snippet for standart based function 'eprint'\",\n\t\t\"prefix\": \"epr\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.fn.eprintln\": {\n\t\t\"body\": [\"eprintln('${1:text}')\"],\n\t\t\"description\": \"Code snippet for standart based function 'eprintln'\",\n\t\t\"prefix\": \"eprl\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.fn.init\": {\n\t\t\"body\": [\"fn init() {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'init' function\",\n\t\t\"prefix\": \"finit\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.fn.main\": {\n\t\t\"body\": [\"fn main() {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'main' function\",\n\t\t\"prefix\": \"fmain\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.fn.print\": {\n\t\t\"body\": [\"print('${1:text}')\"],\n\t\t\"description\": \"Code snippet for standart based function 'print'\",\n\t\t\"prefix\": \"pr\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.fn.println\": {\n\t\t\"body\": [\"println('${1:text}')\"],\n\t\t\"description\": \"Code snippet for standart based function 'println'\",\n\t\t\"prefix\": \"prl\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.for\": {\n\t\t\"body\": [\"for {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for pure infinity loop 'for'\",\n\t\t\"prefix\": \"for\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.for.index\": {\n\t\t\"body\": [\"for ${1:i} := 0; $1 < ${3:count}; $1++ {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for index loop 'for'\",\n\t\t\"prefix\": \"for\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.foreach\": {\n\t\t\"body\": [\"for ${1:variable} in ${2:array} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for foreach 'for'\",\n\t\t\"prefix\": \"fore\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.foreach.index\": {\n\t\t\"body\": [\"for ${1:_}, ${2:variable} in ${3:array} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for index based loop 'for'\",\n\t\t\"prefix\": \"fore\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.function\": {\n\t\t\"body\": [\"fn ${1:name}() {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for function 'fn'\",\n\t\t\"prefix\": \"fn\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.go\": {\n\t\t\"body\": [\"go ${1:function}($0)\"],\n\t\t\"description\": \"Code snippet for concurrency 'go'\",\n\t\t\"prefix\": \"go\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.goto\": {\n\t\t\"body\": [\"goto ${1:label}\"],\n\t\t\"description\": \"Code snippet for 'goto' label\",\n\t\t\"prefix\": \"got\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.if\": {\n\t\t\"body\": [\"if ${1:expression} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'if' statement\",\n\t\t\"prefix\": \"if\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.if.compile\": {\n\t\t\"body\": [\"\\\\$if ${1:expression} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for compile time 'if'\",\n\t\t\"prefix\": \"$i\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.ifelse\": {\n\t\t\"body\": [\"if ${1:expression} {\", \"\\t$0\", \"} else {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'if-else' statement\",\n\t\t\"prefix\": \"ie\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.import\": {\n\t\t\"body\": [\"import ${1:module}\"],\n\t\t\"description\": \"Code snippet for 'import' module\",\n\t\t\"prefix\": \"imp\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.include\": {\n\t\t\"body\": [\"#include <${1:name}>\"],\n\t\t\"description\": \"Code snippet for C '#include'\",\n\t\t\"prefix\": \"inc\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.interface\": {\n\t\t\"body\": [\"interface ${1:name} {$0}\"],\n\t\t\"description\": \"Code snippet for 'interface'\",\n\t\t\"prefix\": \"inte\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.map\": {\n\t\t\"body\": [\"map[${1:key}]${2:value}{$0}\"],\n\t\t\"description\": \"Code snippet for 'map'\",\n\t\t\"prefix\": \"map\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.match\": {\n\t\t\"body\": [\"match ${1:expression} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'match' statement\",\n\t\t\"prefix\": \"ma\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.module\": {\n\t\t\"body\": [\"module ${1:name}\"],\n\t\t\"description\": \"Code snippet for 'module'\",\n\t\t\"prefix\": \"mod\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.public.function\": {\n\t\t\"body\": [\"pub fn ${1:name}() {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for public function 'pub fn'\",\n\t\t\"prefix\": \"pub\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.return\": {\n\t\t\"body\": [\"return ${1:value}\"],\n\t\t\"description\": \"Code snippet for 'return'\",\n\t\t\"prefix\": \"ret\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.struct\": {\n\t\t\"body\": [\"struct ${1:Name} {\", \"\\t$0\", \"}\"],\n\t\t\"description\": \"Code snippet for 'struct'\",\n\t\t\"prefix\": \"stru\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type\": {\n\t\t\"body\": [\"type ${1:name} = ${2:type}\"],\n\t\t\"description\": \"Code snippet for 'type' definition\",\n\t\t\"prefix\": \"ty\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.bool\": {\n\t\t\"body\": [\"bool\"],\n\t\t\"description\": \"Code snippet for Boolean\",\n\t\t\"prefix\": \"bool\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.byte\": {\n\t\t\"body\": [\"byte\"],\n\t\t\"description\": \"Code snippet for Unsigned 8-bit Integer\",\n\t\t\"prefix\": \"byte\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.byteptr\": {\n\t\t\"body\": [\"byteptr\"],\n\t\t\"description\": \"Code snippet for Byte*\",\n\t\t\"prefix\": \"bptr\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.f32\": {\n\t\t\"body\": [\"f32\"],\n\t\t\"description\": \"Code snippet for 32-bit FloatingPoint\",\n\t\t\"prefix\": \"float\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.f64\": {\n\t\t\"body\": [\"f64\"],\n\t\t\"description\": \"Code snippet for 64-bit FloatingPoint\",\n\t\t\"prefix\": \"float64\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.i8\": {\n\t\t\"body\": [\"i8\"],\n\t\t\"description\": \"Code snippet for Signed 8-bit Integer\",\n\t\t\"prefix\": \"int8\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.i16\": {\n\t\t\"body\": [\"i16\"],\n\t\t\"description\": \"Code snippet for Signed 16-bit Integer\",\n\t\t\"prefix\": \"int16\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.i64\": {\n\t\t\"body\": [\"i64\"],\n\t\t\"description\": \"Code snippet for Signed 64-bit Integer\",\n\t\t\"prefix\": \"int64\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.int\": {\n\t\t\"body\": [\"int\"],\n\t\t\"description\": \"Code snippet for Signed 32-bit Integer\",\n\t\t\"prefix\": \"int\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.rune\": {\n\t\t\"body\": [\"rune\"],\n\t\t\"description\": \"Code snippet for Represents a Unicode CodePoint\",\n\t\t\"prefix\": \"rune\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.string\": {\n\t\t\"body\": [\"string\"],\n\t\t\"description\": \"Code snippet for String\",\n\t\t\"prefix\": \"str\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.u16\": {\n\t\t\"body\": [\"u16\"],\n\t\t\"description\": \"Code snippet for Unsigned 16-bit Integer\",\n\t\t\"prefix\": \"u16\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.u32\": {\n\t\t\"body\": [\"u32\"],\n\t\t\"description\": \"Code snippet for Unsigned 32-bit Integer\",\n\t\t\"prefix\": \"u32\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.u64\": {\n\t\t\"body\": [\"u64\"],\n\t\t\"description\": \"Code snippet for Unsigned 64-bit Integer\",\n\t\t\"prefix\": \"u64\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.voidptr\": {\n\t\t\"body\": [\"voidptr\"],\n\t\t\"description\": \"Code snippet for void*\",\n\t\t\"prefix\": \"vptr\",\n\t\t\"scope\": \"v,vlang\"\n\t},\n\t\"snippet.type.charptr\": {\n\t\t\"body\": [\"charptr\"],\n\t\t\"description\": \"Code snippet for char*\",\n\t\t\"prefix\": \"cptr\",\n\t\t\"scope\": \"v,vlang\"\n\t}\n}\n"
  },
  {
    "path": "src/commands.ts",
    "content": "import { vlsOutputChannel } from \"logger\"\nimport { commands, ExtensionContext, window } from \"vscode\"\nimport type { LanguageClient } from \"vscode-languageclient/node\"\nimport { execVInTerminal, execVInTerminalOnBG } from \"./exec\"\n\n/** Run the currently active V file using `v run`. */\nexport async function run(): Promise<void> {\n\tconst document = window.activeTextEditor?.document\n\tif (!document) {\n\t\tvoid window.showErrorMessage(\"No active V file to run.\")\n\t\treturn\n\t}\n\n\tawait document.save()\n\tconst filePath = `\"${document.fileName}\"`\n\texecVInTerminal([\"run\", filePath])\n}\n\n/** Format the currently active V file in-place using `v fmt -w`. */\nexport async function fmt(): Promise<void> {\n\tconst document = window.activeTextEditor?.document\n\tif (!document) {\n\t\tvoid window.showErrorMessage(\"No active V file to format.\")\n\t\treturn\n\t}\n\n\tawait document.save()\n\tconst filePath = `\"${document.fileName}\"`\n\tawait execVInTerminalOnBG([\"fmt\", \"-w\", filePath])\n}\n\n/** Build an optimized executable from the current file using `v -prod`. */\nexport async function prod(): Promise<void> {\n\tconst document = window.activeTextEditor?.document\n\tif (!document) {\n\t\tvoid window.showErrorMessage(\"No active V file to build.\")\n\t\treturn\n\t}\n\n\tawait document.save()\n\tconst filePath = `\"${document.fileName}\"`\n\texecVInTerminal([\"-prod\", filePath])\n}\n\n/** Show version information of the configured `v` executable. */\nexport function ver(): void {\n\texecVInTerminalOnBG([\"-version\"]).catch((err) => {\n\t\tvoid window.showErrorMessage(`Failed to get V version: ${err}. Is V installed correctly?`)\n\t})\n}\n\nexport async function updateVls(client?: LanguageClient): Promise<void> {\n\t// For now, show an informational message. If we had an update mechanism\n\t// (download/install), it would be invoked here and possibly restart the client.\n\tvoid window.showInformationMessage(\"Update VLS: not implemented.\")\n\t// If a client is provided, optionally restart to pick up a new binary.\n\tif (client) {\n\t\ttry {\n\t\t\tawait client.stop()\n\t\t\tawait client.start()\n\t\t\tvoid window.showInformationMessage(\"VLS has been restarted after update.\")\n\t\t} catch {\n\t\t\t// ignore error details for now\n\t\t\tvoid window.showErrorMessage(\"Failed to restart VLS after update.\")\n\t\t}\n\t}\n}\n\nexport async function restartVls(cli?: LanguageClient): Promise<void> {\n\tif (!cli) {\n\t\tvoid window.showErrorMessage(\"VLS client is not running.\")\n\t\treturn\n\t}\n\n\ttry {\n\t\tawait cli.restart()\n\t\tvoid window.showInformationMessage(\"VLS restarted successfully.\")\n\t} catch {\n\t\tvoid window.showErrorMessage(\"Failed to restart VLS.\")\n\t}\n}\n\nexport function registerCommands(context: ExtensionContext): Promise<void> {\n\tcontext.subscriptions.push(\n\t\tcommands.registerCommand(\"v.run\", run),\n\t\tcommands.registerCommand(\"v.fmt\", fmt),\n\t\tcommands.registerCommand(\"v.ver\", ver),\n\t\tcommands.registerCommand(\"v.prod\", prod),\n\t)\n\treturn Promise.resolve()\n}\n\nexport function registerVlsCommands(context: ExtensionContext, client?: LanguageClient): void {\n\tcontext.subscriptions.push(\n\t\tcommands.registerCommand(\"v.vls.update\", () => updateVls(client)),\n\t\tcommands.registerCommand(\"v.vls.restart\", () => restartVls(client)),\n\t\tcommands.registerCommand(\"v.vls.openOutput\", () => {\n\t\t\tvlsOutputChannel.show()\n\t\t}),\n\t)\n}\n"
  },
  {
    "path": "src/exec.ts",
    "content": "import { exec as _exec } from \"child_process\"\nimport { promisify } from \"util\"\nimport { Terminal, window } from \"vscode\"\nimport { config } from \"./utils\"\n\nlet vRunTerm: Terminal | null = null\n\nconst exec = promisify(_exec)\n\n// Get V executable command.\nexport function getVExecCommand(): string {\n\treturn config().get<string>(\"executablePath\") //default is v\n}\n\nexport function execVInTerminal(args: string[]): void {\n\tconst vexec = getVExecCommand()\n\tconst cmd = `${vexec} ${args.join(\" \")}`\n\n\tif (!vRunTerm) vRunTerm = window.createTerminal(\"V\")\n\n\tvRunTerm.show()\n\tvRunTerm.sendText(cmd)\n}\n\nexport async function execVInTerminalOnBG(args: string[], cwd = \"/\"): Promise<void> {\n\tconst vexec = getVExecCommand()\n\tconst cmd = `${vexec} ${args.join(\" \")}`\n\n\tawait exec(cmd, { cwd })\n}\n"
  },
  {
    "path": "src/extension.ts",
    "content": "import { registerCommands, registerVlsCommands } from \"commands\"\nimport { getVls, isVlsEnabled } from \"langserver\"\nimport { log, outputChannel, vlsOutputChannel } from \"logger\"\nimport vscode, { ConfigurationChangeEvent, ExtensionContext, workspace } from \"vscode\"\nimport { LanguageClient, LanguageClientOptions, ServerOptions } from \"vscode-languageclient/node\"\nimport { installV, isVInstalled } from \"./utils\"\n\nexport let client: LanguageClient | undefined\n\nasync function createAndStartClient(): Promise<void> {\n\tconst vlsPath = await getVls()\n\n\tconst serverOptions: ServerOptions = {\n\t\trun: { command: vlsPath },\n\t\tdebug: { command: vlsPath },\n\t}\n\n\tconst clientOptions: LanguageClientOptions = {\n\t\tdocumentSelector: [{ scheme: \"file\", language: \"v\" }],\n\t\toutputChannel: vlsOutputChannel,\n\t\tsynchronize: {\n\t\t\tfileEvents: vscode.workspace.createFileSystemWatcher(\"**/*.v\"),\n\t\t},\n\t}\n\n\tclient = new LanguageClient(\"vls\", \"V Language Server\", serverOptions, clientOptions)\n\tvscode.window.showInformationMessage(\"V Language Server is starting.\")\n\tawait client.start()\n\tvscode.window.showInformationMessage(\"V Language Server is now active.\")\n}\n\nexport async function activate(context: ExtensionContext): Promise<void> {\n\t// Register output channels so users can open them even without VLS.\n\tcontext.subscriptions.push(outputChannel, vlsOutputChannel)\n\n\t// Check for V only if it's not installed\n\tif (!(await isVInstalled())) {\n\t\tconst selection = await vscode.window.showInformationMessage(\n\t\t\t\"The V programming language is not detected on this system. Would you like to install it?\",\n\t\t\t{ modal: true }, // Modal makes the user have to choose before continuing\n\t\t\t\"Yes\",\n\t\t\t\"No\",\n\t\t)\n\n\t\tif (selection === \"Yes\") {\n\t\t\tawait installV()\n\t\t}\n\t}\n\n\t// Register commands regardless of whether VLS is enabled\n\tawait registerCommands(context)\n\n\t// Only start the language server if the user enabled it in settings.\n\tif (isVlsEnabled()) {\n\t\ttry {\n\t\t\tawait createAndStartClient()\n\t\t} catch (err) {\n\t\t\t// If starting the client fails, log and continue. Users can still\n\t\t\t// use non-LSP features of the extension.\n\t\t\tconsole.error(\"Failed to start VLS:\", err)\n\t\t\tvscode.window.showErrorMessage(\"Failed to start VLS. See output for details.\")\n\t\t\toutputChannel.show()\n\t\t}\n\t} else {\n\t\tlog(\"VLS is disabled in settings.\")\n\t}\n\n\tregisterVlsCommands(context, client)\n\n\t// React to configuration changes: enable/disable or request restart.\n\tworkspace.onDidChangeConfiguration(async (e: ConfigurationChangeEvent) => {\n\t\tconst vlsEnabled = isVlsEnabled()\n\n\t\tif (e.affectsConfiguration(\"v.vls.enable\")) {\n\t\t\tif (vlsEnabled && !client) {\n\t\t\t\t// Start the client now that the user enabled it.\n\t\t\t\ttry {\n\t\t\t\t\tawait createAndStartClient()\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconsole.error(\"Failed to start VLS:\", err)\n\t\t\t\t\tvscode.window.showErrorMessage(\"Failed to start VLS. See output for details.\")\n\t\t\t\t\toutputChannel.show()\n\t\t\t\t}\n\t\t\t} else if (!vlsEnabled && client) {\n\t\t\t\t// Stop the client if it was running and the user disabled it.\n\t\t\t\ttry {\n\t\t\t\t\tawait client.stop()\n\t\t\t\t\tlog(\"VLS has been stopped.\")\n\t\t\t\t} catch {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t\tclient = undefined\n\t\t\t}\n\t\t} else if (e.affectsConfiguration(\"v.vls\") && vlsEnabled && client) {\n\t\t\tvoid vscode.window\n\t\t\t\t.showInformationMessage(\n\t\t\t\t\t\"VLS: Restart is required for changes to take effect. Would you like to proceed?\",\n\t\t\t\t\t\"Yes\",\n\t\t\t\t\t\"No\",\n\t\t\t\t)\n\t\t\t\t.then(async (selected) => {\n\t\t\t\t\tif (selected == \"Yes\") {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (client) {\n\t\t\t\t\t\t\t\tawait client.restart()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch {\n\t\t\t\t\t\t\tvoid vscode.window.showErrorMessage(\"Failed to restart VLS.\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t})\n}\n\nexport function deactivate(): Promise<void> | undefined {\n\tif (!client) return undefined\n\treturn client.stop()\n}\n"
  },
  {
    "path": "src/langserver.ts",
    "content": "import * as os from \"os\"\nimport * as path from \"path\"\nimport { window } from \"vscode\"\nimport { log } from \"./logger\"\nimport { vlsConfig } from \"./utils\"\n\nimport { exec as _exec } from \"child_process\"\nimport { promises as fs } from \"fs\"\nimport { promisify } from \"util\"\nimport { execVInTerminalOnBG } from \"./exec\"\nimport { isVInstalled } from \"./utils\"\n\nconst exec = promisify(_exec)\n\nexport const BINARY_NAME = process.platform === \"win32\" ? \"vls.exe\" : \"vls\"\n\nexport const USER_BIN_PATH = path.join(os.homedir(), \".local\", \"bin\")\n\nexport const VLS_PATH = path.join(USER_BIN_PATH, BINARY_NAME) // ~/.local/bin/vls if not tmp enabled\n\nexport async function getVls(): Promise<string> {\n\tif (vlsConfig().get<boolean>(\"forceCleanInstall\")) {\n\t\tawait fs.rm(VLS_PATH, { recursive: true, force: true })\n\t\tlog(\"forceCleanInstall is enabled, removed existing VLS.\")\n\t} else if (await isVlsInstalled()) {\n\t\t// dont check if installed if forceCleanInstall is true\n\t\treturn VLS_PATH\n\t}\n\tconst selected = await window.showInformationMessage(\n\t\t\"VLS is not installed. Do you want to install it now?\",\n\t\t\"Yes\",\n\t\t\"No\",\n\t)\n\tif (selected === \"No\") {\n\t\tthrow new Error(\"VLS is required but not installed.\")\n\t}\n\n\tif (!vlsConfig().get<boolean>(\"build\")) {\n\t\treturn await installVls()\n\t}\n\treturn await buildVls()\n}\n\nexport function isVlsEnabled(): boolean {\n\treturn vlsConfig().get<boolean>(\"enable\")\n}\n\nexport async function isVlsInstalled(): Promise<boolean> {\n\ttry {\n\t\t// Check if file exists\n\t\tawait fs.access(VLS_PATH)\n\t\tlog(`Using existing VLS at ${VLS_PATH}`)\n\t\treturn true\n\t} catch {\n\t\t// File doesn't exist — ignore and proceed to build/install\n\t\treturn false\n\t}\n}\n\nexport function installVls(): Promise<string> {\n\t// TODO: Install latest vls from github once there are releases\n\treturn Promise.reject(\n\t\tnew Error(\"VLS builds not yet available. Please enable vls.build in settings.\"),\n\t)\n}\n\nexport async function buildVls(): Promise<string> {\n\tif (!(await isVInstalled())) {\n\t\tthrow new Error(\"V must be installed to build VLS.\")\n\t}\n\tlet buildPath\n\ttry {\n\t\tlog(\"Building VLS...\")\n\t\twindow.showInformationMessage(\"Building VLS...\")\n\t\tif (vlsConfig().get<string>(\"buildPath\") !== \"\") {\n\t\t\tbuildPath = vlsConfig().get<string>(\"buildPath\")\n\t\t} else {\n\t\t\t// Use temporary directory for cross-platform compatibility\n\t\t\tbuildPath = path.join(os.tmpdir(), \"vls\")\n\t\t\t// Remove any existing directory at buildPath\n\t\t\tawait fs.rm(buildPath, { recursive: true, force: true })\n\t\t\t// Clone the repo into buildPath\n\t\t\tawait exec(`git clone --depth 1 https://github.com/vlang/vls.git ${buildPath}`)\n\t\t}\n\t\tawait execVInTerminalOnBG([\".\"], buildPath) // build\n\n\t\t// Ensure target dir exists\n\t\tawait fs.mkdir(path.dirname(VLS_PATH), { recursive: true })\n\n\t\t// Copy binary using Node fs to support Windows\n\t\tawait fs.copyFile(path.join(buildPath, BINARY_NAME), VLS_PATH)\n\n\t\tlog(`VLS built and installed at ${VLS_PATH}`)\n\t\treturn VLS_PATH\n\t} catch (err) {\n\t\tconst message = err instanceof Error ? err.message : String(err)\n\t\tlog(`Failed to build or install VLS: ${message}`)\n\t\tthrow new Error(`Failed to build or install VLS: ${message}`)\n\t}\n}\n"
  },
  {
    "path": "src/logger.ts",
    "content": "import { window } from \"vscode\"\n\nexport const outputChannel = window.createOutputChannel(\"V\", { log: true })\nexport const vlsOutputChannel = window.createOutputChannel(\"V Language Server\", { log: true })\n\nexport function log(msg: string): void {\n\t// logging for devtools/debug\n\tconsole.log(`[vscode-vlang] ${msg}`)\n\toutputChannel.info(msg)\n}\n"
  },
  {
    "path": "src/utils.ts",
    "content": "import { exec as _exec } from \"child_process\"\nimport { getVExecCommand } from \"exec\"\nimport * as fs from \"fs\"\nimport { USER_BIN_PATH } from \"langserver\"\nimport { log } from \"logger\"\nimport * as os from \"os\"\nimport * as path from \"path\"\nimport { promisify } from \"util\"\nimport { ProgressLocation, Uri, window, workspace, WorkspaceFolder } from \"vscode\"\n\nexport const config = () => workspace.getConfiguration(\"v\")\n\nexport const vlsConfig = () => workspace.getConfiguration(\"v.vls\")\n\nconst exec = promisify(_exec)\n\n/** Get current working directory.\n * @param uri The URI of document\n */\nexport function getCwd(uri?: Uri): string {\n\tconst folder = getWorkspaceFolder(uri || null)\n\treturn folder.uri.fsPath\n}\n\n/** Get workspace of current document.\n * @param uri The URI of document\n */\nexport function getWorkspaceFolder(uri?: Uri): WorkspaceFolder {\n\tif (uri) {\n\t\treturn workspace.getWorkspaceFolder(uri)\n\t} else if (window.activeTextEditor && window.activeTextEditor.document) {\n\t\treturn workspace.getWorkspaceFolder(window.activeTextEditor.document.uri)\n\t} else {\n\t\treturn workspace.workspaceFolders[0]\n\t}\n}\n\n/**\n * Checks if the 'v' command is available in the system's PATH.\n * @returns A promise that resolves to true if 'v' is installed, otherwise false.\n */\nexport async function isVInstalled(): Promise<boolean> {\n\tconst vexec = getVExecCommand()\n\ttry {\n\t\t// A simple command to check if V is installed and in the PATH.\n\t\tconst version = await exec(`${vexec} --version`)\n\t\tlog(`V is already installed, version: ${version.stdout.trim()}`)\n\t\treturn true\n\t} catch (error) {\n\t\tlog(`V is not detected in PATH: ${error}`)\n\t\treturn false\n\t}\n}\n\n/**\n * Clone and build the `v` compiler\n *\n * Returns: absolute path to the `v` binary (string)\n * Error: rejects if any git/make step fails\n */\nexport async function installV(): Promise<void> {\n\tconst installDir = USER_BIN_PATH\n\tconst vRepoPath = path.join(installDir, \"v\")\n\tconst repoUrl = \"https://github.com/vlang/v\"\n\n\tawait window.withProgress(\n\t\t{\n\t\t\tlocation: ProgressLocation.Notification,\n\t\t\ttitle: \"Installing V Language\",\n\t\t\tcancellable: false,\n\t\t},\n\t\tasync (progress) => {\n\t\t\ttry {\n\t\t\t\t// 0. Clean up any previous failed attempts\n\t\t\t\tprogress.report({ message: \"Preparing workspace...\" })\n\t\t\t\tif (fs.existsSync(installDir)) {\n\t\t\t\t\tfs.rmSync(installDir, { recursive: true, force: true })\n\t\t\t\t}\n\t\t\t\tfs.mkdirSync(installDir)\n\n\t\t\t\t// 1. Clone the repository\n\t\t\t\tprogress.report({ message: \"Cloning V repository...\" })\n\t\t\t\tawait exec(`git clone --depth=1 ${repoUrl}`, { cwd: installDir })\n\n\t\t\t\t// 2. Build V using make\n\t\t\t\tprogress.report({ message: \"Building V from source (this may take a moment)...\" })\n\t\t\t\tawait exec(\"make\", { cwd: vRepoPath })\n\n\t\t\t\t// 3. Create a symlink\n\t\t\t\t// This command often requires sudo/admin privileges.\n\t\t\t\t// We run it and inform the user to run it manually if it fails.\n\t\t\t\tprogress.report({ message: \"Attempting to create symlink...\" })\n\n\t\t\t\ttry {\n\t\t\t\t\t// On Windows, the build script handles the path. On Linux/macOS, symlink is used.\n\t\t\t\t\tconst symlinkCommand =\n\t\t\t\t\t\tos.platform() === \"win32\" ? \"v.exe symlink\" : \"./v symlink\"\n\t\t\t\t\tawait exec(symlinkCommand, { cwd: vRepoPath })\n\n\t\t\t\t\twindow.showInformationMessage(\n\t\t\t\t\t\t\"V language installed and linked successfully! Please restart VS Code to use the `v` command.\",\n\t\t\t\t\t)\n\t\t\t\t} catch (symlinkError) {\n\t\t\t\t\tconsole.error(symlinkError)\n\t\t\t\t\twindow.showWarningMessage(\n\t\t\t\t\t\t`V was built successfully, but the automatic symlink failed (likely due to permissions). Please run '${path.join(vRepoPath, \"v\")} symlink' manually with administrator/sudo rights.`,\n\t\t\t\t\t\t\"OK\",\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error)\n\t\t\t\twindow.showErrorMessage(\n\t\t\t\t\t`Failed to install V. Please check the logs for details. Error: ${error}`,\n\t\t\t\t)\n\t\t\t}\n\t\t},\n\t)\n}\n"
  },
  {
    "path": "syntaxes/tests/accessor.v",
    "content": "// SYNTAX TEST \"source.v\" \"method accessor\"\nhello.world\n//   ^ punctuation.accessor.v\n"
  },
  {
    "path": "syntaxes/tests/comma.v",
    "content": "// SYNTAX TEST \"source.v\" \"comma\"\n [1, 2, 3, 4]\n// ^ punctuation.separator.comma.v\n//    ^ punctuation.separator.comma.v\n//       ^ punctuation.separator.comma.v\n"
  },
  {
    "path": "syntaxes/tests/comparison.v",
    "content": "// SYNTAX TEST \"source.v\" \"comparison\"\n   0 == 0\n// ^ constant.numeric.integer.v\n//   ^^ keyword.operator.relation.v\n//      ^ constant.numeric.integer.v\n"
  },
  {
    "path": "syntaxes/tests/dot.int.v",
    "content": "// SYNTAX TEST \"source.v\"\nhello.int()\n//    ^^^ entity.name.function.v\n"
  },
  {
    "path": "syntaxes/tests/escape.v",
    "content": "// SYNTAX TEST \"source.v\"\n   @type\n// ^^^^^ source.v - keyword.type.v\n"
  },
  {
    "path": "syntaxes/tests/function.v",
    "content": "// SYNTAX TEST \"source.v\"\n   pub fn foo<T>()\n// ^^^ storage.modifier.v\n//     ^^ keyword.fn.v\n//        ^^^ entity.name.function.v\n//            ^ entity.name.generic.v\n   fn foo()\n// ^^ keyword.fn.v\n//    ^^^ entity.name.function.v\n   pub fn foo()\n// ^^^ storage.modifier.v\n//     ^^ keyword.fn.v\n//        ^^^ entity.name.function.v\n   pub fn (test Blah) foo()\n// ^^^ storage.modifier.v\n//     ^^ keyword.fn.v\n//                    ^^^ entity.name.function.v\n   fn C.foo()\n// ^^ keyword.fn.v\n//      ^^^ entity.name.function.v\n"
  },
  {
    "path": "syntaxes/tests/hashtag.v",
    "content": "// SYNTAX TEST \"source.v\" \"hashtag\"\n   #include <test>\n// ^^^^^^^^^^^^^^^ markup.bold.v\n#define foo bar\n// ^^^^^^^^^^^^ markup.bold.v\n#some javascript line\n// ^^^^^^^^^^^^^^^^^^ markup.bold.v\n"
  },
  {
    "path": "syntaxes/tests/method.v",
    "content": "// SYNTAX TEST \"source.v\" \"method accessor\"\nhello.method()\n//    ^^^^^^ entity.name.function.v\n"
  },
  {
    "path": "syntaxes/tests/numbers.v",
    "content": "// SYNTAX TEST \"source.v\" \"numbers\"\n_ := 1_000_000\n//   ^^^^^^^^^ constant.numeric.integer.v\n_ := 3_122.55\n//   ^^^^^^^^ constant.numeric.float.v\n_ := 3.14e11\n//   ^^^^^^^ constant.numeric.exponential.v\n_ := 0xF_F\n//   ^^^^^ constant.numeric.hex.v\n_ := 0o17_3\n//   ^^^^^^ constant.numeric.octal.v\n_ := 0b0_11\n//   ^^^^^^ constant.numeric.binary.v\n"
  },
  {
    "path": "syntaxes/tests/optional.v",
    "content": "// SYNTAX TEST \"source.v\" \"optional\"\nfn f(url string) ?string {\n//               ^ keyword.operator.optional.v\n"
  },
  {
    "path": "syntaxes/tests/pubfn.v",
    "content": "// SYNTAX TEST \"source.v\"\n   pubfn\n// ^^^ - storage.modifier.v\n//    ^^ - keyword.fn.v\n\n   pub fn\n// ^^^ storage.modifier.v\n//     ^^ keyword.fn.v\n\npub fn\n   // test\n// ^^ comment.line.double-slash.v\n"
  },
  {
    "path": "syntaxes/tests/string.v",
    "content": "// SYNTAX TEST \"source.v\" \"string\"\n_ := 'test'\n//    ^^^^ string.quoted.v\na := 1\nb := 2\n_ := '$a'\n//    ^^ string.quoted.v\n_ := '\\\\'\n//    ^^ constant.character.escape.v\n_ := c'test'\n//   ^ storage.type.string.v\n_ := `r`\n//   ^^^ string.quoted.rune.v\n_ := r'\\'\n//   ^ storage.type.string.v\n//    ^^^ string.quoted.raw.v\n_ := r\"\\\"\n//   ^ storage.type.string.v\n//    ^^^ string.quoted.raw.v\n_ := r'$a'\n//   ^ storage.type.string.v\n//    ^^^ string.quoted.raw.v\n_ := '${a + b}'\n//    ^^ punctuation.definition.template-expression.begin.v\n//        ^ keyword.operator.arithmetic.v\n//          ^ variable.other.v\n//           ^ punctuation.definition.template-expression.end.v\n\n"
  },
  {
    "path": "syntaxes/tests/type.v",
    "content": "// SYNTAX TEST \"source.v\"\nstruct Foo {}\n//     ^^^ entity.name.type.v\ntype Foo = int\n//   ^^^ entity.name.type.v\n"
  },
  {
    "path": "syntaxes/tests/variable.v",
    "content": "// SYNTAX TEST \"source.v\"\n    abc := ''\n//  ^^^ variable.other.assignment.v\nmut abc := ''\n//  ^^^ variable.other.assignment.v\n    abc = ''\n//  ^^^ variable.other.assignment.v\n   abc, foo := '', ''\n// ^^^ variable.other.assignment.v\n//    ^^ - variable.other.assignment.v\n//      ^^^ variable.other.assignment.v\n   variable2 := 2\n// ^^^^^^^^^ variable.other.assignment.v\n//         ^ - constant.numeric.integer.v\n"
  },
  {
    "path": "syntaxes/v.mod.tmLanguage.json",
    "content": "{\n\t\"scopeName\": \"v.mod\",\n\t\"patterns\": [\n\t\t{\n\t\t\t\"include\": \"#module-decl\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#brackets\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#field\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#string-placeholder\"\n\t\t}\n\t],\n\t\"repository\": {\n\t\t\"module-decl\": {\n\t\t\t\"name\": \"keyword.module.v.mod\",\n\t\t\t\"match\": \"(\\\\bModule)\"\n\t\t},\n\t\t\"brackets\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"{\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.curly.begin.v.mod\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"}\",\n\t\t\t\t\t\"endCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.curly.end.v.mod\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"field\": {\n\t\t\t\"name\": \"meta.definition.field.$1.v.mod\",\n\t\t\t\"match\": \"\\\\b'([\\\\w]+)':\\\\s*'([\\\\w]*)'\\\\s*\"\n\t\t},\n\t\t\"string\": {\n\t\t\t\"name\": \"meta.definition.string.v.mod\",\n\t\t\t\"begin\": \"'\",\n\t\t\t\"beginCaptures\": {\n\t\t\t\t\"0\": {\n\t\t\t\t\t\"name\": \"storage.type.string.v.mod\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"end\": \"'\",\n\t\t\t\"endCaptures\": {\n\t\t\t\t\"0\": {\n\t\t\t\t\t\"name\": \"storage.type.string.v.mod\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"include\": \"#string-placeholder\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"string-placeholder\": {\n\t\t\t\"match\": \"%(\\\\[\\\\d+\\\\])?([\\\\+#\\\\-0\\\\x20]{,2}((\\\\d+|\\\\*)?(\\\\.?(\\\\d+|\\\\*|(\\\\[\\\\d+\\\\])\\\\*?)?(\\\\[\\\\d+\\\\])?)?))?[vT%tbcdoqxXUbeEfFgGsp]\",\n\t\t\t\"name\": \"constant.other.placeholder.v.mod\"\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "syntaxes/v.tmLanguage.json",
    "content": "{\n\t\"name\": \"V\",\n\t\"scopeName\": \"source.v\",\n\t\"fileTypes\": [\".v\", \".vh\", \".vsh\"],\n\t\"patterns\": [\n\t\t{\n\t\t\t\"include\": \"#comments\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#function-decl\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#as-is\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#attributes\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#assignment\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#module-decl\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#import-decl\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#hash-decl\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#brackets\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#builtin-fix\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#escaped-fix\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#operators\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#function-limited-overload-decl\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#function-extend-decl\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#function-exist\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#generic\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#constants\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#type\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#enum\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#interface\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#struct\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#keywords\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#storage\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#numbers\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#strings\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#types\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#punctuations\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#variable-assign\"\n\t\t},\n\t\t{\n\t\t\t\"include\": \"#function-decl\"\n\t\t}\n\t],\n\t\"repository\": {\n\t\t\"as-is\": {\n\t\t\t\"begin\": \"\\\\s+(as|is)\\\\s+\",\n\t\t\t\"beginCaptures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"keyword.$1.v\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"end\": \"([\\\\w.]*)\",\n\t\t\t\"endCaptures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"entity.name.alias.v\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"assignment\": {\n\t\t\t\"name\": \"meta.definition.variable.v\",\n\t\t\t\"match\": \"\\\\s+((?:\\\\:|\\\\+|\\\\-|\\\\*|/|\\\\%|\\\\&|\\\\||\\\\^)?=)\\\\s+\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#operators\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"attributes\": {\n\t\t\t\"name\": \"meta.definition.attribute.v\",\n\t\t\t\"match\": \"^\\\\s*((\\\\[)(deprecated|unsafe|console|heap|manualfree|typedef|live|inline|flag|ref_only|direct_array_access|callconv)(\\\\]))\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"meta.function.attribute.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.begin.bracket.square.v\"\n\t\t\t\t},\n\t\t\t\t\"3\": {\n\t\t\t\t\t\"name\": \"storage.modifier.attribute.v\"\n\t\t\t\t},\n\t\t\t\t\"4\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.end.bracket.square.v\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"variable-assign\": {\n\t\t\t\"match\": \"[a-zA-Z_]\\\\w*(?:,\\\\s*[a-zA-Z_]\\\\w*)*(?=\\\\s*(?:=|:=))\",\n\t\t\t\"captures\": {\n\t\t\t\t\"0\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"[a-zA-Z_]\\\\w*\",\n\t\t\t\t\t\t\t\"name\": \"variable.other.assignment.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#punctuation\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"module-decl\": {\n\t\t\t\"name\": \"meta.module.v\",\n\t\t\t\"begin\": \"^\\\\s*(module)\\\\s+\",\n\t\t\t\"beginCaptures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"keyword.module.v\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"end\": \"([\\\\w.]+)\",\n\t\t\t\"endCaptures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"entity.name.module.v\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"import-decl\": {\n\t\t\t\"name\": \"meta.import.v\",\n\t\t\t\"begin\": \"^\\\\s*(import)\\\\s+\",\n\t\t\t\"beginCaptures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"keyword.import.v\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"end\": \"([\\\\w.]+)\",\n\t\t\t\"endCaptures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"entity.name.import.v\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"hash-decl\": {\n\t\t\t\"name\": \"markup.bold.v\",\n\t\t\t\"begin\": \"^\\\\s*(#)\",\n\t\t\t\"end\": \"$\"\n\t\t},\n\t\t\"brackets\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"{\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.curly.begin.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"}\",\n\t\t\t\t\t\"endCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.curly.end.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"$self\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"\\\\(\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.begin.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"\\\\)\",\n\t\t\t\t\t\"endCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.end.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"$self\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"\\\\[\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.square.begin.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"\\\\]\",\n\t\t\t\t\t\"endCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.square.end.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"$self\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"builtin-fix\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\": \"storage.modifier.v\",\n\t\t\t\t\t\t\t\"match\": \"(const)(?=\\\\s*\\\\()\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\": \"keyword.$1.v\",\n\t\t\t\t\t\t\t\"match\": \"\\\\b(fn|type|enum|struct|union|interface|map|assert|sizeof|typeof|__offsetof)\\\\b(?=\\\\s*\\\\()\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\": \"keyword.control.v\",\n\t\t\t\t\t\t\t\"match\": \"(\\\\$if|\\\\$else)(?=\\\\s*\\\\()\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\": \"keyword.control.v\",\n\t\t\t\t\t\t\t\"match\": \"\\\\b(as|in|is|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\\\\b(?=\\\\s*\\\\()\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"(?<!.)(i?(?:8|16|nt|64|128)|u?(?:16|32|64|128)|f?(?:32|64))(?=\\\\s*\\\\()\",\n\t\t\t\t\t\t\t\"captures\": {\n\t\t\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\t\t\"name\": \"storage.type.numeric.v\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": \"meta.expr.numeric.cast.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"(bool|byte|byteptr|charptr|voidptr|string|rune|size_t|[ui]size)(?=\\\\s*\\\\()\",\n\t\t\t\t\t\t\t\"captures\": {\n\t\t\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\t\t\"name\": \"storage.type.$1.v\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"name\": \"meta.expr.bool.cast.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"comments\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"comment.block.documentation.v\",\n\t\t\t\t\t\"begin\": \"/\\\\*\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.comment.begin.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"\\\\*/\",\n\t\t\t\t\t\"endCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.comment.end.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#comments\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"comment.line.double-slash.v\",\n\t\t\t\t\t\"begin\": \"//\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"0\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.comment.begin.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"$\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"constants\": {\n\t\t\t\"name\": \"constant.language.v\",\n\t\t\t\"match\": \"\\\\b(true|false|none)\\\\b\"\n\t\t},\n\t\t\"generic\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"meta.definition.generic.v\",\n\t\t\t\t\t\"match\": \"(?<=[\\\\w\\\\s+])(\\\\<)(\\\\w+)(\\\\>)\",\n\t\t\t\t\t\"captures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.angle.begin.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"2\": {\n\t\t\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"include\": \"#illegal-name\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"match\": \"\\\\w+\",\n\t\t\t\t\t\t\t\t\t\"name\": \"entity.name.generic.v\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"3\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.angle.end.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"function-decl\": {\n\t\t\t\"name\": \"meta.definition.function.v\",\n\t\t\t\"match\": \"^(\\\\bpub\\\\b\\\\s+)?(\\\\bfn\\\\b)\\\\s+(?:\\\\([^\\\\)]+\\\\)\\\\s+)?(?:(?:C\\\\.)?)(\\\\w+)\\\\s*((?<=[\\\\w\\\\s+])(\\\\<)(\\\\w+)(\\\\>))?\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"storage.modifier.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"keyword.fn.v\"\n\t\t\t\t},\n\t\t\t\t\"3\": {\n\t\t\t\t\t\"name\": \"entity.name.function.v\"\n\t\t\t\t},\n\t\t\t\t\"4\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#generic\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"function-extend-decl\": {\n\t\t\t\"name\": \"meta.definition.function.v\",\n\t\t\t\"match\": \"^\\\\s*(pub)?\\\\s*(fn)\\\\s*(\\\\()([^\\\\)]*)(\\\\))\\\\s*(?:(?:C\\\\.)?)(\\\\w+)\\\\s*((?<=[\\\\w\\\\s+])(\\\\<)(\\\\w+)(\\\\>))?\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"storage.modifier.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"keyword.fn.v\"\n\t\t\t\t},\n\t\t\t\t\"3\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.begin.v\"\n\t\t\t\t},\n\t\t\t\t\"4\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#brackets\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#storage\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#generic\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#punctuation\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"5\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.end.v\"\n\t\t\t\t},\n\t\t\t\t\"6\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#illegal-name\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"\\\\w+\",\n\t\t\t\t\t\t\t\"name\": \"entity.name.function.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"7\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#generic\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"function-limited-overload-decl\": {\n\t\t\t\"name\": \"meta.definition.function.v\",\n\t\t\t\"match\": \"^\\\\s*(pub)?\\\\s*(fn)\\\\s*(\\\\()([^\\\\)]*)(\\\\))\\\\s*([\\\\+\\\\-\\\\*\\\\/])?\\\\s*(\\\\()([^\\\\)]*)(\\\\))\\\\s*(?:(?:C\\\\.)?)(\\\\w+)\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"storage.modifier.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"keyword.fn.v\"\n\t\t\t\t},\n\t\t\t\t\"3\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.begin.v\"\n\t\t\t\t},\n\t\t\t\t\"4\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#brackets\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#storage\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#generic\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#punctuation\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"5\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.end.v\"\n\t\t\t\t},\n\t\t\t\t\"6\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#operators\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"7\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.begin.v\"\n\t\t\t\t},\n\t\t\t\t\"8\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#brackets\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#storage\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#generic\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#punctuation\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"9\": {\n\t\t\t\t\t\"name\": \"punctuation.definition.bracket.round.end.v\"\n\t\t\t\t},\n\t\t\t\t\"10\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#illegal-name\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"\\\\w+\",\n\t\t\t\t\t\t\t\"name\": \"entity.name.function.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"function-exist\": {\n\t\t\t\"name\": \"meta.support.function.v\",\n\t\t\t\"match\": \"(\\\\w+)((?<=[\\\\w\\\\s+])(\\\\<)(\\\\w+)(\\\\>))?(?=\\\\s*\\\\()\",\n\t\t\t\"captures\": {\n\t\t\t\t\"0\": {\n\t\t\t\t\t\"name\": \"meta.function.call.v\"\n\t\t\t\t},\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#illegal-name\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"\\\\w+\",\n\t\t\t\t\t\t\t\"name\": \"entity.name.function.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#generic\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"type\": {\n\t\t\t\"name\": \"meta.definition.type.v\",\n\t\t\t\"match\": \"^\\\\s*(?:(pub)?\\\\s+)?(type)\\\\s+(\\\\w*)\\\\s+(?:\\\\w+\\\\.+)?(\\\\w*)\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"storage.modifier.$1.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"storage.type.type.v\"\n\t\t\t\t},\n\t\t\t\t\"3\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#illegal-name\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\": \"entity.name.type.v\",\n\t\t\t\t\t\t\t\"match\": \"\\\\w+\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t\"4\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#illegal-name\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\": \"entity.name.type.v\",\n\t\t\t\t\t\t\t\"match\": \"\\\\w+\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"enum\": {\n\t\t\t\"name\": \"meta.definition.enum.v\",\n\t\t\t\"match\": \"^\\\\s*(?:(pub)?\\\\s+)?(enum)\\\\s+(?:\\\\w+\\\\.)?(\\\\w*)\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"storage.modifier.$1.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"storage.type.enum.v\"\n\t\t\t\t},\n\t\t\t\t\"3\": {\n\t\t\t\t\t\"name\": \"entity.name.enum.v\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"interface\": {\n\t\t\t\"name\": \"meta.definition.interface.v\",\n\t\t\t\"match\": \"^\\\\s*(?:(pub)?\\\\s+)?(interface)\\\\s+(\\\\w*)\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"storage.modifier.$1.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"keyword.interface.v\"\n\t\t\t\t},\n\t\t\t\t\"3\": {\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#illegal-name\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"name\": \"entity.name.interface.v\",\n\t\t\t\t\t\t\t\"match\": \"\\\\w+\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"struct\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"meta.definition.struct.v\",\n\t\t\t\t\t\"begin\": \"^\\\\s*(?:(mut|pub(?:\\\\s+mut)?|__global)\\\\s+)?(struct|union)\\\\s+([\\\\w.]+)\\\\s*|({)\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"storage.modifier.$1.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"2\": {\n\t\t\t\t\t\t\t\"name\": \"storage.type.struct.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"3\": {\n\t\t\t\t\t\t\t\"name\": \"entity.name.type.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"4\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.curly.begin.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"\\\\s*|(})\",\n\t\t\t\t\t\"endCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.bracket.curly.end.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#struct-access-modifier\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"\\\\b(\\\\w+)\\\\s+([\\\\w\\\\[\\\\]\\\\*&.]+)(?:\\\\s*(=)\\\\s*((?:.(?=$|//|/\\\\*))*+))?\",\n\t\t\t\t\t\t\t\"captures\": {\n\t\t\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\t\t\"name\": \"variable.other.property.v\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"2\": {\n\t\t\t\t\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"include\": \"#numbers\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"include\": \"#brackets\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"match\": \"\\\\w+\",\n\t\t\t\t\t\t\t\t\t\t\t\"name\": \"storage.type.other.v\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"3\": {\n\t\t\t\t\t\t\t\t\t\"name\": \"keyword.operator.assignment.v\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"4\": {\n\t\t\t\t\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"include\": \"$self\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"$self\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"meta.definition.struct.v\",\n\t\t\t\t\t\"match\": \"^\\\\s*(?:(mut|pub(?:\\\\s+mut)?|__global))\\\\s+?(struct)\\\\s+(?:\\\\s+([\\\\w.]+))?\",\n\t\t\t\t\t\"captures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"storage.modifier.$1.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"2\": {\n\t\t\t\t\t\t\t\"name\": \"storage.type.struct.v\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"3\": {\n\t\t\t\t\t\t\t\"name\": \"entity.name.struct.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"struct-access-modifier\": {\n\t\t\t\"match\": \"(?<=\\\\s|^)(mut|pub(?:\\\\s+mut)?|__global)(:|\\\\b)\",\n\t\t\t\"captures\": {\n\t\t\t\t\"1\": {\n\t\t\t\t\t\"name\": \"storage.modifier.$1.v\"\n\t\t\t\t},\n\t\t\t\t\"2\": {\n\t\t\t\t\t\"name\": \"punctuation.separator.struct.key-value.v\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t\"punctuation\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.delimiter.period.dot.v\",\n\t\t\t\t\t\"match\": \"\\\\.\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.delimiter.comma.v\",\n\t\t\t\t\t\"match\": \",\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.separator.key-value.colon.v\",\n\t\t\t\t\t\"match\": \":\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.definition.other.semicolon.v\",\n\t\t\t\t\t\"match\": \";\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.definition.other.questionmark.v\",\n\t\t\t\t\t\"match\": \"\\\\?\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.hash.v\",\n\t\t\t\t\t\"match\": \"#\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"keywords\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.control.v\",\n\t\t\t\t\t\"match\": \"(\\\\$if|\\\\$else)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.control.v\",\n\t\t\t\t\t\"match\": \"(?<!@)\\\\b(as|it|is|in|or|break|continue|default|unsafe|match|if|else|for|go|spawn|goto|defer|return|shared|select|rlock|lock|atomic|asm)\\\\b\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.$1.v\",\n\t\t\t\t\t\"match\": \"(?<!@)\\\\b(fn|type|typeof|enum|struct|interface|map|assert|sizeof|__offsetof)\\\\b\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"storage\": {\n\t\t\t\"name\": \"storage.modifier.v\",\n\t\t\t\"match\": \"\\\\b(const|mut|pub)\\\\b\"\n\t\t},\n\t\t\"types\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"storage.type.numeric.v\",\n\t\t\t\t\t\"match\": \"(?<!\\\\.)\\\\b(i(8|16|nt|64|128)|u(8|16|32|64|128)|f(32|64))\\\\b\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"storage.type.$1.v\",\n\t\t\t\t\t\"match\": \"(?<!\\\\.)\\\\b(bool|byte|byteptr|charptr|voidptr|string|ustring|rune)\\\\b\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"operators\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.operator.arithmetic.v\",\n\t\t\t\t\t\"match\": \"(\\\\+|\\\\-|\\\\*|\\\\/|\\\\%|\\\\+\\\\+|\\\\-\\\\-|\\\\>\\\\>|\\\\<\\\\<)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.operator.relation.v\",\n\t\t\t\t\t\"match\": \"(\\\\=\\\\=|\\\\!\\\\=|\\\\>|\\\\<|\\\\>\\\\=|\\\\<\\\\=)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.operator.assignment.v\",\n\t\t\t\t\t\"match\": \"(\\\\:\\\\=|\\\\=|\\\\+\\\\=|\\\\-\\\\=|\\\\*\\\\=|\\\\/\\\\=|\\\\%\\\\=|\\\\&\\\\=|\\\\|\\\\=|\\\\^\\\\=|\\\\~\\\\=|\\\\&\\\\&\\\\=|\\\\|\\\\|\\\\=|\\\\>\\\\>\\\\=|\\\\<\\\\<\\\\=)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.operator.bitwise.v\",\n\t\t\t\t\t\"match\": \"(\\\\&|\\\\||\\\\^|\\\\~|<(?!<)|>(?!>))\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.operator.logical.v\",\n\t\t\t\t\t\"match\": \"(\\\\&\\\\&|\\\\|\\\\||\\\\!)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"keyword.operator.optional.v\",\n\t\t\t\t\t\"match\": \"\\\\?\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"numbers\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"constant.numeric.exponential.v\",\n\t\t\t\t\t\"match\": \"([0-9]+(_?))+(\\\\.)([0-9]+[eE][-+]?[0-9]+)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"constant.numeric.float.v\",\n\t\t\t\t\t\"match\": \"([0-9]+(_?))+(\\\\.)([0-9]+)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"constant.numeric.binary.v\",\n\t\t\t\t\t\"match\": \"(?:0b)(?:(?:[0-1]+)(?:_?))+\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"constant.numeric.octal.v\",\n\t\t\t\t\t\"match\": \"(?:0o)(?:(?:[0-7]+)(?:_?))+\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"constant.numeric.hex.v\",\n\t\t\t\t\t\"match\": \"(?:0x)(?:(?:[0-9a-fA-F]+)(?:_?))+\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"constant.numeric.integer.v\",\n\t\t\t\t\t\"match\": \"(?:(?:[0-9]+)(?:[_]?))+\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"punctuations\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.accessor.v\",\n\t\t\t\t\t\"match\": \"(?:\\\\.)\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"punctuation.separator.comma.v\",\n\t\t\t\t\t\"match\": \"(?:,)\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"strings\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"`\",\n\t\t\t\t\t\"end\": \"`\",\n\t\t\t\t\t\"name\": \"string.quoted.rune.v\",\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-escaped-char\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-interpolation\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-placeholder\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"(r)'\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"storage.type.string.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"'\",\n\t\t\t\t\t\"name\": \"string.quoted.raw.v\",\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-placeholder\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"(r)\\\"\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"storage.type.string.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"\\\"\",\n\t\t\t\t\t\"name\": \"string.quoted.raw.v\",\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-placeholder\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"(c?)'\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"storage.type.string.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"'\",\n\t\t\t\t\t\"name\": \"string.quoted.v\",\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-escaped-char\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-interpolation\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-placeholder\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"begin\": \"(c?)\\\"\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"storage.type.string.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"\\\"\",\n\t\t\t\t\t\"name\": \"string.quoted.v\",\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-escaped-char\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-interpolation\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#string-placeholder\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"string-escaped-char\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"constant.character.escape.v\",\n\t\t\t\t\t\"match\": \"\\\\\\\\([0-7]{3}|[\\\\$abfnrtv\\\\\\\\'\\\"]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"invalid.illegal.unknown-escape.v\",\n\t\t\t\t\t\"match\": \"\\\\\\\\[^0-7\\\\$xuUabfnrtv\\\\'\\\"]\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"string-interpolation\": {\n\t\t\t\"patterns\": [\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"meta.string.interpolation.v\",\n\t\t\t\t\t\"begin\": \"(\\\\$\\\\{)\",\n\t\t\t\t\t\"beginCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.template-expression.begin.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"end\": \"(\\\\})\",\n\t\t\t\t\t\"endCaptures\": {\n\t\t\t\t\t\t\"1\": {\n\t\t\t\t\t\t\t\"name\": \"punctuation.definition.template-expression.end.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"patterns\": [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#operators\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#numbers\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#function-exist\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#types\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"include\": \"#constants\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"match\": \"\\\\w+\",\n\t\t\t\t\t\t\t\"name\": \"variable.other.v\"\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"string-placeholder\": {\n\t\t\t\"match\": \"%(\\\\[\\\\d+\\\\])?([\\\\+#\\\\-0\\\\x20]{,2}((\\\\d+|\\\\*)?(\\\\.?(\\\\d+|\\\\*|(\\\\[\\\\d+\\\\])\\\\*?)?(\\\\[\\\\d+\\\\])?)?))?[vT%tbcdoqxXUbeEfFgGsp]\",\n\t\t\t\"name\": \"constant.other.placeholder.v\"\n\t\t},\n\t\t\"illegal-name\": {\n\t\t\t\"match\": \"\\\\d\\\\w+\",\n\t\t\t\"name\": \"invalid.illegal.v\"\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"module\": \"ESNext\",\n\t\t\"moduleResolution\": \"bundler\",\n\t\t\"target\": \"ES6\",\n\t\t\"lib\": [\"ES2022\", \"DOM\"],\n\t\t\"baseUrl\": \"src\",\n\t\t\"outDir\": \"out\",\n\t\t\"rootDir\": \"src\",\n\t\t\"allowJs\": true,\n\t\t\"diagnostics\": false,\n\t\t\"esModuleInterop\": true,\n\t\t\"incremental\": true,\n\t\t\"noFallthroughCasesInSwitch\": true,\n\t\t\"noImplicitAny\": true,\n\t\t\"noImplicitOverride\": true,\n\t\t\"noImplicitReturns\": true,\n\t\t\"noImplicitThis\": true,\n\t\t\"noUncheckedIndexedAccess\": true,\n\t\t\"noUnusedLocals\": false,\n\t\t\"noUnusedParameters\": false,\n\t\t\"sourceMap\": false,\n\t\t\"stripInternal\": true\n\t},\n\t\"include\": [\"src/**/*.ts\"],\n\t\"exclude\": [\"node_modules\"]\n}\n"
  }
]