# @codemirror/lang-go

> Go language support for the CodeMirror code editor

Latest version **6.0.1** (published 2024-05-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @codemirror/lang-go
pnpm add @codemirror/lang-go
yarn add @codemirror/lang-go
bun add @codemirror/lang-go
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 6.0.1 |
| Published | 2024-05-29 |
| First published | 2024-02-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 22.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Marijn Haverbeke |
| Maintainers | adrianheine, marijn |
| Keywords | editor, code |

## Links

- npm: https://www.npmjs.com/package/@codemirror/lang-go
- Repository: https://github.com/codemirror/lang-go
- Homepage: https://github.com/codemirror/lang-go#readme
- Issues: https://github.com/codemirror/lang-go/issues
- npm.io page: https://npm.io/package/@codemirror/lang-go

## Dependencies (5)

- [@lezer/go](https://npm.io/package/@lezer/go.md) ^1.0.0
- [@lezer/common](https://npm.io/package/@lezer/common.md) ^1.0.0
- [@codemirror/state](https://npm.io/package/@codemirror/state.md) ^6.0.0
- [@codemirror/language](https://npm.io/package/@codemirror/language.md) ^6.6.0
- [@codemirror/autocomplete](https://npm.io/package/@codemirror/autocomplete.md) ^6.0.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 6.0.1 (latest) — 2024-05-29
- 6.0.0 — 2024-02-16

## README

<!-- NOTE: README.md is generated from src/README.md -->

# @codemirror/lang-go [![NPM version](https://img.shields.io/npm/v/@codemirror/lang-go.svg)](https://www.npmjs.org/package/@codemirror/lang-go)

[ [**WEBSITE**](https://codemirror.net/) | [**ISSUES**](https://github.com/codemirror/dev/issues) | [**FORUM**](https://discuss.codemirror.net/c/next/) | [**CHANGELOG**](https://github.com/codemirror/lang-go/blob/main/CHANGELOG.md) ]

This package implements Go language support for the
[CodeMirror](https://codemirror.net/) code editor.

The [project page](https://codemirror.net/) has more information, a
number of [examples](https://codemirror.net/examples/) and the
[documentation](https://codemirror.net/docs/).

This code is released under an
[MIT license](https://github.com/codemirror/lang-go/tree/main/LICENSE).

We aim to be an inclusive, welcoming community. To make that explicit,
we have a [code of
conduct](http://contributor-covenant.org/version/1/1/0/) that applies
to communication around the project.

## API Reference

<dl>
<dt id="user-content-go">
  <code><strong><a href="#user-content-go">go</a></strong>() → <a href="https://codemirror.net/docs/ref#language.LanguageSupport">LanguageSupport</a></code></dt>

<dd><p>Go support. Includes <a href="#user-content-snippets">snippet</a> and local
variable completion.</p>
</dd>
<dt id="user-content-golanguage">
  <code><strong><a href="#user-content-golanguage">goLanguage</a></strong>: <a href="https://codemirror.net/docs/ref#language.LRLanguage">LRLanguage</a></code></dt>

<dd><p>A language provider based on the <a href="https://github.com/lezer-parser/go">Lezer Go
parser</a>, extended with
folding and indentation information.</p>
</dd>
<dt id="user-content-snippets">
  <code><strong><a href="#user-content-snippets">snippets</a></strong>: readonly <a href="https://codemirror.net/docs/ref#autocomplete.Completion">Completion</a>[]</code></dt>

<dd><p>A collection of Go-related <a href="https://codemirror.net/docs/ref/#autocomplete.snippet">snippets</a>.</p>
</dd>
<dt id="user-content-localcompletionsource">
  <code><strong><a href="#user-content-localcompletionsource">localCompletionSource</a></strong>: <a href="https://codemirror.net/docs/ref#autocomplete.CompletionSource">CompletionSource</a></code></dt>

<dd><p>Completion source that looks up locally defined names in Go code.</p>
</dd>
</dl>

---
_Source: https://npm.io/package/@codemirror/lang-go · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
