Emacs personal configuration
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

47 líneas
1.5KB

  1. ;(use-package flycheck
  2. ; :ensure t
  3. ; :init (global-flycheck-mode))
  4. (require-package 'flycheck)
  5. (add-hook 'after-init-hook #'global-flycheck-mode)
  6. (add-hook 'c++-mode-hook (lambda () (setq flycheck-gcc-language-standard "c++11")))
  7. ;; https://github.com/flycheck/flycheck/issues/567#issuecomment-69951909
  8. (require 'flycheck)
  9. ;; textlint
  10. ;; https://www.macs.hw.ac.uk/~rs46/posts/2018-12-29-textlint-flycheck.html
  11. (flycheck-define-checker textlint
  12. "A linter for textlint."
  13. :command ("npx" "textlint"
  14. "--config" "~/.emacs.d/.textlintrc"
  15. "--format" "unix"
  16. "--rule" "write-good"
  17. "--rule" "no-start-duplicated-conjunction"
  18. "--rule" "max-comma"
  19. "--rule" "terminology"
  20. "--rule" "period-in-list-item"
  21. "--rule" "abbr-within-parentheses"
  22. "--rule" "alex"
  23. "--rule" "common-misspellings"
  24. "--rule" "en-max-word-count"
  25. "--rule" "diacritics"
  26. "--rule" "stop-words"
  27. "--plugin"
  28. (eval
  29. (if (derived-mode-p 'tex-mode)
  30. "latex"
  31. "@textlint/text"))
  32. source-inplace)
  33. :error-patterns
  34. ((warning line-start (file-name) ":" line ":" column ": "
  35. (message (one-or-more not-newline)
  36. (zero-or-more "\n" (any " ") (one-or-more not-newline)))
  37. line-end))
  38. :modes (text-mode latex-mode org-mode markdown-mode)
  39. )
  40. (add-to-list 'flycheck-checkers 'textlint)
  41. (provide 'init-flycheck)