Home

Awesome

vscode-kanata

GitHub Repo stars Visual Studio Marketplace Installs GitHub Workflow Status (with event)

<!-- ![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/rszyma/vscode-kanata/publish.yml?label=nightly%20kanata%20version%20bump) --> <!-- [![Visual Studio Marketplace Version (including pre-releases)](https://img.shields.io/visual-studio-marketplace/v/rszyma.vscode-kanata)](https://marketplace.visualstudio.com/items?itemName=rszyma.vscode-kanata) -->

A VS Code extension that adds language support for kanata configuration files.

Available at

This extension aims to stay up-to-date with latest kanata git. Whenever something changes in parser folder in kanata repository, at the end of the day, Github Actions will automatically build a new version of this extension with updated parser.

Features

Kanata config files are detected by .kbd file extension.

Syntax highlighting

keywords, action identifiers, alias handles etc.

<p><img src="assets/syntax-highlighting-showcase.png"/></p>

Checking for config errors

Config will be parsed and validated, when saving document.

<p><img src="assets/config-parsing-showcase.gif"/></p>

Support for including other files

If you use include configuration items in your kanata config, make sure to adjust the following settings:

Important: Absolute paths in include blocks that point outside the opened workspace aren't supported.

Also, if you work with multiple main files, and find yourself switching mainConfigFile often, there's a handy command palette entry:

Formatter: auto-apply spacial layout of defsrc to all deflayers

This is enabled by default, because I've seen a lot of kanata configs, and it seems like majority of users prefer to align their deflayers according to spacial layout of defsrc. If you have "Auto format on save enabled" and don't want this feature, you can disable it in settings (search for "kanata.format").

Goto definition

Implemented for aliases, variables, layers, virtualkeys, templates and includes. Supported in both single-mode and workspace (includes-enabled) mode.

<!-- todo: gif here -->

Contributing

If you have an idea what could be improved, feel free to open an issue or a PR.

Bug reports

If you encounter a bug, please report it here: https://github.com/rszyma/vscode-kanata/issues

Building

See this document for build instructions.

Release notes

See the change log.

Credits