Emacs personal configuration
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

44 lines
1.4KB

  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. ;; textlint
  8. ;; https://www.macs.hw.ac.uk/~rs46/posts/2018-12-29-textlint-flycheck.html
  9. (flycheck-define-checker textlint
  10. "A linter for textlint."
  11. :command ("npx" "textlint"
  12. "--config" "~/.emacs.d/.textlintrc"
  13. "--format" "unix"
  14. "--rule" "write-good"
  15. "--rule" "no-start-duplicated-conjunction"
  16. "--rule" "max-comma"
  17. "--rule" "terminology"
  18. "--rule" "period-in-list-item"
  19. "--rule" "abbr-within-parentheses"
  20. "--rule" "alex"
  21. "--rule" "common-misspellings"
  22. "--rule" "en-max-word-count"
  23. "--rule" "diacritics"
  24. "--rule" "stop-words"
  25. "--plugin"
  26. (eval
  27. (if (derived-mode-p 'tex-mode)
  28. "latex"
  29. "@textlint/text"))
  30. source-inplace)
  31. :error-patterns
  32. ((warning line-start (file-name) ":" line ":" column ": "
  33. (message (one-or-more not-newline)
  34. (zero-or-more "\n" (any " ") (one-or-more not-newline)))
  35. line-end))
  36. :modes (text-mode latex-mode org-mode markdown-mode)
  37. )
  38. (add-to-list 'flycheck-checkers 'textlint)
  39. (provide 'init-flycheck)