~theo/eglot

Fix #638: Convert colon to hex in URI

* eglot.el (eglot--uri-path-allowed-chars): define what characters are allowed
in an URI. Specifically, convert ':' to '%3A' on windows.

* eglot.el (eglot--path-to-uri): ensure that the colon in 'file://' stays with a
colon, but hexify others.
7918fac6 — Brian Cully 4 years ago
Close #637: Add TRAMP support

Also close #463, close #84.

Thanks to Brian Cully for the original simple idea.  The basic
technique is to pass :file-handler t to make-process, then tweak
eglot--uri-to-path and eglot--path-to-uri, along with some other
functions, to be aware of "trampy" paths".

Crucially, a "stty hack" was needed.  It has been encapsulated in a
new a new eglot--cmd helper, which contains a comment explaining the
hack.

Co-authored-by: João Távora <joaotavora@gmail.com>

* eglot.el (eglot--executable-find): Shim two-arg executable-find
function only available on Emacs 27.
(eglot--guess-contact): Use eglot--executable-find.
(eglot--cmd): New helper.
(eglot--connect): Use eglot--cmd.  Use :file-handler arg to
make-process.
(eglot--connect, eglot--path-to-uri): Be aware of trampy file
names.

* eglot-tests.el (eglot-tests--auto-detect-running-server-1): New helper.
(eglot--guessing-contact): Better mock for executable-find.
(eglot--tramp-test): New test.

* NEWS.md: mention TRAMP support.

* README.md: mention TRAMP support.
Fix #635: Correctly protect against zero-length completion items

Close #636.

* eglot.el (eglot-completion-at-point): check for zero length string in proxy
rather than the item.
Fix #610: protect against empty URIs on windows

Per #630.

* eglot.el (eglot--uri-to-path): Check string length

Co-authored-by: João Távora <joaotavora@gmail.com>
1a54fc0e — João Távora 4 years ago
Per #627: URIfy better

See also
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#uri.

* eglot.el (eglot--path-to-uri): use directory-file-name.
ee980cf5 — João Távora 4 years ago
Fixup last commit to fix #627

* eglot.el (eglot-handle-request): Fixup.  Use let*
7f2e680a — João Távora 4 years ago
Fix #627: handle empty actions array in window/showMessageRequest

* eglot.el (eglot-handle-request window/showMessageRequest):
Handle empty actions.
a2d1fc9c — João Távora 4 years ago
Fix #625: handle null reply for textDocument/definition

* eglot.el (eglot--lsp-xrefs-for-method): Handle null response
from textDocument/definition & friends.
e57be55d — Jonathan del Strother 4 years ago
Fix #502: silence messages while formatting markup

Also fix #501.

Prior to this, activating gfm-view-mode could echo messages 
like "markdown-mode math support enabled" to the minibuffer.

Message are both silenced from from the minibuffer and the 
*Messaages* log.

Co-authored-by: João Távora <joaotavora@gmail.com>
Copyright-paperwork-exempt: yes
398b81ee — João Távora 4 years ago
Per #602: simplify dir-watching strategy of w/didChangeWatchedFiles

Instead of massaging the globPattern to match directories instead of
files, which is fragile, gather the list of directoris to watch by
matching the globPattern against every file recursively (except hidden
files and dirs).

This is still not 100% correct, but should do the right thing is most
cases.  Notably, if the correct dirs are being watched, the glob
pattern is matched against all existing and new files in those
directories, which does include hidden files.

* eglot.el (eglot-register-capability): match file globs against
files only.
(eglot--files-recursively): Rename from eglot--directories-recursively.
550ffc2c — João Távora 4 years ago
Per #602: tweak glob-parsing grammar

Alternative groups {} don't bork on forward slash.

* eglot.el (eglot--glob-parse): Tweak {} grammar.
2fc0db85 — Philip K 4 years ago
Fix #467: make eglot-ignored-server-capabilites defcustom a set

Co-authored-by: João Távora <joaotavora@gmail.com>

* eglot.el (eglot-ignored-server-capabilites): Now a set.
8d00f8b6 — João Távora 4 years ago
Per #602: speed up glob matching 2x

with-temp-buffer was taking a lot of time, presumably because it kills
the buffer.  Since emacs is single-threaded, we can safely reuse a
single buffer.

* eglot.el (eglot--glob-parse): Simplify grammar.
(eglot--glob-compile): Don't with-temp-buffer.
bf4a7aa2 — João Távora 4 years ago
Fix #406: mention eglot-stay-out-of in README.md

* README.md (Customization): Mention eglot-stay-out-of.
f63abe80 — Felicián Németh 4 years ago
Fix #418: support phps-mode

phps-mode is available from ELPA, php-mode isn't.

* eglot.el (eglot-server-programs): Recognize phps-mode as a PHP mode.

Co-authored-by: João Távora <joaotavora@gmail.com>
fc4c3247 — Doug Yun 4 years ago
Fix #567: update elixir-ls link in README.md

* README.md (elixir-ls): Update URL

Copyright-paperwork-exempt: yes
Fix #568: update gopls URL in README.md

* README.md (gopls): Update URL

Copyright-paperwork-exempt: yes
c73f5ede — Brian Leung 4 years ago
Fix #612: remove duplicate entry for "Registration" LSP type

* eglot.el (eglot--lsp-interface-alist): Remove extra Registration entry.

Copyright-paperwork-exempt: yes
f68f829f — João Távora 4 years ago
Close #566: prefer typescript-language-server for JS&TS

* README.md (Connecting to a server): Prefer
typescript-language-server.

* eglot.el (eglot-server-programs): Use
typescript-language-server.
a43289e0 — João Távora 4 years ago
Fix #616: also override global flymake-diagnostic-functions

The global value of the flymake-diagnostic-functions is likely to be
of little use in Eglot-managed buffers, so don't run it.  Likely the
value flymake-proc-legacy-flymake is there which is not only likely of
little uses but also causes trouble in some situations.

The user can easily avert this by leveraging the variable
eglot-stay-out-of.

* eglot.el (eglot--managed-mode): Don't run global
flymake-diagnostic-functions.
Next
Do not follow this link