Commit Graph

222 Commits

Author SHA1 Message Date
Yuan Fu
5949978bdc
; * README.org: Minor editing. 2023-03-07 13:04:32 -08:00
Yuan Fu
08d0dfeeec
* screenshot.png: Update screenshot. 2023-03-07 01:02:36 -08:00
Yuan Fu
ea135f06e2
* screenshot.png: Use a new screenshot. 2023-03-04 23:36:26 -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
6c7b3376bd
* screenshot.png: Change screenshot. 2023-03-04 22:44:05 -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
e37a53696d
; * README.org: Update README. 2023-02-27 18:29:42 -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
Yuan Fu
5c067f5c19
Merge pull request #54 from ideasman42/patch-1
Correct eldoc-box-body face
2022-12-04 22:38:15 -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
Yuan Fu
4a57d48115
* README.org (Function): Add a warning for hover-at-point-mode. 2022-07-31 15:37:20 -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
Yuan Fu
706022f37d
Merge branch 'fix-readme' 2022-04-15 10:40:56 -07: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
Koki Fukuda
8cc575d7d4 Update instruction to use with eglot
* README.org: Change eglot--managed-mode-hook to eglot-managed-mode-hook
2022-04-13 23:58:01 +09:00
Yuan Fu
c0cbb8d919
* eldoc-box.el (eldoc-box-frame-parameters): Hide tab-lines. 2022-02-27 22:31:47 -08:00
Yuan Fu
6fbb6e3e19
Remove unnecessary check for empty string in eldoc-box--display
* eldoc-box.el (eldoc-box--display): Now we require the caller to make
sure the string is not empty.
2022-02-20 12:47:10 -08:00
Yuan Fu
646ae5cdd8
Fix eldoc-box-frame-hook to run in childframe as documented
* eldoc-box.el (eldoc-box--get-frame): Run the hook in the childframe
2022-02-20 12:03:16 -08:00
Trevor Richards
3efb59ab78
Add customizable eldoc-box-offset
* eldoc-box.el (eldoc-box-offset): New option.
(eldoc-box--default-upper-corner-position-function): Use
eldoc-box-position-function
2022-02-16 14:21:32 -08:00
Doug Davis
13d207d408
fix child border in Emacs 28
* eldoc-box.el (eldoc-box--get-frame): Set child-frame-border's
background to border color.
2021-06-08 18:02:25 -04:00
Yuan Fu
f66f8d0641
Merge branch 'defcustom' 2021-04-02 16:39:01 -04:00
Jimmy Yuen Ho Wong
4e81912d9b
Turn defvars to defcustoms for the documentation variables
* eldoc-box.el (eldoc-box-only-multi-line, eldoc-box-cleanup-interval,
eldoc-box-clear-with-C-g, eldoc-box-max-pixel-width,
eldoc-box-max-pixel-height, eldoc-box--inhibit-childframe): Turn into
custom options.
2021-04-02 16:38:01 -04:00
Yuan Fu
20580ad346
Merge branch 'fix-compiler-warnings' 2021-04-02 16:36:41 -04:00
Jimmy Yuen Ho Wong
10c792cc40
Fix byte compiler warnings
* eldoc-box.el (require): New require form.
(eldoc-box-hover-at-point-mode, eldoc-box-hover-at-point-mode,
eldoc-box-hover-mode, eldoc-box-hover-at-point-mode): Move below.
(eglot--hover-info, eglot--current-server-or-lose,
eglot--TextDocumentPositionParams, eglot--error, jsonrpc-request): New
declare forms.
2021-04-02 16:35:03 -04:00
Jimmy Yuen Ho Wong
eb694dde6b
Consider a single newline terminated string as single line
* eldoc-box.el (eldoc-box--eldoc-message-function): Trim newlines in
DOC. Rename 'multi-line-p' to 'single-line-p'.
2021-04-02 16:29:57 -04:00
sm2n
d4574ee392
Fix eldoc-box-only-multi-line behavior
Prior to this change, single line eldoc messages were just ignored
completely when eldoc-box-only-multi-line was non-nil, though they
should have been displayed in the minibuffer.

* eldoc-box.el (eldoc-box--enable): Change :before-until to :before-while.
(eldoc-box--eldoc-message-function): Return nil if the message is not
multi-line, so that the default eldoc message function picks up the
message.
2021-03-13 13:24:35 -05:00
Yuan Fu
c1a1b77ec0
Update README 2020-04-06 14:44:01 -04:00
Yuan Fu
7fa3b78d07 Add at point position hack
This should fix #22
2020-03-16 15:56:50 -04:00
Yuan Fu
82dc2e96e6
Get point position right 2020-03-16 12:19:29 -04:00
Yuan Fu
9137860707
Fix window position-finding 2019-11-02 10:33:49 -04:00
Yuan Fu
33b73c9169
Recover window-header-line-height 2019-11-02 10:04:28 -04:00
Yuan Fu
d3ea596daa
Hotfix #24 2019-11-02 09:30:07 -04:00
Yuan Fu
ec87e8c7f8
Simplify position-finding code 2019-11-02 00:10:11 -04:00
Yuan Fu
fcebfaa141
Fix #15
Line numbers mode is the problem
2019-11-02 00:09:10 -04:00
Yuan Fu
033df7175d
Update readme 2019-10-08 10:36:46 -04:00
Yuan Fu
0fffdf9a11
Inhibit tab-bar in childframe (#23) 2019-10-08 10:27:22 -04:00