[syntax-checking] Revise layer
Change variable declarations to standard config variables. Change default size to relative values to be less independent on specific screen sizes. Improve general documentation of config choices.
This commit is contained in:
parent
46d15dc367
commit
02c667e8d8
|
@ -23,37 +23,43 @@
|
|||
|
||||
;; Variables
|
||||
|
||||
(defvar syntax-checking-enable-tooltips t
|
||||
"If non nil some feedback are displayed in tooltips.")
|
||||
(spacemacs|defc syntax-checking-enable-tooltips t
|
||||
"If non nil some feedback are displayed in tooltips."
|
||||
'(boolean))
|
||||
|
||||
(defvar syntax-checking-auto-hide-tooltips nil
|
||||
"If non-nil and positive number, auto hide tooltips after number of seconds.")
|
||||
(spacemacs|defc syntax-checking-auto-hide-tooltips nil
|
||||
"If non-nil and positive number, auto hide tooltips after number of seconds."
|
||||
'(natnum))
|
||||
|
||||
(defvar syntax-checking-enable-by-default t
|
||||
"Enable syntax-checking by default.")
|
||||
(spacemacs|defc syntax-checking-enable-by-default t
|
||||
"Enable syntax-checking by default."
|
||||
'(boolean))
|
||||
|
||||
(defvar syntax-checking-use-original-bitmaps nil
|
||||
"If non-nil, use the original bitmaps from flycheck.")
|
||||
(spacemacs|defc syntax-checking-use-original-bitmaps nil
|
||||
"If non-nil, use the original bitmaps from flycheck."
|
||||
'(boolean))
|
||||
|
||||
(defvar syntax-checking-use-standard-error-navigation nil
|
||||
"If non-nil hook into emacs standard error navigation.")
|
||||
(spacemacs|defc syntax-checking-use-standard-error-navigation nil
|
||||
"If non-nil hook into emacs standard error navigation."
|
||||
'(boolean))
|
||||
|
||||
(defvar syntax-checking-window-position 'bottom
|
||||
"Popup window position. Default: 'bottom.")
|
||||
(spacemacs|defc syntax-checking-window-position 'bottom
|
||||
"Popup window position."
|
||||
'(choice (const bottom) (const left) (const right) (const top)))
|
||||
|
||||
(defvar syntax-checking-window-width 80
|
||||
"Popup window width in characters.")
|
||||
(spacemacs|defc syntax-checking-window-width 0.3
|
||||
"Popup window width in characters (int) or as percentage (float)."
|
||||
'(number))
|
||||
|
||||
(defvar syntax-checking-window-height 25
|
||||
"Popup window height in characters.")
|
||||
(spacemacs|defc syntax-checking-window-height 0.3
|
||||
"Popup window height in characters (int) or as percentage (float)."
|
||||
'(number))
|
||||
|
||||
|
||||
;; internals
|
||||
|
||||
;; for syntax checking window position
|
||||
|
||||
(defvar syntax-checking-buffer-config
|
||||
`("^\\*Flycheck.+\\*$"
|
||||
(defvar syntax-checking--buffer-config
|
||||
"Internal syntax checking window position config."
|
||||
`('^\\*Flycheck.+\\*$'
|
||||
:regexp t
|
||||
:dedicated t
|
||||
:position ,syntax-checking-window-position
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
(setq syntax-checking-packages
|
||||
'(
|
||||
flycheck
|
||||
flycheck-pos-tip
|
||||
popwin
|
||||
))
|
||||
(defconst syntax-checking-packages
|
||||
'(
|
||||
flycheck
|
||||
flycheck-pos-tip
|
||||
popwin))
|
||||
|
||||
|
||||
(defun syntax-checking/init-flycheck ()
|
||||
(use-package flycheck
|
||||
|
@ -120,5 +120,5 @@
|
|||
(defun syntax-checking/pre-init-popwin ()
|
||||
(spacemacs|use-package-add-hook popwin
|
||||
:post-config
|
||||
(push syntax-checking-buffer-config
|
||||
(push syntax-checking--buffer-config
|
||||
popwin:special-display-config)))
|
||||
|
|
Loading…
Reference in New Issue