Skip to content

ZachMassia/PlatformIO-Mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlatformIO Mode

MELPA MELPA Stable

platformio-mode is an Emacs minor mode which allows quick building and uploading of PlatformIO projects with a few short key sequences.

Code completion can be provided by installing any package compatible with .ccls files, such as ccls. To keep the index up to date, run platformio-init-update-workspace (C-c i i) after installing any libraries.

Dependencies

Currently the only dependency is Projectile to facilitate running commands in the project root.

Keymap

The default keymap prefix is C-c i.

The following keybindings are currently available.

Function Keymap
Build C-c i b
Upload C-c i u
Upload using Programmer C-c i p
Upload SPIFFS C-c i s
Monitor device C-c i m
Clean C-c i c
Update C-c i d
Update Workspace C-c i i
Boards List C-c i l

Installation

The recommended way to install PlatformIO-Mode is using MELPA.

Configuration

Here is a sample config using PlatformIO-Mode in conjunction with ccls.

(require 'platformio-mode)

;; Enable ccls for all c++ files, and platformio-mode only
;; when needed (platformio.ini present in project root).
(add-hook 'c++-mode-hook (lambda ()
                           (lsp-deferred)
                           (platformio-conditionally-enable)))