fix(emacs/lean-company): override company--window-width
Override 'company--window-width' to be 0.95 * window-body-width. This partially solves the problem of issue #137.
This commit is contained in:
parent
bd17d07ebc
commit
0476591992
1 changed files with 6 additions and 0 deletions
|
@ -35,6 +35,7 @@ triggers a completion immediately."
|
|||
(let ((line-number (line-number-at-pos)))
|
||||
(lean-server-send-cmd-sync (lean-cmd-findp line-number prefix)
|
||||
(lambda (candidates)
|
||||
(lean-server-debug "executing continuation for FINDP")
|
||||
(-map 'company-lean--make-candidate candidates)))))
|
||||
|
||||
(defun company-lean--location (arg)
|
||||
|
@ -72,4 +73,9 @@ triggers a completion immediately."
|
|||
(location (company-lean--location arg))
|
||||
(sorted t)))
|
||||
|
||||
(defadvice company--window-width
|
||||
(after lean-company--window-width activate)
|
||||
(when (eq major-mode 'lean-mode)
|
||||
(setq ad-return-value (truncate (* 0.95 (window-body-width))))))
|
||||
|
||||
(provide 'lean-company)
|
||||
|
|
Loading…
Reference in a new issue