Use ‘display-fill-column-indicator-mode’ if possible
Fall back to ‘fci-mode’ if the function ‘display-fill-column-indicator-mode’ doesn’t exist.
This commit is contained in:
parent
85636d669c
commit
4d0a1c884d
15 changed files with 92 additions and 31 deletions
8
oni-c.el
8
oni-c.el
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2019.1210.230144
|
||||
;; Version: 2020.0907.143822
|
||||
;; Package-Requires: (oni-flycheck oni-fci)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -34,9 +34,13 @@
|
|||
(add-hook 'c-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'c-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'c-mode-hook 'flycheck-mode)
|
||||
(add-hook 'c-mode-hook 'fci-mode)
|
||||
(add-hook 'c-mode-hook 'oni-c--auto-fill-mode)
|
||||
|
||||
(add-hook 'c-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
;;;###autoload(with-eval-after-load 'cc-mode (require 'oni-c))
|
||||
|
||||
(provide 'oni-c)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0229.130404
|
||||
;; Version: 2020.0907.143950
|
||||
;; Package-Requires: (cmake-mode oni-company oni-fci oni-flycheck cmake-font-lock eldoc-cmake)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -38,9 +38,13 @@
|
|||
(add-hook 'cmake-mode-hook 'company-mode)
|
||||
(add-hook 'cmake-mode-hook 'eldoc-cmake-enable)
|
||||
(add-hook 'cmake-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'cmake-mode-hook 'fci-mode)
|
||||
(add-hook 'cmake-mode-hook 'oni-cmake--auto-fill-mode)
|
||||
|
||||
(add-hook 'cmake-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(add-to-list 'compilation-error-regexp-alist
|
||||
`(,(rx bol
|
||||
"CMake Warning (dev) at "
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0113.213122
|
||||
;; Version: 2020.0907.144055
|
||||
;; Package-Requires: (oni-company oni-flycheck oni-fci)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -34,10 +34,14 @@
|
|||
(add-hook 'c++-mode-hook 'company-mode)
|
||||
(add-hook 'c++-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'c++-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'c++-mode-hook 'fci-mode)
|
||||
(add-hook 'c++-mode-hook 'flycheck-mode)
|
||||
(add-hook 'c++-mode-hook 'oni-cpp--auto-fill-mode)
|
||||
|
||||
(add-hook 'c++-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
;;;###autoload(with-eval-after-load 'cc-mode (require 'oni-cpp))
|
||||
|
||||
(provide 'oni-cpp)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0825.163721
|
||||
;; Version: 2020.0907.144202
|
||||
;; Package-Requires: (csharp-mode oni-company oni-flycheck oni-yasnippet oni-hydra oni-fci oni-lsp smartparens)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -144,7 +144,6 @@ _cs_: Solution
|
|||
|
||||
(add-hook 'csharp-mode-hook 'company-mode)
|
||||
(add-hook 'csharp-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'csharp-mode-hook 'fci-mode)
|
||||
(add-hook 'csharp-mode-hook 'flycheck-mode)
|
||||
(add-hook 'csharp-mode-hook 'lsp)
|
||||
(add-hook 'csharp-mode-hook 'oni-csharp--auto-fill-mode)
|
||||
|
@ -152,6 +151,11 @@ _cs_: Solution
|
|||
(add-hook 'csharp-mode-hook 'rainbow-delimiters-mode)
|
||||
(add-hook 'csharp-mode-hook 'smartparens-mode)
|
||||
|
||||
(add-hook 'csharp-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(define-key csharp-mode-map (kbd "C-c SPC") 'oni-csharp-hydra/body)
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0305.222317
|
||||
;; Version: 2020.0907.143210
|
||||
;; Package-Requires: (oni-company oni-fci oni-hydra rainbow-mode yasnippet)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -96,10 +96,14 @@
|
|||
(add-hook 'css-mode-hook 'company-mode)
|
||||
(add-hook 'css-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'css-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'css-mode-hook 'fci-mode)
|
||||
(add-hook 'css-mode-hook 'rainbow-mode)
|
||||
(add-hook 'css-mode-hook 'oni-css--auto-fill-mode)
|
||||
|
||||
(add-hook 'css-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(with-eval-after-load 'compile
|
||||
(let ((scss-error-regexp
|
||||
(rx (and bol
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0616.221949
|
||||
;; Version: 2020.0907.143103
|
||||
;; Package-Requires: (oni-company oni-flycheck oni-paredit oni-fci oni-yasnippet oni-hydra rainbow-delimiters nameless erefactor flycheck-relint handle elisp-format)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -80,12 +80,16 @@ _eb_: Buffer
|
|||
(add-hook 'emacs-lisp-mode-hook 'company-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'electric-quote-local-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'erefactor-lazy-highlight-turn-on)
|
||||
(add-hook 'emacs-lisp-mode-hook 'fci-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'nameless-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'paredit-mode)
|
||||
(add-hook 'emacs-lisp-mode-hook 'rainbow-delimiters-mode)
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(add-hook 'ielm-mode-hook 'company-mode)
|
||||
(add-hook 'ielm-mode-hook 'paredit-mode)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0305.222356
|
||||
;; Version: 2020.0907.143141
|
||||
;; Package-Requires: (oni-fci oni-data-dir oni-lsp oni-hydra lsp-java company-lsp)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -72,9 +72,13 @@
|
|||
(add-hook 'java-mode-hook 'auto-fill-mode)
|
||||
(add-hook 'java-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'java-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'java-mode-hook 'fci-mode)
|
||||
(add-hook 'java-mode-hook 'lsp)
|
||||
|
||||
(add-hook 'java-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(add-to-list 'company-backends 'company-lsp)
|
||||
|
||||
(define-key java-mode-map (kbd "C-c r") 'java-refactor-hydra/body)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2019.1210.230928
|
||||
;; Version: 2020.0907.143324
|
||||
;; Package-Requires: (oni-company js2-mode js2-refactor oni-fci oni-flycheck tern company-tern fic-mode rjsx-mode)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -58,7 +58,6 @@
|
|||
|
||||
(add-hook 'js2-mode-hook 'company-mode)
|
||||
(add-hook 'js2-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'js2-mode-hook 'fci-mode)
|
||||
(add-hook 'js2-mode-hook 'fic-mode)
|
||||
(add-hook 'js2-mode-hook 'flycheck-mode)
|
||||
(add-hook 'js2-mode-hook 'js2-refactor-mode)
|
||||
|
@ -67,6 +66,11 @@
|
|||
(add-hook 'js2-mode-hook 'tern-mode)
|
||||
(add-hook 'js2-mode-hook 'oni-js--auto-fill-mode)
|
||||
|
||||
(add-hook 'js2-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(js2r-add-keybindings-with-prefix "C-c r")
|
||||
|
||||
(add-to-list 'company-backends 'company-tern)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2019.1210.231019
|
||||
;; Version: 2020.0907.141543
|
||||
;; Package-Requires: (oni-fci)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -40,9 +40,13 @@
|
|||
|
||||
(add-hook 'makefile-mode-hook #'oni-makefile--whitespace-mode)
|
||||
(add-hook 'makefile-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'makefile-mode-hook 'fci-mode)
|
||||
(add-hook 'makefile-mode-hook 'oni-makefile--auto-fill-mode)
|
||||
|
||||
(add-hook 'makefile-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
;;;###autoload(with-eval-after-load 'make-mode (require 'oni-makefile))
|
||||
|
||||
(provide 'oni-makefile)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0305.222253
|
||||
;; Version: 2020.0907.142339
|
||||
;; Package-Requires: (php-mode oni-yasnippet oni-flycheck oni-company oni-fci oni-hydra ggtags fic-mode company-php phpcbf)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -74,13 +74,17 @@ nil for some reason."
|
|||
(add-hook 'php-mode-hook 'company-mode)
|
||||
(add-hook 'php-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'php-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'php-mode-hook 'fci-mode)
|
||||
(add-hook 'php-mode-hook 'fic-mode)
|
||||
(add-hook 'php-mode-hook 'flycheck-mode)
|
||||
(add-hook 'php-mode-hook 'ggtags-mode)
|
||||
(add-hook 'php-mode-hook 'phpcbf-enable-on-save)
|
||||
(add-hook 'php-mode-hook 'oni-php--auto-fill-mode)
|
||||
|
||||
(add-hook 'php-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(with-eval-after-load 'company
|
||||
(add-to-list 'company-backends 'company-ac-php-backend))
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0706.231614
|
||||
;; Version: 2020.0907.143301
|
||||
;; Package-Requires: (oni-yasnippet oni-company oni-fci oni-flycheck oni-hydra oni-lsp rainbow-delimiters reformatter traad)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -90,7 +90,6 @@ for indentation."
|
|||
(add-hook 'python-mode-hook 'company-mode)
|
||||
(add-hook 'python-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'python-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'python-mode-hook 'fci-mode)
|
||||
(add-hook 'python-mode-hook 'flycheck-mode)
|
||||
(add-hook 'python-mode-hook 'lsp)
|
||||
(add-hook 'python-mode-hook 'oni-python-set-fill-column)
|
||||
|
@ -98,6 +97,11 @@ for indentation."
|
|||
(add-hook 'python-mode-hook 'python-black-on-save-mode)
|
||||
(add-hook 'python-mode-hook 'rainbow-delimiters-mode)
|
||||
|
||||
(add-hook 'python-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
;;;###autoload
|
||||
(with-eval-after-load 'python
|
||||
(with-eval-after-load 'yasnippet
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2019.1210.225801
|
||||
;; Version: 2020.0907.142903
|
||||
;; Package-Requires: (ruby-mode oni-fci oni-yasnippet)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -52,9 +52,13 @@
|
|||
|
||||
(add-hook 'ruby-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'ruby-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'ruby-mode-hook 'fci-mode)
|
||||
(add-hook 'ruby-mode-hook 'oni-ruby--auto-fill-mode)
|
||||
|
||||
(add-hook 'ruby-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
;;;###autoload
|
||||
(with-eval-after-load 'ruby-mode
|
||||
(with-eval-after-load 'yasnippet
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0719.203126
|
||||
;; Version: 2020.0907.143238
|
||||
;; Package-Requires: (oni-company oni-paredit oni-fci rainbow-delimiters geiser)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -34,11 +34,15 @@
|
|||
(auto-fill-mode))
|
||||
|
||||
(add-hook 'scheme-mode-hook 'company-mode)
|
||||
(add-hook 'scheme-mode-hook 'fci-mode)
|
||||
(add-hook 'scheme-mode-hook 'paredit-mode)
|
||||
(add-hook 'scheme-mode-hook 'rainbow-delimiters-mode)
|
||||
(add-hook 'scheme-mode-hook 'oni-scheme--auto-fill-mode)
|
||||
|
||||
(add-hook 'scheme-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(add-hook 'geiser-repl-mode-hook 'paredit-mode)
|
||||
|
||||
(setq geiser-default-implementation 'guile)
|
||||
|
|
11
oni-sh.el
11
oni-sh.el
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0427.091422
|
||||
;; Version: 2020.0907.143035
|
||||
;; Package-Requires: (reformatter oni-flycheck oni-fci oni-smartparens)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -27,7 +27,8 @@
|
|||
;; This sets the following minor modes for ‘sh-mode’:
|
||||
;; - ‘electric-indent-local-mode’
|
||||
;; - ‘electric-pair-local-mode’
|
||||
;; - ‘fci-mode’
|
||||
;; - ‘display-fill-column-indicator-mode’ (falls back to ‘fci-mode’ if this mode
|
||||
;; doesn’t exist.
|
||||
;; - ‘flycheck-mode’
|
||||
|
||||
;; It also defines a formatter using ‘reformatter’ which runs the shfmt utility.
|
||||
|
@ -44,11 +45,15 @@
|
|||
:group 'shfmt)
|
||||
|
||||
(add-hook 'sh-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'sh-mode-hook 'fci-mode)
|
||||
(add-hook 'sh-mode-hook 'flycheck-mode)
|
||||
(add-hook 'sh-mode-hook 'shfmt-on-save-mode)
|
||||
(add-hook 'sh-mode-hook 'smartparens-mode)
|
||||
|
||||
(add-hook 'sh-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("PKGBUILD\\'" . sh-mode))
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||
;; Keywords: local
|
||||
;; Version: 2020.0719.212242
|
||||
;; Version: 2020.0907.144306
|
||||
;; Package-Requires: (yaml-mode oni-flycheck oni-fci oni-highlight-indent-guides flycheck-yamllint indent-tools yaml-imenu)
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
|
@ -39,11 +39,15 @@
|
|||
|
||||
(add-hook 'yaml-mode-hook 'electric-indent-local-mode)
|
||||
(add-hook 'yaml-mode-hook 'electric-pair-local-mode)
|
||||
(add-hook 'yaml-mode-hook 'fci-mode)
|
||||
(add-hook 'yaml-mode-hook 'highlight-indent-guides-mode)
|
||||
(add-hook 'yaml-mode-hook 'oni-yaml--auto-fill-mode)
|
||||
(add-hook 'yaml-mode-hook 'yaml-imenu-enable)
|
||||
|
||||
(add-hook 'yaml-mode-hook
|
||||
(if (fboundp 'display-fill-column-indicator-mode)
|
||||
'display-fill-column-indicator-mode
|
||||
'fci-mode))
|
||||
|
||||
(flycheck-yamllint-setup)
|
||||
|
||||
;;;###autoload(with-eval-after-load 'yaml-mode (require 'oni-yaml))
|
||||
|
|
Loading…
Reference in a new issue