| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Add nushell
language server. (Bug#68823)
|
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Add
php-ts-mode. (Bug#68870)
Copyright-paperwork-exempt: yes
|
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Support
kotlin-ts-mode. (Bug#68865)
Copyright-paperwork-exempt: yes
|
| |
|
| |
|
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Add Uiua language
server. (Bug#67850)
Copyright-paperwork-exempt: yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ruff-lsp [1] is an LSP server for Ruff [2], [3], a fast Python linter
and code formatter.
It supports surfacing Ruff diagnostics and providing Code Actions to
fix them, but is intended to be used alongside another Python LSP in
order to support features like navigation and autocompletion.
[1]: https://github.com/astral-sh/ruff-lsp
[2]: https://github.com/astral-sh/ruff
[3]: https://docs.astral.sh/ruff/
* lisp/progmodes/eglot.el (eglot-server-programs): Add ruff-lsp.
Copyright-paperwork-exempt: yes
|
|
|
|
| |
(cherry picked from commit 58d9e735e721ecf0187a5e15eefc7641112ace0b)
|
|
|
|
|
|
|
|
|
| |
bug#67150
* lisp/progmodes/eglot.el (eglot-server-programs): Update
language-id for languages handled by typescript-language-server.
(cherry picked from commit 1fe949888057b0275da041288709bd5690501974)
|
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Add "terraform-ls",
the official Terraform LSP server. (Bug#65671)
Copyright-paperwork-exempt: yes
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Add "nixd".
Patch by Brian Leung <leungbk@posteo.net>. (Bug#64214)
|
|
|
|
|
|
|
|
|
|
| |
This bug originated from the previous fix, and is reproducible on non
Mac OS platforms, as long as the very latest version (at time of
writing) of the rust-analyzer server is used.
* lisp/progmodes/eglot.el (eglot--update-hints-1): Reverse
priorities when pegging overlays after (i.e. when before-string is
used).
|
|
|
|
|
|
|
|
| |
Only seems to happen on certain platforms, like Mac OS. Reason
unknown reason so far, but this defensive fix seems safe.
* lisp/progmodes/eglot.el (eglot--update-hints-1): Explicitly put
priority in inlay hint overalys.
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/misc/eglot.texi (Getting the latest version): Mention
eglot-upgrade-eglot.
* etc/EGLOT-NEWS: Mention eglot-upgrade-eglot.
* lisp/progmodes/eglot.el (eglot-upgrade-eglot): Rename from
eglot-update.
(eglot-update): New compatibility alias.
|
|
|
|
|
|
|
|
|
| |
* doc/misc/eglot.texi (Getting the latest version):
Update the reference.
* lisp/progmodes/eglot.el (eglot-upgrade): Rename from
'eglot-update', as discussed on emacs-devel, in line with
'package-upgrade'.
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-update): New command.
* doc/misc/eglot.texi (Troubleshooting): Rework.
|
|
|
|
|
|
|
|
|
|
| |
When asked to update hints in a region (FROM TO),
eglot--update-hints-1 first deletes the existing hints. It must
however take care to delete all overlays that logically belong to the
region, even if they don't physically belong to it, e.g. inlay
overlays spanning (FROM-1 FROM) and having a 'after-string' property.
* lisp/progmodes/eglot.el (eglot--update-hints-1): Fix edge case.
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Add
'dart-ts-mode'. Patch by Mou Tong <mou.tong@outlook.com>.
(Bug#62879)
|
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-ignored-server-capabilities): Fix the
value associated with the tag "Go to declaration". (Bug#62849)
Copyright-paperwork-exempt: yes
|
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot-server-programs): Add
'vscode-markdown-language-server' for Markdown and
'dot-language-server' for GraphViz. (Bug#62844)
|
|
|
|
| |
* lisp/progmodes/eglot.el (Version): Correct version.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
project-files isn't guaranteed to return existing files, so better
check if they exist because placing a watcher on them.
Originally reported at:
https://github.com/joaotavora/eglot/issues/1198
* lisp/progmodes/eglot.el (eglot-register-capability
workspace/didChangeWatchedFiles): Check if directories exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because of a drive-letter casing mismatch between 'buffer-file-name'
and the return value of 'url-generic-parse-url', the hash-table test
'equal' in 'eglot-current-server' failed.
This failed to recognize that the file xref landed us on really is
managed by the language server that facilitated that jump.
The function w32-long-file-name seems to convert "C:/Users/" to
"c:/Users" consistently and so is a good addition to
eglot--uri-to-path.
* lisp/progmodes/eglot.el (eglot--uri-to-path): Use
w32-long-file-name.
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--managed-mode-off): Turn off
eglot-inlay-hints-mode.
|
|
|
|
|
|
|
| |
When the server sends an "end" message, Emacs's progress reporters
should also be updated.
* lisp/progmodes/eglot.el (eglot-handle-notification $/progress): Rework.
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--workspace-configuration-plist):
Remove ().
|
|
|
|
|
|
|
|
|
| |
In bug#59149, LSP progress reporting was implemented, but Eglot's
'capabilities' statement to the server wasn't changed to include
window/workDoneProgress.
* lisp/progmodes/eglot.el (eglot-client-capabilities): Actually
report workDoneProgress.
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--apply-text-edits): Early return.
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--after-change): Minor
clarification to commentary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of deleting inlay hints instantly as soon as the affected
changes, make hint overlays span one character (instead of being
length 0). Give the overlays an "evaporate" property.
Given an inlay hints at position POS, its attached to [POS, POS+1] if
it's kind=1 (usually type hints) and [POS-1, POS] otherwise. For
kind=1 hints, the 'cursor position of the first such overlay is also
tweaked, so that's it's less akward to edit around it.
* lisp/progmodes/eglot.el (eglot--before-change): Don't delete hints
here.
(eglot--update-hints-1): Rework.
|
|
|
|
|
|
|
| |
* doc/misc/eglot.texi (Project-specific configuration): Fix
whitespace.
* lisp/progmodes/eglot.el (eglot-diagnostics-map): Doc fix.
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--connect): Remove overly verbose
commentary.
|
|
|
|
|
|
|
|
|
|
| |
It's better to give the user a variable to allow the overlay keymap to
be customized.
* lisp/progmodes/eglot.el (eglot--mouse-call): Accept second arg.
(eglot--mode-line-props): Adapt call to eglot--mouse-call
(eglot-diagnostics-map): New variable.
(eglot-code-actions-at-mouse): New command.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The manual states that YASnippet must only be installed to be useful.
Before this change, it would only work if the user happened to have
manually activated it before with 'yas-global-mode' or somesuch.
This makes Eglot's Yasnippet-activating behaviour similar to its
Flymake-activating behaviour.
* lisp/progmodes/eglot.el (eglot-client-capabilities): Consult
eglot--stay-out-of.
(eglot--snippet-expansion-fn): Turn on yas-minor-mod eon demand.
(eglot-completion-at-point): Simplify.
|
|
|
|
|
|
|
| |
Reported in https://github.com/joaotavora/eglot/discussions/1183.
* lisp/progmodes/eglot.el (desktop): Also exempt
eglot-inlay-hints-mode from desktop.el fumblings.
|
|
|
|
|
|
|
|
|
|
| |
The user command generated by eglot--code-action should always call
eglot-code-actions with a INTERACTIVE set to t.
Reported in https://github.com/joaotavora/eglot/issues/1132.
* lisp/progmodes/eglot.el (eglot--code-action): Pass INTERACTIVE=t to
eglot-code-action call.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not merge to master.
Before working on bugfixes to Eglot in its non-ELPA form delivered
with Emacs 29, it's important to distinguish between this emacs-29
version and the one in master, which will also get the bugfixes (via
routine gitmerge.el) but with a bumped version number.
* lisp/progmodes/eglot.el (Version): Emphasize Emacs 29, but hint this
is 1.12 + something.
(Package-Requires): Remove. Everything required is already in Emacs
29.
|
|
|
|
|
|
|
|
| |
* etc/EGLOT-NEWS: New file.
* etc/NEWS: Briefly mention etc/EGLOT-NEWS.
* lisp/progmodes/eglot.el: Bump versions.
|
|
|
|
|
|
|
| |
The fix contained a spurious check for this-command that shouldn't
have made it in..
* lisp/progmodes/eglot.el (eglot-ensure): Don't check this-command.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'eglot-ensure', typically used in the major-mode-hook, use
'post-command-hook' to schedule an automated, non-interactive
connection attempt to a server. The goal is to connect when the
buffer is ready, i.e. after the user command that found the file.
However, if there are dir-local or buffer-local variables to confirm,
finding the file will cause a minibuffer prompt to appear.
In that case, 'eglot-ensure's addition to the global post-command-hook
runs before it was intended too and a connection is started
prematurely.
In turn, this means that a call to 'hack-dir-local-variables' -- which
is part of the connection process -- which also needs a minibuffer
prompt, collides with the previous one. This generates an error and
confuses the user, who doesn't know if the directory-local variables
have been applied or not.
This commit fixes the clash by having 'eglot-ensure' set
'post-command-hook' buffer-locally. This causes the automated
connection to take place, as intended, after the user's original
file-finding command has ended.
However, the problem reported in bug#62065 is not completely fixed.
If the user answers "no" to the first "confirm local variables"
"prompt, she will be prompted again in the second one. A subsequent
commit will address this separate problem.
* lisp/progmodes/eglot.el (eglot-ensure): Use buffer-local post-command-hook.
|
|
|
|
|
|
|
|
|
| |
This isn't a typical autoload: the progn block is plced in the
autoloads file, but the eglot.el file itself isn't loaded as a result
when the function inside the progn block is called.
* lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri):
autoload, but in progn.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is like any other server-provided feature, and may be turned off
client-side by setting eglot-ignored-server-capabilities like
(add-to-list 'eglot-ignored-server-capabilities :inlayHintProvider)
* lisp/progmodes/eglot.el (eglot--maybe-activate-editing-mode):
Activate eglot-inlay-hints-mode.
(eglot-inlay-hints-mode): Instead of warning about missing
:inlayHintProvider, turn off eglot-inlay-hints-mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When Eglot needs to synthesize a "transient" project for
default-directory sometimes the value of that variable is set to an
unexpanded value, sometimes not. This can cause simple invocations
like.
Emacs -Q ~/path/to-some-python-file.py -f eglot
to fail, because eglot--current-server will be looking for a project
in the registry called
(transient . "~/path")
where in reality it is stored there as
(transient . "/home/someuser/path")
The fix is to always expand default-directory in eglot--current-project.
* lisp/progmodes/eglot.el (eglot--current-project): Use
expand-file-name.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding eglot--maybe-activate-editing-mode to find-file-hook isn't
really necessary, since it is already in
'after-change-major-mode-hook', and that also runs every time we find
a file.
This reduces the number of project.el logic that runs every time the
user visits a file.
* lisp/progmodes/eglot.el (find-file-hook): No need to add
eglot--maybe-activate-editing-mode here.
|
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--update-hints-1): Consider
:json-false, which is a non-nil value.
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--cmd): Use shell-file-name.
|
|
|
|
| |
* lisp/progmodes/eglot.el (eglot--debbugs-or-github-bug-uri): New helper.
|
|
|
|
|
|
|
|
|
| |
Unconditionally disable ControlMaster for the Eglot's Tramp
connection.
* lisp/progmodes/eglot.el (tramp-ssh-controlmaster-options)
(use-tramp-ssh-controlmaster-options): Forward declare
(eglot--connect): Set variables to unconditionally disable ControlMaster.
|