Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/damon-kwok/v-mode

🌻 An Emacs major mode for the V programming language.
https://github.com/damon-kwok/v-mode

emacs-mode v vlang

Last synced: about 1 month ago
JSON representation

🌻 An Emacs major mode for the V programming language.

Awesome Lists containing this project

README

        

Emacs Logo
[![GitHub license](https://img.shields.io/github/license/damon-kwok/v-mode?logo=gnu&.svg)](https://github.com/damon-kwok/v-mode/blob/master/COPYING)
[![Sponsor](https://img.shields.io/badge/Support%20Me-%F0%9F%92%97-ff69b4.svg)](https://www.patreon.com/DamonKwok)
[![MELPA](http://melpa.org/packages/v-mode-badge.svg)](http://melpa.org/#/v-mode)

# V Mode

An Emacs major mode for the [V](https://vlang.io/) programming language.

- Screenshot

![screenshot](https://github.com/damon-kwok/v-mode/blob/master/screenshot.png)

## Features

- [x] Syntax highlighting (font-lock)
- [x] Indentation
- [x] Workspace support
- [x] Auto format on save
- [x] Compilation integration
- [x] Code navigation (using `imenu`)
- [x] Go to definition (using `ctags`)
- [x] Code completion (using `company-mode`)
- [ ] REPL

## Installation

### Using MELPA
This package can be obtain from
[MELPA](http://melpa.org/#/v-mode) or
[MELPA Stable](http://stable.melpa.org/#/v-mode). The `master`
branch is continuously deployed to `MELPA`, and released versions are
deployed to `MELPA Stable`.

M-x package-install [RET] v-mode [RET]

Right now `v-mode` doesn't take a lot of configuration (i.e.
it's too simple to need any).

```elisp
(require 'v-mode)
(define-key v-mode-map (kbd "M-z") 'v-menu)
(define-key v-mode-map (kbd "") 'v-menu)
(define-key v-mode-map (kbd "C-c C-f") 'v-format-buffer)
```

### Using [use-package](https://github.com/jwiegley/use-package) and [straight.el](https://github.com/raxod502/straight.el)

```elisp
(use-package v-mode
:straight (v-mode
:type git
:host github
:repo "damon-kwok/v-mode"
:files ("tokens" "v-mode.el"))
:config
:bind-keymap
("M-z" . v-menu)
("" . v-menu)
("C-c C-f" . v-format-buffer)
:mode ("\\(\\.v?v\\|\\.vsh\\)$" . 'v-mode))
```