Commit Graph

160 Commits

Author SHA1 Message Date
Yuan Fu
b5aa481432
Add support for company-box
* eldoc-box.el (eldoc-box--at-point-x-by-company): Change if to a cond
and add a branch for company-box.
2023-08-02 17:51:41 -07:00
Yuan Fu
f6ae0e7a7b
Add eldoc-box-at-point-position-function
* eldoc-box.el (eldoc-box-at-point-position-function): New variable.
(eldoc-box-help-at-point)
(eldoc-box-hover-at-point-mode): Replace hard-code with
eldoc-box-at-point-position-function.
2023-07-28 22:40:50 -07:00
Yuan Fu
2070e2fc16
Respect inherited face attribute (issue#77)
* eldoc-box.el (eldoc-box--get-frame): Respect inherited attribute.
2023-07-28 22:32:33 -07:00
dalu
049eacfd98
Rework eldoc-box--window-side
* eldoc-box.el:
(eldoc-box--window-side): Use distance to judge whether the active
window is the left window.
(eldoc-box--inhibit-childframe-for): Whitespace change.
2023-06-10 00:00:35 -07:00
Jeffrey Phillips
e58ecc4699
Improve eldoc-box--window-side
* eldoc-box.el (eldoc-box--window-side): Now it consistently returns
'left' even if the left side is split vertically.
2023-05-26 14:00:01 -07:00
Yuan Fu
ee7c978887
Preserve the old value of eldoc-display-functions (issue#74)
* eldoc-box.el (eldoc-box--old-eldoc-functions): New variable.
(eldoc-box--enable): Save the old value.
(eldoc-box--disable): Check the old value.
(eldoc-box--help-at-point-last-point): Docstring change.
(eldoc-box--help-at-point-cleanup): Don't kill the local value of
eldoc-display-functions. This line is likely a remnant of the old
eglot help-at-point command and should've been removed.
2023-05-17 14:21:48 -07:00
Yuan Fu
24c216ea3a
; * eldoc-box.el: Bump version. 2023-05-01 23:00:26 -07:00
Yuan Fu
d0dd4e9d40
Obsolete eldoc-box-eglot-help-at-point
* eldoc-box.el (eldoc-box-eglot-help-at-point): Replace body with a
single call to eldoc-box-help-at-point.
2023-04-27 11:54:44 -07:00
Yuan Fu
939724afef
Fix tab-bar "integration"
* eldoc-box.el (tab-bar): tab-bar-mode should be tab-bar instead.
(tab-line): Add the same workaround for tab-line-mode.
2023-04-27 01:04:13 -07:00
Yuan Fu
4066df5a29
Workaround childframe sizing issue (issue#68)
* eldoc-box.el (eldoc-box--update-childframe-geometry): Set frame size
to something very small before calculating the text size.
2023-04-27 00:58:17 -07:00
Yuan Fu
90deae21cc
Merge branch 'taquantrung' 2023-04-26 23:48:03 -07:00
Ta Quang Trung
a0d0826cc5
Fix fringe background warning in Emacs 29
* eldoc-box.el (eldoc-box--eldoc-message-function): Set background to
unspecified instead.
2023-04-26 23:47:15 -07:00
Yuan Fu
41ddcccd59
Merge branch 'disable-header-line' 2023-04-26 23:45:38 -07:00
jaaasonSun
8ce339094f
* eldoc-box.el (eldoc-box--display): Disable header-line. 2023-04-26 23:45:00 -07:00
Yuan Fu
6a0b1bd0ad
Fix typo
* eldoc-box.el (eldoc-box-lighter):
* README.org (Variable): Mode line.
2023-04-17 13:19:29 -07:00
Yordan Miladinov
920d0432a3
Add eldoc-box-lighter
The mode-line lighter is now customizable using the newly introduced
eldoc-box-lighter. It can also be hidden away by setting it to nil.

* eldoc-box.el (eldoc-box-lighter): New custom option.
(eldoc-box-hover-mode)
(eldoc-box-hover-at-point-mode): Use the new variable.
2023-04-13 14:08:41 -07:00
Ash
30901d08bc
Fix eldoc-box-body rendering in Customize
At least on my build (28.2), defining the face with :background
unspecified makes Customize only show the raw lisp expression. Setting
it to ((t . nil)) makes it work.

* eldoc-box.el (eldoc-box-body): Change face definition to nil.
2023-04-09 21:16:43 -07:00
Yuan Fu
143d7c5eff
* eldoc-box.el: Bump version. 2023-04-04 16:24:29 -07:00
Yuan Fu
11535ac497
New markdown prettifier
* eldoc-box.el (eldoc-box-buffer-hook): Add new prettifier.
(eldoc-box--remove-noise-chars): Remove carriage returns.
2023-03-31 12:01:36 -07:00
Yuan Fu
d1b8cb5066
* eldoc-box.el (eldoc-box--display): Workaround (issue#66). 2023-03-31 11:58:20 -07:00
Yuan Fu
c805bfcd61
* eldoc-box.el (eldoc-box--replace-en-space): Hide newline at eol. 2023-03-10 14:45:50 -08:00
Yuan Fu
b0935c1d39
Update eldoc-box--condense-large-newline-gaps
* eldoc-box.el:
(eldoc-box--condense-large-newline-gaps): Hide <br> at eol too.
2023-03-10 14:45:28 -08:00
Yuan Fu
41c2ac8b3b
Render nbsp as space
* eldoc-box.el (eldoc-box--fontify-html): Add support for &nbsp;.
2023-03-09 15:54:19 -08:00
Yuan Fu
150ed26880
Handle empty docs in the new Emacs 28 protocol (issue#64)
* eldoc-box.el (eldoc-box--eldoc-message-function): Check the final
doc rather than the STR argument.
2023-03-09 15:47:15 -08:00
Yuan Fu
eec688c1fc
; * eldoc-box.el (eldoc-box--condense-large-newline-gaps): Minor fix. 2023-03-08 21:21:36 -08:00
Yuan Fu
d68cccb543
Allow customizing doc separator
* eldoc-box.el (eldoc-box-doc-separator): New custom option.
(eldoc-box--eldoc-display-function): Use 'eldoc-box-doc-separator'.
2023-03-08 02:02:22 -08:00
Yuan Fu
39c0379dd0
Correctly compose eldoc documentation (issue#62)
* eldoc-box.el (eldoc-box--compose-doc): New function.
(eldoc-box--eldoc-display-function): Use eldoc-box--compose-doc.
2023-03-08 01:48:48 -08:00
Yuan Fu
d7d302989e
* eldoc-box.el (eldoc-box--fontify-html): Prettify HTML entities. 2023-03-07 15:30:12 -08:00
Yuan Fu
17b86a8acd
* eldoc-box.el (eldoc-box--replace-en-space): Use face-remap instead. 2023-03-07 15:07:35 -08:00
Yuan Fu
1b5eab4d67
Add Markdown prettifier functions
* README.org (Default prettifier): New section.
* eldoc-box.el (eldoc-box-buffer-hook): Add prettifier functions.
(eldoc-box--prettify-markdown-separator)
(eldoc-box--replace-en-space)
(eldoc-box--condense-large-newline-gaps)
(eldoc-box--remove-linked-images)
(eldoc-box--fontify-html-header): New functions.
2023-03-07 13:58:13 -08:00
Yuan Fu
1c2c45c888
Handle tab-bar gracefully
When tab-bar-mode is on, (window-at 0 0) returns nil (because the
tab-bar is on that position), throwing off eldoc-box--window-side.

* eldoc-box.el (eldoc-box--window-side): Handle tab-bar differently.
2023-03-04 22:46:40 -08:00
Yuan Fu
d88e7a5ba1
Make credit more regular
* README.org (Credit):
* eldoc-box.el:
2023-03-04 22:42:36 -08:00
Yuan Fu
16fbf1f17f
; * eldoc-box.el: Add a commentary section. 2023-02-27 18:37:10 -08:00
Yuan Fu
b4662208cb
Improve robustness of eldoc-box-help-at-point
* eldoc-box.el:
(eldoc-box-help-at-point): Guard against unbound variable error.
2023-02-27 18:29:05 -08:00
Yuan Fu
eea7dd8371
; * eldoc-box.el (eldoc-box--window-side): Fix docstring. 2023-02-27 18:28:54 -08:00
Yuan Fu
c8da9703ea
Bump version 2023-02-22 17:19:53 -08:00
Yuan Fu
6ce7d4ecb9
Add support for eldoc-display-functions
* eldoc-box.el (eldoc-box--count-newlines): New function.
(eldoc-box--eldoc-message-function): Use eldoc-box--count-newlines to
count newlines.
(eldoc-box--enable)
(eldoc-box--disable): Use eldoc-display-functions instead of
eldoc-message-function when possible.
(eldoc-box--eldoc-display-function): New function.
2023-02-22 15:41:46 -08:00
Campbell Barton
da5942f181
Correct eldoc-box-body face
As of emacs 29 this generates a warning.
2022-12-04 13:49:25 +11:00
Yuan Fu
3021dcd857
Fix #53: Update docstrings
* eldoc-box.el (eldoc-box-body)
(eldoc-box-quit-frame)
(eldoc-box--buffer): Stop mentioning eglot.
2022-11-17 14:16:00 -08:00
Alexey Gorelov
5b893437c8
Fix "wrong type argument" error on pressing C-g
* eldoc-box.el (eldoc-box-quit-frame): add frame-live-p condition.
2022-10-08 16:15:47 -07:00
Thomas Letan
cee5266af5 Fix slowness of the 'follow-cursor' feature
* eldoc-box.el (eldoc-box--inhibit-childframe-timer): Remove
variable.
(eldoc-box--inhibit-childframe-for): Refactor to use
'run-with-idle-timer' instead of 'run-with-timer'
(eldoc-box--follow-cursor): Don't do anything if the timer is set
2022-07-29 10:44:11 +02:00
Yuan Fu
39b44c99a0
Refactor eldoc-box-eglot-help-at-point
* eldoc-box.el (eldoc-box-eglot-help-at-point-last-point): Remove
variable.
(eldoc-box--eglot-help-at-point-cleanup): Remove function.
(eldoc-box-eglot-help-at-point): Use
'eldoc-box--help-at-point-cleanup' added in the last commit.
2022-06-11 19:43:34 -07:00
Yuan Fu
92100b2a2d
Add 'eldoc-box-help-at-point'
* eldoc-box.el (eldoc-box--help-at-point-last-point): New variable
(eldoc-box--help-at-point-cleanup): New function.
(eldoc-box-help-at-point): New command.
2022-06-11 19:42:56 -07:00
Yuan Fu
1ba418ba2b
Enable visual-line-mode in childframe
* eldoc-box.el (eldoc-box--display): Add visual-line-mode.
2022-06-11 18:15:02 -07:00
Yuan Fu
8d523f4fdd
Quiet compiler warnings.
* eldoc-box.el (eldoc-box-hover-mode, eldoc-box-hover-at-point-mode):
New declare.
2022-05-05 17:28:10 -07:00
Yuan Fu
b90780c93c
Do not require eglot at compile time
This fixes #46, reverts c18023132d.
Moved eglot-related functions into a
(eval-and-compile (when (require 'eglot nil t))) form.

* eldoc-box.el (require): Remove eglot requires.
2022-05-05 17:23:46 -07:00
Yuan Fu
6c3107aa69
Merge remote-tracking branch 'ideasman42/patch-1' 2022-05-04 20:15:35 -07:00
Campbell Barton
bebcaef778
Cleanup: quiet warnings
Quiet warnings from compiling, package-lint, checkdoc & byte-code compiling.

```
eldoc-box.el:264:2: Warning: docstring wider than 80 characters
227:4: warning: Closing parens should not be wrapped onto new lines.
eldoc-box.el:70: Keycode C-g embedded in doc string.  Use \\<mapvar> & \\[command] instead
eldoc-box.el:145: Lisp symbol ‘self-insert-command’ should appear in quotes
eldoc-box.el:208: First line is not a complete sentence
eldoc-box.el:209: There should be two spaces after a period
eldoc-box.el:244: Argument ‘width’ should appear (as WIDTH) in the doc string
eldoc-box.el:265: Some lines are over 80 columns wide
eldoc-box.el:395: There should be two spaces after a period
eldoc-box.el:428: Keycode C-g embedded in doc string.  Use \\<mapvar> & \\[command] instead
475:22: error: You should depend on (emacs "27.1") or the jsonrpc package if you need `jsonrpc-request'.
```
2022-05-05 10:05:51 +10:00
Bas Alberts
43ec41dcc0
* eldoc-box.el (eldoc-box-eglot-help-at-point): Don’t display nil. 2022-04-15 10:38:47 -07:00
Bas Alberts
c18023132d
* eldoc-box.el: Ensure macros are available at time of byte compile. 2022-04-15 10:38:35 -07:00