Files
Basalt2/docs/.vitepress/dist/assets/guides_annotations.md.B9rGAklD.js
2025-09-16 17:41:40 +02:00

2 lines
3.1 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as t,a,b as n,ag as i}from"./chunks/framework.BcrMLAmg.js";const c=JSON.parse('{"title":"Lua Annotations Guide","description":"","frontmatter":{},"headers":[],"relativePath":"guides/annotations.md","filePath":"guides/annotations.md","lastUpdated":1739870373000}'),o={name:"guides/annotations.md"};function l(r,e,s,d,u,p){return n(),a("div",null,e[0]||(e[0]=[i('<h1 id="lua-annotations-guide" tabindex="-1">Lua Annotations Guide <a class="header-anchor" href="#lua-annotations-guide" aria-label="Permalink to &quot;Lua Annotations Guide&quot;"></a></h1><p>Writing Lua code for CC: Tweaked and Basalt becomes much more enjoyable with proper type annotations. They provide code completion, type checking, and inline documentation.</p><h2 id="setting-up-annotations" tabindex="-1">Setting Up Annotations <a class="header-anchor" href="#setting-up-annotations" aria-label="Permalink to &quot;Setting Up Annotations&quot;"></a></h2><h3 id="cc-tweaked-annotations" tabindex="-1">CC: Tweaked Annotations <a class="header-anchor" href="#cc-tweaked-annotations" aria-label="Permalink to &quot;CC: Tweaked Annotations&quot;"></a></h3><p>Download the official CC: Tweaked type definitions from: <a href="https://github.com/nvim-computercraft/lua-ls-cc-tweaked" target="_blank" rel="noreferrer">CC: Tweaked Annotations</a></p><p>The GitHub page includes a detailed installation guide that will help you set up everything correctly.</p><h3 id="basalt-annotations" tabindex="-1">Basalt Annotations <a class="header-anchor" href="#basalt-annotations" aria-label="Permalink to &quot;Basalt Annotations&quot;"></a></h3><p>The Basalt Dev version includes built-in type definitions that provide:</p><ul><li>Complete type information for all Basalt elements</li><li>Method parameter hints</li><li>Return type information</li><li>Event type definitions</li></ul><p>To get started, simply download the Dev version of Basalt.</p><h2 id="ide-configuration" tabindex="-1">IDE Configuration <a class="header-anchor" href="#ide-configuration" aria-label="Permalink to &quot;IDE Configuration&quot;"></a></h2><h3 id="required-extensions" tabindex="-1">Required Extensions <a class="header-anchor" href="#required-extensions" aria-label="Permalink to &quot;Required Extensions&quot;"></a></h3><p>For the best development experience, you&#39;ll need:</p><ol><li>A Lua Language Server</li><li>An IDE with Lua support</li></ol><p>For Visual Studio Code users:</p><ul><li>Install <a href="https://marketplace.visualstudio.com/items?itemName=sumneko.lua" target="_blank" rel="noreferrer">Summeko Lua</a></li><li>The extension provides full language server capabilities</li></ul><h2 id="benefits" tabindex="-1">Benefits <a class="header-anchor" href="#benefits" aria-label="Permalink to &quot;Benefits&quot;"></a></h2><p>With properly configured annotations, you get:</p><ul><li>✓ Intelligent code completion</li><li>✓ Real-time type checking</li><li>✓ Documentation on hover</li><li>✓ Method signature help</li><li>✓ Better error detection</li></ul>',19)]))}const m=t(o,[["render",l]]);export{c as __pageData,m as default};