authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-04-04 15:37:42-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-04-04 15:37:42-04:00
logd97285eb65d56b9e3a1208c4de3b991e93057495
tree8acda2580bb179d69f2ff2c2903c5c271057c6b9
parent9c803af044a2d7fb5f83e35ea64dcd045f891d48

doc: link to Andrea's emacs mode


2 files changed, 1 insertions(+), 25 deletions(-)

doc/emacs/README.md+1-7
......@@ -1,7 +1 @@
1To use this emacs syntax file, add this to your emacs configuration file:
2
3```emacs
4(add-to-list 'load-path "/path/to/zig/doc/emacs/")
5(autoload 'zig-mode "zig-mode" nil t)
6(add-to-list 'auto-mode-alist '("\\.zig\\'" . zig-mode))
7```
1https://github.com/AndreaOrru/zig-mode
doc/emacs/zig-mode.el deleted-18
......@@ -1,18 +0,0 @@
1(setq zig
2 '(("\\b\\(@sizeOf\\|@alignOf\\|@maxValue\\|@minValue\\|@memberCount\\|@typeOf\\|@addWithOverflow\\|@subWithOverflow\\|@mulWithOverflow\\|@shlWithOverflow\\|@cInclude\\|@cDefine\\|@cUndef\\|@compileVar\\|@generatedCode\\|@ctz\\|@clz\\|@import\\|@cImport\\|@errorName\\|@typeName\\|@isInteger\\|@isFloat\\|@canImplicitCast\\|@embedFile\\|@cmpxchg\\|@fence\\|@divExact\\|@truncate\\|@compileError\\|@compileLog\\|@intType\\|@unreachable\\|@setDebugSafety\\|@alloca\\|@setGlobalAlign\\|@setGlobalLinkage\\|@setGlobalSection\\)" . font-lock-builtin-face)
3
4("\\b\\(fn\\|use\\|while\\|for\\|break\\|continue\\|goto\\|if\\|else\\|switch\\|try\\|return\\|defer\\|asm\\|unreachable\\|const\\|var\\|extern\\|packed\\|export\\|pub\\|noalias\\|inline\\|comptime\\|nakedcc\\|coldcc\\|volatile\\|struct\\|enum\\|union\\)\\b" . font-lock-keyword-face)
5
6 ("\\b\\(null\\|undefined\\|this\\)\\b" . font-lock-constant-face)
7
8("\\b\\(bool\\|f32\\|f64\\|void\\|Unreachable\\|type\\|error\\|i8\\|\\|u8\\|\\|i16\\|\\|u16\\|\\|i32\\|\\|u32\\|\\|64\\|u64\\|isize\\|usize\\|c_short\\|c_ushort\\|c_int\\|c_uint\\|c_long\\|c_ulong\\|c_longlong\\|c_ulonglong\\|c_long_double\\)\\b" . font-lock-type-face)
9
10 ))
11
12
13
14(define-derived-mode zig-mode c-mode "zig mode"
15 "Major mode for editing Zig language"
16 (setq font-lock-defaults '(zig)))
17
18(provide 'zig-mode)