| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inlay hints are small text annotations to specific parts of the whole
buffer, not unlike diagnostics, but designed to help readability
instead of indicating problems. For example, a C++ LSP server can
serve hints about positional parameter names in function calls and a
variable's automatically deduced type. Emacs can display these hints
in many little 0-length overlays with an 'before-string property, thus
helping the user not have to remember these things by heart.
Since inlay hints are potentially a large amount of data to request
from the LSP server, the implementation strives to be as parsimonious
as possible with these requests.
So, by default, inlay hints are only requested for the visible
portions of the buffer across windows showing this buffer. This is
done by leveraging the 'window-scroll-functions' variable, making for
a reasonably complex implementation involving per-window timers. When
scrolling a window, it may take a short amount of time for inlay hints
to "pop in". The new user variable 'eglot-lazy-inlay-hints' can be
used to exert some control over this.
Specifically, if the variable's value is set to 'nil', then inlay
hints are greedily fetched for the whole buffer every time a change
occurs. This is a much simpler mode of operation which may avoid
problems, but is also likely much slower in large buffers.
Also, by default this inlay feature is turned ON, which is the usual
practice of Eglot when facilities are in place to enable a given
feature. Although this can be tweaked by the user via
'eglot-ignored-server-capabilities' as usual, it's possible this
feature is visually suprising enough to warrant an exception to the
usual rule.
I haven't tested inlay hints extensively across many LSP servers, so I
would appreciate any testing, both for functional edge cases and
regarding performance. There are possibly more optimization
oportunities in the "lazy" mode of operation, like more aggressively
deleting buffer overlays that are not in visible parts of the buffer.
Though I ended up writing this one from scratch, I want to thank
Dimitry Bolopopsky <dimitri@belopopsky.com> and Chinmay Dala
<dalal.chinmay.0101@gmail.com> for suggestions and early patches.
* lisp/progmodes/eglot.el (eglot--lsp-interface-alist): Define
InlayHint.
(eglot-client-capabilities): Announce 'inlayHint' capability.
(eglot-ignored-server-capabilities): Add :inlayHintProvider.
(eglot--document-changed-hook): New helper hook.
(eglot--after-change): Use it.
(eglot-inlay-hint-face, eglot-type-hint-face)
(eglot-parameter-hint-face): New faces.
(eglot--update-hints-1, eglot--inlay-hints-after-scroll)
(eglot--inlay-hints-fully, eglot--inlay-hints-lazily): New helpers.
(eglot-lazy-inlay-hints): New user variable.
(eglot-inlay-hints-mode): New minor mode.
(eglot--maybe-activate-editing-mode): Try to activate
eglot-inlay-hints-mode.
(eglot--before-change): Remove overlays immediately in the
area being changed.
* doc/misc/eglot.texi (Eglot Features): Mention inlay hints.
(Eglot Variables): Mention eglot-lazy-inlay-hints.
|
| |
|
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--server-capable-or-lose): New helper.
(eglot--signal-textDocument/willSave)
(eglot--signal-textDocument/didSave): Tweak docstring.
(eglot--workspace-symbols, xref-backend-identifier-at-point)
(eglot-format, eglot-completion-at-point, eglot-rename)
(eglot-code-actions): Use new eglot--server-capable-or-lose.
|
| |
|
|
|
|
|
| |
* lisp/textmodes/emacs-news-mode.el (emacs-news-cycle-tag): Search for
a heading starting with 2 or more '*' rather than exactly 3.
* test/lisp/textmodes/emacs-news-mode-resources/cycle-tag.erts
(Point-Char): Add tests for 2 and 4 '*' levels.
|
| |
|
|
|
|
|
|
|
|
| |
* lisp/edmacro.el (edmacro-sanitize-for-string):
This condition should not have been 'repaired' but removed altogether.
Do so now, fixing bug#61647.
Reported by Eduardo Ochs.
(cherry picked from commit 4eefadad0670ad1c3da2505d734e528d54c76bef)
|
| |
|
|
|
|
|
|
|
|
|
| |
bug#61514 exhibited some undesirable backtracking in a case where
it's easy to avoid it by making `mutually_exclusive_p` just a bit
more careful.
* src/regex-emacs.c (mutually_exclusive_p): Handle `on_failure_jump`s.
* test/src/regex-emacs-tests.el (regexp-tests-backtrack-optimization):
Add a few tests.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change addresses the problems reported in many Elglot reports
dating back to early 2021 at least:
https://github.com/joaotavora/eglot/issues/648
https://github.com/joaotavora/eglot/issues/894
https://github.com/joaotavora/eglot/issues/920
https://github.com/joaotavora/eglot/issues/1031
https://github.com/joaotavora/eglot/issues/1171
In one form or another, the reports point out that the multiple pieces
of information about the "thing at point" made available by the LSP
server are not all being considered by the ElDoc system.
The reason for this is Eglot setting/trampling the variables
'eldoc-documentation-strategy' and 'eldoc-documentation-functions' in
its minor more entry function.
The reason it did that is historical and is partially described in the
issues above. But, evidently, it never made much sense, because so
many people want to override it, which requires setting
'eldoc-documentation-strategy' to the non-default value
'eldoc-documentation-compose'.
The problem was made worse by the fact that setting it as usual in
either the Customize menu or their init file didn't work, requiring a
fairly complex Elisp snippet. That is now solved as of this commit.
If the user does not do any setting, then Eglot works basically the
same as before (i.e. shows only one piece of information).
It is arguable that the default value for
'eldoc-documentation-strategy' should change globally to
'eldoc-documentation-compose', but that has other subtle implications
and is not part of this commit.
* lisp/progmodes/eglot.el (eglot--managed-mode): Don't set Eldoc
variables greedily.
|
| |
|
|
|
|
|
| |
* src/comp.c (CALL4I): Define macro.
(Fcomp__compile_ctxt_to_file): Use `make-temp-file' instead of
`make-temp-file-internal'.
* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Likewise.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
* lisp/progmodes/c-ts-mode.el (c-ts-base-mode): Consider a
"declaration_list" a block. (Bug#61635)
* test/lisp/progmodes/c-ts-mode-resources/indent.erts (Code): Add a
test case.
|
| |
|
|
|
| |
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): New rules.
|
| |
|
|
|
| |
* lisp/progmodes/csharp-mode.el (csharp-guess-basic-syntax): Make sure
we check the openers as well as closers.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now prev-adaptive-prefix looks at the current line and checks if it
begins with a prefix itself. If it does, prev-adaptive-prefix tries
to place the anchor before the prefix on the previous line, rather
than after it.
- prev line
- this line -> This line starts with a "-", i.e., begins with a
prefix, so we place the anchor at the beginning of the
"-" of the previous line, rather than after it
- prev line
this line -> This line doesn't start with a prefix, so the anchor
is placed after the previous line's "-".
* doc/lispref/modes.texi (Parser-based Indentation): Update manual.
* lisp/treesit.el:
(treesit-simple-indent-presets): Add local variable
this-line-has-prefix, base what anchor to return on the value of
this-line-has-prefix and whether the prev line has a prefix.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can use the fact that 'treesit-indent-1' uses 'treesit-node-on'
when on a whitespace to set the actual current node as parent. Now we
can correctly indent the 'jsx_text' nodes. We also add some more
electric-indent-chars so that auto-indenting of jsx behaves a little
more fluently.
* lisp/progmodes/js.el (js--treesit-indent-rules): Add new rules.
(js-ts-mode): Add more indent-chars.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add new rules.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-base-mode): Add more indent-chars and layout rules.
|
| |
|
|
|
|
|
|
| |
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Make sure we
indent to great-grand-parent if inside an #ifdef...#endif block. If
grand-parent is root node, then don't indent one step.
(c-ts-mode--preproc-offset): New helper anchor function to calculate
indent offset.
|
| |
|
|
|
|
|
|
|
| |
* lisp/progmodes/c-ts-mode.el (c-ts-mode-toggle-comment-style): New
command.
(c-ts-base-mode-map): Add binding.
(c-ts-mode-set-modeline): New function.
(c-ts-mode): Set modeline.
(c++-ts-mode): Set modeline.
|
| |
|
|
|
| |
Don't use base-affixes when completion-use-base-affixes is non-nil
in completion-in-region-mode (bug#61535).
|
| |
|
|
|
|
|
|
|
|
| |
* lisp/progmodes/rust-ts-mode.el (rust-ts-mode--fontify-scope)
(rust-ts-mode--fontify-tail): New functions.
(rust-ts-mode--font-lock-settings): Use them instead of a lot of
more complex queries (bug#61302). Thus avoid having to create
block fontification by other features using the 'default' face.
Replace the catch-all query for 'variable' with an enumeration of
possible parent nodes.
|
| | |
|
| |
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref--insert-xrefs): Use face 'shadow' for
the line number colon instead of continuing it face (bug#61340).
(cherry picked from commit d6d25a3c221e566de4df5319181e9ba9a8df285e)
|
| |
|
|
| |
(cherry picked from commit 643a11c6e5defc0a34da1a53b64aa1e097298923)
|
| |
|
|
|
|
|
| |
* lisp/progmodes/xref.el (xref-clear-marker-stack):
Clear the history correctly. Changing a lexical variable has no effect.
(cherry picked from commit dfdc0f5fb7b10e737c3c8e2bdb1eb873a1e91bd7)
|
| |\
| |
| |
| |
| |
| | |
The following commit was skipped:
a44d906740f ; Commit files changed by "autoreconf -i -I m4 --force"
|
| | |
| |
| |
| |
| |
| | |
* build-aux/config.guess:
* build-aux/config.sub: Update files changed by running "autoreconf -i
-I m4 --force". Do not merge.
|
| |\ \
| |/
| |
| |
| |
| |
| |
| | |
f5a99945b6f ; Update ChangeLog for Emacs 28.3
f7bd5ac5521 Update HISTORY for Emacs 28.3
# Conflicts:
# etc/NEWS
|
| | |
| |
| |
| |
| | |
* ChangeLog.3: Refresh for Emacs 28.3.
* etc/NEWS: Add more information about fixed vulnerabilities.
|
| | | |
|
| |\ \
| |/
| |
| |
| |
| |
| | |
The following commits were skipped:
ba3aba3096a Bump Emacs version to 28.3
e61d743d440 Update NEWS for Emacs 28.3
|
| | |
| |
| |
| |
| |
| |
| | |
* README:
* configure.ac:
* msdos/sed2v2.inp:
* nt/README.W32: Bump Emacs version to 28.3.
|
| | |
| |
| |
| | |
* etc/NEWS: Update for Emacs 28.3.
|
| |\ \
| |/
| |
| | |
4a77fcb1478 Update ChangeLog and AUTHORS for Emacs 28.3
|
| | |
| |
| |
| |
| | |
* ChangeLog.3:
* etc/AUTHORS: Update for Emacs 28.3.
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
The following commits were skipped:
e339926272a Fix etags local command injection vulnerability
5d05ea803e9 Fixed ctags local command execute vulnerability
22fb5ff5126 Fix ruby-mode.el local command injection vulnerability (b...
807d2d5b3a7 Fix htmlfontify.el command injection vulnerability.
ae9bfed50db Fix storing email into nnmail by Gnus
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* lib-src/etags.c: (escape_shell_arg_string): New function.
(process_file_name): Use it to quote file names passed to the
shell. (Bug#59817)
(cherry picked from commit 01a4035c869b91c153af9a9132c87adb7669ea1c)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lib-src/etags.c:
(clean_matched_file_tag): New function
(do_move_file): New function
(readline_internal):
Add `leave_cr` parameter, if true, include the \r character
* test/manual/etags/CTAGS.good_crlf: New file
* test/manual/etags/CTAGS.good_update: New file
* test/manual/etags/crlf: New file
* test/manual/etags/Makefile: Add `ctags -u` test cases
(cherry picked from commit d48bb4874bc6cd3e69c7a15fc3c91cc141025c51)
|
| | |
| |
| |
| |
| |
| |
| | |
* lisp/progmodes/ruby-mode.el
(ruby-find-library-file): Fix local command injection vulnerability.
(cherry picked from commit 9a3b08061feea14d6f37685ca1ab8801758bfd1c)
|
| | |
| |
| |
| |
| |
| |
| | |
* lisp/htmlfontify.el (hfy-text-p): Fix command injection
vulnerability. (Bug#60295)
(cherry picked from commit 1b4dc4691c1f87fc970fbe568b43869a15ad0d4c)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Backporting suggested by Florian Weimer, since this is
a denial-of-service issue.
* lisp/gnus/nnml.el (nnml--encode-headers): Wrap
'rfc2047-encode-string' calls with 'ignore-errors', to avoid
disrupting email workflows due to possibly-invalid headers.
Reported by Florian Weimer <fweimer@redhat.com>.
(cherry picked from commit 23f7c9c2a92e4619b7c4d2286d4249f812cd695d)
|
| | |
| |
| |
| |
| | |
* lisp/image/image-dired.el (image-dired-thumbnail-storage):
Improve docstring.
|
| | | |
|
| | |
| |
| |
| |
| | |
* doc/emacs/dired.texi (Image-Dired): Some fixes and more
documentation about image-dired-dired-* commands.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Previously, defaulting to the empty string put candidates without
:sortText to the top of the list. since string-lessp is safe with nil
arguments, this makes them sort to the end instead.
* lisp/progmodes/eglot.el (eglot-completion-at-point): Simplify.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* lisp/simple.el (kill-buffer--possibly-save): Don't request
LONG-FORM from 'read-multiple-choice' if GUI dialog should be
used.
* lisp/emacs-lisp/rmc.el (read-multiple-choice): Doc fix.
(read-multiple-choice--short-answers): Don't append "?" to
CHOICES and don't display the prompt in the echo area if GUI
dialog is used. Use 'use-dialog-box-p'. (Bug#61553)
|
| | |
| |
| |
| |
| |
| | |
* doc/lispref/compile.texi (Native-Compilation Variables):
Document the interpretation of non-absolute directory names that
are the value of 'native-comp-enable-subr-trampolines'.
|
| | |
| |
| |
| |
| | |
* lisp/image/image-dired.el (image-dired-display-thumbs): Call
image-dired--update-header-line. (Bug#61508)
|
| | |
| |
| |
| |
| | |
* lisp/treesit.el (treesit-query-validate): Fix the "Buffer is
read-only" error when an output buffer already exists.
|
| | |
| |
| |
| |
| | |
* lisp/progmodes/rust-ts-mode.el
(rust-ts-mode--font-lock-settings): Highlight closure parameters.
|
| | |
| |
| |
| |
| |
| | |
* lisp/emacs-lisp/comp.el (comp--trampoline-abs-filename): Interpret
`native-comp-enable-subr-trampolines' relative to
`invocation-directory'.
|