Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rechsteiner/swift-ts-mode

Tree-sitter based major-mode for Swift in Emacs, with support for font-locking, imenu and indentation.
https://github.com/rechsteiner/swift-ts-mode

emacs swift tree-sitter

Last synced: 4 months ago
JSON representation

Tree-sitter based major-mode for Swift in Emacs, with support for font-locking, imenu and indentation.

Awesome Lists containing this project

README

        

# swift-ts-mode

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![MELPA](https://melpa.org/packages/swift-ts-mode-badge.svg)](https://melpa.org/#/swift-ts-mode)

A tree-sitter based major-mode for [Swift](https://swift.org), with support for font-locking, imenu and indentation.
Compatible with the following [tree-sitter-swift](https://github.com/alex-pinkus/tree-sitter-swift) grammar.

![Screenshot of swift-ts-mode in Emacs](https://github.com/rechsteiner/swift-ts-mode/assets/1238984/9cadacb8-3708-4d69-9035-5ae967689219)

## Installing

This package is available on [Melpa](https://melpa.org/#/swift-ts-mode):

```
(use-package swift-ts-mode
:ensure t)
```

For manual installation:

```
(load "path/to/swift-ts-mode.el")
```

## Requirements

- Emacs 29.1 or above with tree-sitter support (see [tree-sitter starter guide](https://git.savannah.gnu.org/cgit/emacs.git/tree/admin/notes/tree-sitter/starter-guide?h=emacs-29))
- Tree-sitter grammar: [github.com/alex-pinkus/tree-sitter-swift](https://github.com/alex-pinkus/tree-sitter-swift)