protobuf: minor refactoring and add logo
This commit is contained in:
parent
a52b68f125
commit
f89dce787a
|
@ -1,21 +1,20 @@
|
|||
#+TITLE: Protocol Buffers layer
|
||||
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../../../css/readtheorg.css" />
|
||||
|
||||
* Table of Contents :TOC_4_org:noexport:
|
||||
- [[Description][Description]]
|
||||
- [[Features][Features]]
|
||||
- [[Install][Install]]
|
||||
[[file:img/protobuf.png]]
|
||||
|
||||
* Table of Contents :TOC_4_gh:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#features][Features]]
|
||||
- [[#install][Install]]
|
||||
|
||||
* Description
|
||||
Highlighting and syntax checking for [[https://developers.google.com/protocol-buffers/][Protocol Buffer]] files.
|
||||
|
||||
Uses Google's [[https://github.com/google/protobuf/blob/master/editors/protobuf-mode.el][protobuf-mode]] with [[https://github.com/edvorg/flycheck-protobuf][flycheck-protobuf]].
|
||||
|
||||
* Features
|
||||
+ Syntax Highlighting
|
||||
+ Syntax checking using Flycheck (=protoc= compiler must be available)
|
||||
+ Correct Indentation and commenting
|
||||
+ Quickly browse file contents using =M-x helm-imenu= and =M-x imenu=.
|
||||
- Syntax highlighting
|
||||
- Syntax checking using Flycheck (=protoc= compiler must be available)
|
||||
- Correct indentation and commenting
|
||||
- Quickly browse file contents using imenu (default key binding ~SPC j i~).
|
||||
|
||||
* Install
|
||||
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
;;; funcs.el --- Protobuf Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Amol Mandhane <https://github.com/amol-mandhane>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defun spacemacs//setup-protobuf-imenu ()
|
||||
"Setup imenu regex for protocol buffers."
|
||||
(setq
|
||||
imenu-generic-expression
|
||||
'((nil "^[[:space:]]*\\(message\\|service\\|enum\\)[[:space:]]+\\([[:alnum:]]+\\)" 2))))
|
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
|
@ -9,7 +9,7 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq protobuf-packages
|
||||
(defconst protobuf-packages
|
||||
'(
|
||||
flycheck
|
||||
protobuf-mode
|
||||
|
@ -17,12 +17,7 @@
|
|||
|
||||
(defun protobuf/init-protobuf-mode ()
|
||||
(use-package protobuf-mode
|
||||
:init (progn
|
||||
(defun spacemacs//setup-protobuf-imenu ()
|
||||
"Setup imenu regex for protocol buffers."
|
||||
(setq imenu-generic-expression '((nil "^[[:space:]]*\\(message\\|service\\|enum\\)[[:space:]]+\\([[:alnum:]]+\\)"
|
||||
2))))
|
||||
(add-hook 'protobuf-mode-hook 'spacemacs//setup-protobuf-imenu))))
|
||||
:init (add-hook 'protobuf-mode-hook 'spacemacs//setup-protobuf-imenu)))
|
||||
|
||||
(defun protobuf/post-init-flycheck ()
|
||||
(spacemacs/add-flycheck-hook 'protobuf-mode))
|
||||
|
|
Loading…
Reference in New Issue