Browse Source

WIP implement editorconfig-conf-mode

pull/15/head
10sr 8 years ago
parent
commit
f84d2d765f
2 changed files with 22 additions and 2 deletions
  1. +2
    -2
      .editorconfig
  2. +20
    -0
      emacs.el

+ 2
- 2
.editorconfig View File

@@ -9,9 +9,9 @@ end_of_line = lf
#charset = utf-8

trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true#3ab
max_line_length = 80
;abc
[*.c]
indent_size = 4



+ 20
- 0
emacs.el View File

@@ -1895,4 +1895,24 @@ This mode is a simplified version of `adoc-mode'."
:global nil
:lighter "ATranslate"))

(define-derived-mode editorconfig-conf-mode conf-unix-mode "EditorConfig"
"Major mode for editing .editorconfig files."
(conf-mode-initialize ;;"^#\\|^;\\| #\\| ;"
""
`("indent_size"
"charset"
"indent_style"
"tab_width"
"trim_trailing_whitespace"
"insert_final_newline"
"max_line_length"
"end_of_line"
"root"
,@conf-font-lock-keywords))
(set (make-local-variable 'comment-start-skip)
"^#.*\\|^;.*\\| #.*\\| ;.*"))

'(add-to-list 'auto-mode-alist
'("/\\.editorconfig\\'" . editorconfig-conf-mode))

;;; emacs.el ends here

Loading…
Cancel
Save