summaryrefslogtreecommitdiff
path: root/lisp
Commit message (Collapse)AuthorAgeFilesLines
* Request "elpa-packages.eld" instead of "elpa-packages"Philip Kaludercic2022-10-221-2/+2
| | | | | | * lisp/emacs-lisp/package-vc.el (package-vc--read-archive-data): Apply change. (package-vc--download-and-read-archives): Apply change.
* Remove 'package-vc-install' alias 'package-checkout'Philip Kaludercic2022-10-211-3/+0
| | | | * lisp/emacs-lisp/package-vc.el (package-checkout): Remove it.
* Have 'package-vc-link-directory' use name if givenPhilip Kaludercic2022-10-201-1/+1
| | | | | * lisp/emacs-lisp/package-vc.el (package-vc-link-directory): Use the NAME argument.
* Build documentation like elpa-admin.elPhilip Kaludercic2022-10-201-8/+19
| | | | | | * lisp/emacs-lisp/package-vc.el (package-vc-build-documentation): Add function to build a documentation file. (package-vc-unpack-1): Use 'package-vc-build-documentation'.
* Merge remote-tracking branch 'origin/master' into feature/package+vcPhilip Kaludercic2022-10-2015-60/+3851
|\
| * Fix ldapsearch output parsing in ldap-search-internalFilipp Gunbin2022-10-201-4/+4
| | | | | | | | | | * lisp/net/ldap.el (ldap-search-internal): When parsing output, make sure that file:// matched before opening the file. (bug#58605)
| * Add Eglot to the menu barEli Zaretskii2022-10-202-14/+22
| | | | | | | | | | * lisp/progmodes/eglot.el (eglot): Improve the doc string. * lisp/menu-bar.el (menu-bar-tools-menu): Add Eglot to the menu.
| * ; fix warning about order of defvaralias/defconstJoão Távora2022-10-201-1/+1
| | | | | | | | | | * lisp/progmodes/eglot.el (eglot-{}): Declare alias before thing being aliased.
| * * lisp/info-look.el (mapc): Add Eglot manual's index.João Távora2022-10-201-0/+1
| |
| * ; Merge from https://github.com/joaotavora/eglotJoão Távora2022-10-201-0/+3457
| |\
| | * Expose eglot-{} to be used in eglot-workspace-configurationJoão Távora2022-10-201-0/+1
| | | | | | | | | | | | | | | * eglot.el (eglot-{}): New variable alias. GitHub-reference: per https://github.com/joaotavora/eglot/issues/1084
| | * Rework header of eglot.elJoão Távora2022-10-201-27/+58
| | | | | | | | | | | | | | | * eglot.el (Commentary): Rework.
| | * Do use eglot-connect-timeout if eglot-sync-connect is tJoão Távora2022-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Reported by Eli Zaretskii <eliz@gnu.org> * eglot.el (eglot--connect): Use eglot-connect-timeout in the case eglot-sync-connect is t.
| | * * eglot.el (version): actually bump to 1.9João Távora2022-10-111-1/+1
| | |
| | * Fix docstring of eglot-list-connections-modeJoão Távora2022-10-081-3/+2
| | | | | | | | | | | | | | | | | | * eglot.el (eglot-list-connections-mode): Fix mistaken reference to similar non-Eglot code.
| | * Make eglot-code-actions usable non-interactivelyJoão Távora2022-10-051-13/+23
| | | | | | | | | | | | | | | | | | * eglot.el (eglot--read-execute-code-action): New helper. (eglot-code-actions): Use new helper. Offer non-interactive version. GitHub-reference: per https://github.com/joaotavora/eglot/issues/1070
| | * Add half-baked m-x eglot-list-connectionsJoão Távora2022-10-051-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not very useful for now, but more functionality could be added later, like bindings for disconnecting a given connection, switching to its events buffers, or just listing some details like capabilities. * eglot.el (eglot-list-connections-mode, eglot-list-connections): New mode and function.
| | * Rename "eglot -> eglot" in docstringsJoão Távora2022-10-041-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eglot.el (eglot-mode-line, eglot-client-capabilities) (eglot--stay-out-of-p, eglot-managed-p) (eglot-managed-mode-hook, eglot--managed-mode) (eglot-current-server, eglot--current-server-or-lose) (eglot--mode-line-format, eglot-xref-backend) (eglot-imenu): Rename "EGLOT" -> "Eglot"
| | * Make clojure-lsp handle more major modes at onceJoão Távora2022-09-261-1/+2
| | | | | | | | | | | | | | | | | | | | | Suggested-by: Witoslaw Koczewski <wi@koczewski.de> * eglot.el (eglot-server-programs): Enhance clojure-specific section. GitHub-reference: per https://github.com/joaotavora/eglot/issues/682
| | * Add support for "single server, multiple modes"João Távora2022-09-261-25/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if an entry such as: ((c++-mode c-mode) . ("clangd)") were found in eglot-server-programs, it meant that opening a .cpp file and a .c file in the same project and enabling eglot for both would lead to two clangd instances. Now only one instance is created to handle all buffers of those major modes, as long as they are in the same project. This change accomplishes this with minimal changes and NO modification to the already complicated syntax of eglot-server-programs. Naturally, this means that a subtle backward-incompatibility was introduced. If, instead of "clangd", someone is using some kind "c++-or-c-but-not-both-at-once" server, this commit now breaks that person's configuration. After analysing the entries of this variable, an educated guess was made that this situation is rare. If it's not rare, then some change to the syntax of eglot-server-programs will have to ensue. * eglot.el (eglot-server-programs): Update docstring. (eglot-lsp-server): Replace major-mode -> major-modes. (eglot--lookup-mode): Rework. (eglot--guess-contact): Rework. (eglot--connect): Reword first parameter. (eglot-reconnect): Use eglot--major-modes. (eglot--read-server): Rework. (eglot--ensure-list): New helper. (eglot-current-server): Rework. (eglot-handle-request workspace/configuration): Use first of managed major modes. * NEWS.md: Mention change. GitHub-reference: per https://github.com/joaotavora/eglot/issues/681
| | * Shoosh byte-compilation warnings about line numbering functionsJoão Távora2022-09-261-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add warning at the top of file about not using functionality incompatible with 26.3 * eglot.el: (eglot-current-column, eglot-current-column): Use line-beginning-position (eglot--xref-make-match): Use line-beginning-position, line-end-position, line-number-at-pos
| | * Fix blunder in eglot--guess-contactJoão Távora2022-09-241-4/+5
| | | | | | | | | | | | | | | | | | * eglot.el (eglot--guess-contact): Add back 'split-string-and-unquote' lost in https://github.com/joaotavora/eglot/issues/940 fix. GitHub-reference: per https://github.com/joaotavora/eglot/issues/940
| | * Revert "fix jdtls support"João Távora2022-09-191-1/+1
| | | | | | | | | | | | | | | This reverts commit e5b021c01fceea02b7e6622cde0a347b842ca6f3. GitHub-reference: per https://github.com/joaotavora/eglot/issues/1008
| | * Don't use three-argument plist-getJoão Távora2022-09-191-7/+9
| | | | | | | | | | | | | | | | | | * eglot.el (eglot-handle-request): Don't use three-argument plist-get. GitHub-reference: per https://github.com/joaotavora/eglot/issues/1024
| | * Don't return hash tables from e-w-configuration-plistJoão Távora2022-09-181-3/+3
| | | | | | | | | | | | | | | | | | | | | * eglot.el (eglot-signal-didChangeConfiguration): Adjust. (eglot-handle-request workspace-configuration): Adjust. (eglot--workspace-configuration-plist): Don't return a hashtable. GitHub-reference: per https://github.com/joaotavora/eglot/issues/1033
| | * Allow eglot-workspace-configuration to be a plistJoão Távora2022-09-181-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested-by: Augusto Stoffel <arstoffel@gmail.com> * NEWS.md: Mention change. * README.md (eglot-workspace-configuration): Update yet again. Update examples to use pylsp. * eglot.el (eglot--workspace-configuration-plist): Noop if already a plist. (eglot-handle-request workspace/configuration): Use eglot--workspace-configuration-plist. (eglot-workspace-configuration): Document variable. GitHub-reference: per https://github.com/joaotavora/eglot/issues/590 GitHub-reference: per https://github.com/joaotavora/eglot/issues/790 GitHub-reference: per https://github.com/joaotavora/eglot/issues/1033
| | * Don't exceed max-specdl-size in big go projectsJoão Távora2022-09-181-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When invoking client/registerCapability for workspace/didChangeWatchedFiles, Gopls lists each file to watch separately. This makes eglot--glob-emit-{} emit a closure with an 'or' form containing a potentially large number of 're-search-forward' forms. For large Go project such as "Kubernetes", this list becomes so large that -- for some reason I don't understand -- it triggers the 'max-specdl-size' limit. An alternative using `regexp` opt doesn't seem to trigger the error. * eglot.el (eglot--glob-emit-{}): Use regexp-opt. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/633 GitHub-reference: fix https://github.com/joaotavora/eglot/issues/1067
| | * Allow :initializationoptions in eglot-server-programsJoão Távora2022-09-181-20/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also see https://github.com/joaotavora/eglot/issues/1038. This feature was poorly tested, and simply wouldn't work when trying to initialize the server object. The simple solution is to ignore :initializationOptions initarg in this context. It is still stored separately as and accessed as the 'eglot--saved-initargs' slot. Another complication arises in eglot--guess-contact, which tried too hard to be able to compose an interactive prompt (when the server program can't be found). The solution is just to give up when :autoport or :initializationOptions is found. It's not easy or practical to have the user provide non-string arguments via a string interface like the minibuffer. * eglot.el (initialize-instance :before eglot-lsp-server): Don't pass :initializationOptions initarg onward. (eglot--guess-contact): Simplify. Don't try heroics with :autoport and :initializationOptions. * eglot-tests.el (eglot-server-programs-simple-missing-executable): Update test. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/940
| | * Adjust last commit about workspace configurationJoão Távora2022-09-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * README.md (way): Adjust. * eglot.el (json): Don't require needlessly. (eglot-show-workspace-configuration): Don't depend on json-mode. GitHub-reference: per https://github.com/joaotavora/eglot/issues/790 GitHub-reference: per https://github.com/joaotavora/eglot/issues/590
| | * Rework readme.md about workspace configuration againJoão Távora2022-09-171-18/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also tweak eglot-show-workspace-configuration a bit. * README.md (Workspace configuration): Rework. * eglot.el (eglot-show-workspace-configuration): Rework. (eglot--workspace-configuration-plist): New helper. GitHub-reference: per https://github.com/joaotavora/eglot/issues/590
| | * Add eglot-show-configuration to debug workspace configurationsFredrik Bergroth2022-09-171-0/+13
| | | | | | | | | | | | | | | Also see https://github.com/joaotavora/eglot/issues/790, https://github.com/joaotavora/eglot/issues/1033. GitHub-reference: per https://github.com/joaotavora/eglot/issues/590
| | * Prefer documentchanges to changes in server-initiated editsTheodor Thornhill2022-09-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some servers return both. PR: https://github.com/joaotavora/eglot/issues/949 * eglot.el (eglot--apply-workspace-edit): When both documentChanges and changes are present, prefer the documentChanges. By doing that we ensure that we don't double edit, rendering the document in an unusable state. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/704
| | * Add support for jedi-language-server (again)jgart2022-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eglot.el (eglot-server-programs): Add jedi-language-server * README.md: Mention jedi-language-server * NEWS.md: Mention jedi-language-server Copyright-paperwork-exempt: yes GitHub-reference: close https://github.com/joaotavora/eglot/issues/961
| | * Don't return poorly supported "special elements" in eglot-imenuJoão Távora2022-09-091-27/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix https://github.com/joaotavora/eglot/issues/758, https://github.com/joaotavora/eglot/issues/536, https://github.com/joaotavora/eglot/issues/535. Eglot's eglot-imenu returned a structure compliant with the rules outlined in imenu--index-alist. In particular, it returned some elements of the form (INDEX-NAME POSITION GOTO-FN ARGUMENTS...) The original intention (mine) must have been to allow fancy highlighting of the position navigated to with a custom GOTO-FN. Not only was access to that fanciness never implemented, but many other imenu frontends do not support such elements. See for example https://github.com/joaotavora/eglot/issues/758, https://github.com/joaotavora/eglot/issues/536, https://github.com/joaotavora/eglot/issues/535. And also related issues in other packages: https://github.com/IvanMalison/flimenu/issues/6 https://github.com/bmag/imenu-list/issues/58 So it's best to remove this problematic feature for now. It can be added back later. * eglot.el (eglot-imenu): Simplify. * NEWS.md: Mention change
| | * Fix jdtls supportManuel Uberti2022-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | PR https://github.com/joaotavora/eglot/issues/1026 * eglot.el (eglot-server-programs): Add -data setup for java-mode. GitHub-reference: per https://github.com/joaotavora/eglot/issues/1008
| | * Add marksman server for markdownArtem Pyanykh2022-09-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * eglot.el (eglot-server-programs): Update. * README (Connecting to a server): Add marksman. * NEWS.md: Mention change. Copyright-paperwork-exempt: yes GitHub-reference: close https://github.com/joaotavora/eglot/issues/1013
| | * Add out-of-box support for perl lsp serverChristian Garbs2022-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * eglot.el (eglot-server-programs): Support Perl lsp. * README.md: Update. * NEWS.md: Update. Co-authored-by: João Távora <joaotavora@gmail.com> GitHub-reference: close https://github.com/joaotavora/eglot/issues/952
| | * Always default eglot-strict-mode to nilJoão Távora2022-07-221-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it's mostly useful for developers/debugger. It's better to have the latter remember to set it than users being hindered by it. See https://github.com/joaotavora/eglot/issues/131#issuecomment-1191997167 * eglot.el (eglot-strict-mode): default to nil.
| | * Fix embarrassing paren-matching blunder in eglot.elJoão Távora2022-07-191-1/+1
| | | | | | | | | | | | | | | * eglot.el (eglot-handle-request workspace/applyEdit): Fix parens.
| | * Reply more reasonably to server's workspace/applyeditJoão Távora2022-07-191-1/+2
| | | | | | | | | | | | | | | | | | * eglot.el (eglot-handle-request): Return non-nil (eglot--apply-workspace-edit): Signal jsonrpc-error, not error.
| | * Appease byte-compiler warnings about wrong use of quotesJoão Távora2022-07-191-4/+3
| | | | | | | | | | | | | | | | | | * eglot.el (eglot-stay-out-of, eglot--code-action): Just give it what it wants.
| | * Eglot-workspace-configuration can be a functionJoão Távora2022-07-191-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * README.md (Workspace configuration): Renamed from per-project configuration. Rework. * NEWS.md: Mention change. * eglot.el (eglot-workspace-configuration): Overhaul. (eglot-signal-didChangeConfiguration): Use new eglot-workspace-configuration. GitHub-reference: per https://github.com/joaotavora/eglot/issues/967
| | * Be more conservative with the lsp identifier guessJoão Távora2022-07-151-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user is not requesting a prompt, opt for the safer approach which is to get the location from textDocument/definition, not from workspace/symbol. Because of things like function overloading, the latter is not always successful in finding exactly the definition of the thing one is invoking M-. on. This requires using an xref-internal symbol, which is kind of unfortunate. * eglot.el (xref-backend-identifier-at-point): Rework. GitHub-reference: per https://github.com/joaotavora/eglot/issues/131 GitHub-reference: per https://github.com/joaotavora/eglot/issues/314
| | * Guess the "lsp identifier at point"João Távora2022-07-151-50/+51
| | | | | | | | | | | | | | | | | | | | | | | | * eglot.el (eglot--workspace-symbols): New helper. (xref-backend-identifier-completion-table): Rework. (xref-backend-identifier-at-point): Rework. GitHub-reference: per https://github.com/joaotavora/eglot/issues/131 GitHub-reference: per https://github.com/joaotavora/eglot/issues/314
| | * Tweak some details, fix some bugsJoão Távora2022-07-151-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | eglot--recover-workspace-symbol-meta had a bug that still made it choke on improper lists. Also, when simply M-. to the thing at point, let's not lose time on iterating a potentially out-of-date eglot--workspace-symbols-cache. So clear it early in the pre-command-hook. * eglot.el (eglot--workspace-symbols-cache): Move up. (eglot--pre-command-hook): Clear eglot--workspace-symbols-cache here. (eglot--recover-workspace-symbol-meta): Check for consp. GitHub-reference: per https://github.com/joaotavora/eglot/issues/131
| | * Cosmetic decisions guaranteed to tick off someone somewhere (tm)João Távora2022-07-141-35/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbols returned by the LSP server must be converted to unique strings if Emacs is to present them in a list. On the other hand, the search operates on the pattern and is completely controlled by the backend. There is not much Eglot, the LSP client, can do about this. Decided to present the unique string to the user, even though it could be hidden. All the manner of :annotation-function, :affixation-function, :group-funcion etc didn't seem to add much value. Grouping was especially useless, since it makes sense to respect the LSP server's account of sorting score, so that better results bubble up to the top. * eglot.el (xref-backend-identifier-completion-table): Uniquify symbols with containerName and kind. GitHub-reference: per https://github.com/joaotavora/eglot/issues/131
| | * Experiment with grouping in xref-backend-identifier-completion-tableJoão Távora2022-07-141-4/+34
| | | | | | | | | | | | | | | | | | | | | Doesn't look very good. * eglot.el (xref-backend-identifier-completion-table): Add stuff. GitHub-reference: per https://github.com/joaotavora/eglot/issues/131
| | * Make c-u m-. work half decentlyJoão Távora2022-07-141-5/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS.md: Mention change. * eglot.el (eglot--lsp-interface-alist): Add WorkspaceSymbol (eglot--workspace-symbols-cache): New variable. (eglot--recover-workspace-meta): New helper. (xref-backend-identifier-completion-table): Complicate. (xref-backend-definitions): Complicate. (completion-category-overrides): Register a category and a style here. (completion-styles-alist): Add eglot--lsp-backend-style style (eglot--lsp-backend-style-call): New funtion. (eglot--lsp-backend-style-all-completions): New function. (eglot--lsp-backend-style-try-completion): New function. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/131
| | * Prevent desktop.el from saving/restoring eglot--managed-modeJoão Távora2022-07-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although desktop.el compatibility is Emacs bughttps://github.com/joaotavora/eglot/issues/56407, the optimal solution agreed to there is a bit more work than what I have time to right now. See e.g. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=bug%2356407https://github.com/joaotavora/eglot/issues/68. For now, just use `with-eval-after-load' * eglot.el (Hacks desktop): Add eglot--managed-mode to desktop-minor-mode-handlers GitHub-reference: fix https://github.com/joaotavora/eglot/issues/990
| | * Apply any additionaltextedits unconditionallyJoão Távora2022-07-071-4/+4
| | | | | | | | | | | | | | | | | | * eglot.el (eglot-completion-at-point): Apply any additionalTextEdits unconditionally. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/981