{"id":13646364,"url":"https://github.com/joaotavora/eglot","last_synced_at":"2025-05-14T09:13:41.422Z","repository":{"id":32506058,"uuid":"100435302","full_name":"joaotavora/eglot","owner":"joaotavora","description":"A client for Language Server Protocol servers","archived":false,"fork":false,"pushed_at":"2025-03-08T05:37:22.000Z","size":16469,"stargazers_count":2371,"open_issues_count":66,"forks_count":202,"subscribers_count":38,"default_branch":"master","last_synced_at":"2025-05-12T05:02:42.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joaotavora.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-16T01:41:16.000Z","updated_at":"2025-05-05T20:01:33.000Z","dependencies_parsed_at":"2025-03-26T22:33:41.814Z","dependency_job_id":null,"html_url":"https://github.com/joaotavora/eglot","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Feglot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Feglot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Feglot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joaotavora%2Feglot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joaotavora","download_url":"https://codeload.github.com/joaotavora/eglot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110448,"owners_count":22016392,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T01:02:53.751Z","updated_at":"2025-05-14T09:13:41.330Z","avatar_url":"https://github.com/joaotavora.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp","🛠️ Developer Tools"],"sub_categories":[],"readme":"[![Build status](https://github.com/joaotavora/eglot/actions/workflows/test.yml/badge.svg)][build-status]\n[![GNU ELPA](https://elpa.gnu.org/packages/eglot.svg)](https://elpa.gnu.org/packages/eglot.html)\n[![MELPA](https://melpa.org/packages/eglot-badge.svg)](https://melpa.org/#/eglot)\n\n# M-x Eglot\n\n*E*macs Poly*glot* is the Emacs [LSP][lsp] client that stays out of\nyour way:\n\n* 📽 Scroll down this README for some [pretty gifs](#animated_gifs)\n* 📚 Read Eglot's [manual][manual] and [release notes][release-notes]\n* 🏆 Folks over at Google [seem to like it][gospb].  Thanks!\n* 👾 Eglot now lives in [Emacs itself](#emacscore)!\n\nSee also [eglot-x][eglot-x] for non-standard protocol extensions support.\n\n# Get stable [GNU ELPA][gnuelpa] version\n\nJust type `M-x package-install RET eglot RET` into Emacs 26.3+.\n\nNow find some source file, any source file, and type `M-x eglot`.\n\n*That's it*. If you're lucky, this guesses the LSP program to start\nfor the language you're using.  Otherwise, it prompts you to enter\none.\n\n# Get latest development version from [GNU-Devel ELPA][gnudevelelpa]\n\nFirst, configure this repository.\n```lisp\n(add-to-list 'package-archives '(\"gnu-devel\" . \"https://elpa.gnu.org/devel/\"))\n```\n\nThen, use `M-x package-install` or `M-x package-update` to install\nan ELPA package from the latest upstream.\n\n\u003ca name=emacscore\u003e\u003c/a\u003e\n# Contribute to Eglot's development\n\n_**Eglot is now in Emacs's core!**_ Upcoming Emacs 29 will have `M-x\neglot` built-in.\n\nThe recommended way to experiment with changes to the latest Eglot is\nto [compile][compile-emacs1] [Emacs][compile-emacs2]\n[yourself][compile-emacs3-official].  \n\nFrom a development perspective, moving to core allows us to work on\nEglot in tandem with other related packages already in Emacs, such as\n[Flymake][flymake], [ElDoc][eldoc], [Xref][xref], [Project][project].\n\nThis means adding or tweaking an Emacs LSP feature is a matter of\nsubmitting a single patch targetting multiple relevant packages, not\njust Eglot.\n\nThese `:core` packages (Eglot included) are then released periodically\nto GNU ELPA, so users of other Emacs's versions can get them via\n`M-x package-install`.\n\n# Status of this GitHub repository\n\nThis repository is **not the development upstream anymore**, but it's\n**not** dead (yet):\n\n* It may be used to start [discussions][discussion].\n\n  Sometimes, it's possible the discussion or bug report will be moved\n  to [Emacs's bug tracker][emacs-bug-tracker-eglot].  You may take the\n  initiative and start discussion there using `M-x report-emacs-bug`\n  or simply sending mail to `bug-gnu-emacs@gnu.org`.\n  \n  Please the [Eglot-specific bug-reporting instructions][bug-reporting].\n  \n* The [`eglot.el`][eglot.el] file here is periodically updated to mirror\n  the [Emacs upstream][upstream-eglot.el]\n\n* The existing tests of [`eglot-tests.el`][eglot-tests.el], also\n  periodically updated, may be used to rehearse and validate patches\n  using [GitHub CI infrastructure][build-status].\n\n\u003ca name=\"connecting\"\u003e\u003c/a\u003e\n# Connecting to a server\n\nThese are just some of the servers that `M-x eglot` can use out of the\nbox.  The full list can be consulted in the `eglot-server-programs`\nvariable, where you can [easily add your own servers][manual].\n\n* Ada's [ada_language_server][ada_language_server]\n* Bash's [bash-language-server][bash-language-server]\n* C/C++'s [clangd][clangd] or [ccls][ccls]\n* C#'s [omnisharp][omnisharp]\n* Clojure's [clojure-lsp][clojure-lsp]\n* CMake's [cmake-language-server][cmake-language-server]\n* CSS's [css-languageserver][css-languageserver]\n* Dart's [analysis_server][dart-analysis-server]\n* Dockerfile's [docker-langserver][docker-langserver]\n* Elixir's [elixir-ls][elixir-ls]\n* Elm's [elm-language-server][elm-language-server]\n* Erlang's [erlang_ls][erlang_ls]\n* Fortran's [fortls][fortls]\n* Futhark's [futhark lsp][futhark-lsp]\n* Go's [gopls][gopls]\n* Godot Engine's [built-in LSP][godot]\n* HTML [html-languageserver][html-languageserver]\n* Haskell's [haskell-language-server][haskell-language-server]\n* JSON's [vscode-json-languageserver][vscode-json-languageserver]\n* Java's [Eclipse JDT Language Server][eclipse-jdt]\n* Javascript's [TS \u0026 JS Language Server][typescript-language-server]\n* Kotlin's [kotlin-language-server][kotlin-language-server]\n* Lua's [lua-lsp][lua-lsp]\n* Markdown's [marksman][marksman]\n* Mint's [mint-ls][mint-ls]\n* Nix's [rnix-lsp][rnix-lsp]\n* Ocaml's [ocaml-lsp][ocaml-lsp]\n* Perl's [Perl::LanguageServer][perl-language-server]\n* PHP's [php-language-server][php-language-server]\n* PureScript's [purescript-language-server][purescript-language-server]\n* Python's [pylsp][pylsp], [pyls][pyls] [pyright][pyright], or [jedi-language-server][jedi-language-server]\n* R's [languageserver][r-languageserver]\n* Racket's [racket-langserver][racket-langserver]\n* Ruby's [solargraph][solargraph]\n* Rust's [rust-analyzer][rust-analyzer]\n* Scala's [metals][metals]\n* TeX/LaTeX's [Digestif][digestif] ot [texlab][texlab]\n* VimScript's [vim-language-server][vim-language-server]\n* YAML's [yaml-language-server][yaml-language-server]\n* Zig's [zls][zls]\n\n\u003ca name=\"animated_gifs\"\u003e\u003c/a\u003e\n# _Obligatory animated gif section_\n\n## Completion\n![eglot-completions](./gif-examples/eglot-completions.gif)\n\nThe animation shows [company-mode][company] presenting the completion\ncandidates to the user, but Eglot works with the built-in\n`completion-at-point` function as well, which is usually bound to\n`C-M-i`.\n\n## Snippet completion\n![eglot-snippets-on-completion](./gif-examples/eglot-snippets-on-completion.gif)\n\nEglot provides template based completion if the server supports\nsnippet completion and [yasnippet][yasnippet] is enabled _before_\nEglot connects to the server.  The animation shows\n[company-mode][company], but `completion-at-point` also works with\nsnippets.\n\n## Diagnostics\n![eglot-diagnostics](./gif-examples/eglot-diagnostics.gif)\n\nEglot relays the diagnostics information received from the LSP server\nto Emacs's [Flymake][flymake], which annotates/underlines the\nproblematic parts of the buffer.  The information is shared with the\n[ElDoc][eldoc] system, meaning that the commands `eldoc` and\n`eldoc-doc-buffer` (the latter bound to `C-h-.` for convenience) show\ndiagnostics along with other documentation under point.\n\n[Flymake][flymake] provides other convenient ways to view and manage\ndiagnostic errors.  These are described in its [manual][flymake].\n\nWhen Eglot manages a buffer, it disables pre-existing Flymake\nbackends.  See variable `eglot-stay-out-of` to change that.\n\n## Code Actions\n![eglot-code-actions](./gif-examples/eglot-code-actions.gif)\n\nThe LSP server may provide code actions, for example, to fix a\ndiagnostic error or to suggest refactoring edits.  The commands are\nfrequently associating with Flymake diagnostic annotations, so that\nleft-clicking them shows a menu.  Additionally, the command\n`eglot-code-actions` asks the server for any code spanning a given\nregion.\n\nSometimes, these code actions are initiated by the server.  See\n`eglot-confirm-server-initiated-edits` to control that behaviour.\n\n## Hover on symbol /function signature\n![eglot-hover-on-symbol](./gif-examples/eglot-hover-on-symbol.gif)\n\nHere, too, the LSP server's view of a given symbol or function\nsignature is relayed to the [ElDoc][eldoc] system.  The commands\n`eldoc` and `eldoc-doc-buffer` commands access that information.\n\nThere are customization variables to help adjust [ElDoc][eldoc]'s\nliberal use of the lower \"echo area\", among other options.  If you\nstill find the solicitous nature of this LSP feature too distracing,\nyou can use `eglot-ignored-server-capabilities` to turn it off.\n\n## Rename\n![eglot-rename](./gif-examples/eglot-rename.gif)\n\nType `M-x eglot-rename RET` to rename the symbol at point.\n\n## Find definition\n![eglot-xref-find-definition](./gif-examples/eglot-xref-find-definition.gif)\n\nTo jump to the definition of a symbol, use the built-in\n`xref-find-definitions` command, which is bound to `M-.`.\n\n## Find references\n![eglot-xref-find-references](./gif-examples/eglot-xref-find-references.gif)\n\nEglot here relies on Emacs' built-in functionality as well.\n`xref-find-references` is bound to `M-?`.  Additionally, Eglot\nprovides the following similar commands: `eglot-find-declaration`,\n`eglot-find-implementation`, `eglot-find-typeDefinition`.\n\n# Historical differences to lsp-mode.el\n\nAround May 2018, I wrote a comparison of Eglot to `lsp-mode.el`, and\nwas discussed with its then-maintainer.  That mode has since been\nrefactored/rewritten and now\n[purports to support](https://github.com/joaotavora/eglot/issues/180)\na lot of features that differentiated Eglot from it.  It may now be\nvery different or very similar to Eglot, or even sing with the birds\nin the trees, so [go check it out][emacs-lsp].  That said, here's the\noriginal comparison, which I will not be updating any more.\n\n\"Eglot is considerably less code and hassle than lsp-mode.el.  In most\ncases, there's nothing to configure.  It's a minimalist approach\nfocused on user experience and performance.\n\nUser-visible differences:\n\n- The single most visible difference is the friendly entry point `M-x\n  eglot`, not `M-x eglot-\u003clanguage\u003e`.  Also, there are no\n  `eglot-\u003clanguage\u003e` extra packages.\n\n- There's no \"whitelisting\" or \"blacklisting\" directories to\n  languages.  `M-x eglot` starts servers to handle file of a major\n  mode inside a specific project, using Emacs's built-in `project.el`\n  library to discover projects.  Then it automatically detects current\n  and future opened files under that project and syncs with server;\n\n- Easy way to quit/restart a server, just middle/right click on the\n  connection name;\n- Pretty interactive mode-line section for live tracking of server\n  communication;\n- Automatically restarts frequently crashing servers;\n- Slow-to-start servers start asynchronously in the background;\n- Server-initiated edits are confirmed with the user;\n- Diagnostics work out-of-the-box (no `flycheck.el` needed);\n- Smoother/more responsive (read below).\n   \nUnder the hood:\n\n- Message parser is much simpler.\n- Defers signature requests like `textDocument/hover` until server is\n  ready.\n- Sends `textDocument/didChange` for groups of edits, not\n  one per each tiny change.\n- Easier to read and maintain elisp. Yeah I know, *very subjective*,\n  so judge for yourself.\n- Doesn't *require* anything other than Emacs, but will automatically\n  upgrade to work with stuff outside Emacs, like `company`,\n  `markdown-mode`, if you happen to have these installed.\n- Has automated tests that check against actual LSP servers.\"\n\n# Copyright Assignment\n\n`Eglot` is subject to the same [copyright assignment][copyright-assignment]\npolicy as `GNU Emacs`.\n\nAny [legally significant][legally-significant] contributions can only\nbe merged after the author has completed their paperwork.  Please ask\nfor the request form, and we'll send it to you.\n\n\u003c!-- Language servers --\u003e\n[ada_language_server]: https://github.com/AdaCore/ada_language_server\n[bash-language-server]: https://github.com/mads-hartmann/bash-language-server\n[clangd]: https://clang.llvm.org/extra/clangd.html\n[omnisharp]: https://github.com/OmniSharp/omnisharp-roslyn\n[clojure-lsp]: https://clojure-lsp.io\n[cmake-language-server]: https://github.com/regen100/cmake-language-server\n[css-languageserver]: https://github.com/hrsh7th/vscode-langservers-extracted\n[dart-analysis-server]: https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md\n[elixir-ls]: https://github.com/elixir-lsp/elixir-ls\n[elm-language-server]: https://github.com/elm-tooling/elm-language-server\n[fortls]: https://github.com/hansec/fortran-language-server\n[futhark-lsp]: https://futhark-lang.org\n[gopls]: https://github.com/golang/tools/tree/master/gopls\n[godot]: https://godotengine.org\n[html-languageserver]: https://github.com/hrsh7th/vscode-langservers-extracted\n[haskell-language-server]: https://github.com/haskell/haskell-language-server\n[jedi-language-server]: https://github.com/pappasam/jedi-language-server\n[vscode-json-languageserver]: https://github.com/hrsh7th/vscode-langservers-extracted\n[eclipse-jdt]: https://github.com/eclipse/eclipse.jdt.ls\n[typescript-language-server]: https://github.com/theia-ide/typescript-language-server\n[kotlin-language-server]: https://github.com/fwcd/KotlinLanguageServer\n[lua-lsp]: https://github.com/Alloyed/lua-lsp\n[marksman]: https://github.com/artempyanykh/marksman\n[mint-ls]: https://www.mint-lang.com/\n[rnix-lsp]: https://github.com/nix-community/rnix-lsp\n[ocaml-lsp]: https://github.com/ocaml/ocaml-lsp/\n[perl-language-server]: https://github.com/richterger/Perl-LanguageServer\n[php-language-server]: https://github.com/felixfbecker/php-language-server\n[purescript-language-server]: https://github.com/nwolverson/purescript-language-server\n[pyls]: https://github.com/palantir/python-language-server\n[pylsp]: https://github.com/python-lsp/python-lsp-server\n[pyright]: https://github.com/microsoft/pyright\n[r-languageserver]: https://cran.r-project.org/package=languageserver\n[racket-langserver]: https://github.com/jeapostrophe/racket-langserver\n[solargraph]: https://github.com/castwide/solargraph\n[rust-analyzer]: https://github.com/rust-analyzer/rust-analyzer\n[metals]: https://scalameta.org/metals/\n[digestif]: https://github.com/astoff/digestif\n[texlab]: https://github.com/latex-lsp/texlab\n[vim-language-server]: https://github.com/iamcco/vim-language-server\n[yaml-language-server]: https://github.com/redhat-developer/yaml-language-server\n[zls]: https://github.com/zigtools/zls\n\n\u003c!-- Other references --\u003e\n[manual]: https://joaotavora.github.io/eglot\n[lsp]: https://microsoft.github.io/language-server-protocol/\n[company-mode]: https://github.com/company-mode/company-mode\n[ccls]: https://github.com/MaskRay/ccls\n[cquery]: https://github.com/cquery-project/cquery\n[docker-langserver]: https://github.com/rcjsuen/dockerfile-language-server-nodejs\n[emacs-lsp-plugins]: https://github.com/emacs-lsp\n[emacs-lsp]: https://github.com/emacs-lsp/lsp-mode\n[erlang_ls]: https://github.com/erlang-ls/erlang_ls\n[gnuelpa]: https://elpa.gnu.org/packages/eglot.html\n[gnudevelelpa]: https://elpa.gnu.org/devel/eglot.html\n[melpa]: https://melpa.org/#/eglot\n[news]: https://github.com/joaotavora/eglot/blob/master/NEWS.md\n[windows-subprocess-hang]: https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/Subprocess-hang.html\n[company]: https://elpa.gnu.org/packages/company.html\n[flymake]: https://www.gnu.org/software/emacs/manual/html_node/flymake/index.html#Top\n[xref]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Xref.html\n[imenu]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Imenu.html\n[eldoc]: https://github.com/emacs-mirror/emacs/blob/master/lisp/emacs-lisp/eldoc.el\n[yasnippet]: https://elpa.gnu.org/packages/yasnippet.html\n[markdown]: https://github.com/defunkt/markdown-mode\n[gospb]: https://opensource.googleblog.com/2020/10/announcing-latest-google-open-source.html\n[copyright-assignment]: https://www.fsf.org/licensing/contributor-faq\n[legally-significant]: https://www.gnu.org/prep/maintain/html_node/Legally-Significant.html#Legally-Significant\n[dir-locals-emacs-manual]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html\n[configuration-request]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration\n[did-change-configuration]: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_didChangeConfiguration\n[json-serialize]: https://www.gnu.org/software/emacs/manual/html_node/elisp/Parsing-JSON.html\n[plist]: https://www.gnu.org/software/emacs/manual/html_node/elisp/Property-Lists.html\n[discussion]: https://github.com/joaotavora/eglot/discussions\n[upstream-eglot.el]: https://github.com/emacs-mirror/emacs/blob/master/lisp/progmodes/eglot.el\n[eglot.el]: https://github.com/joaotavora/eglot/blob/master/eglot.el\n[eglot-tests.el]: https://github.com/joaotavora/eglot/blob/master/eglot-tests.el\n[announcement]: https://github.com/joaotavora/eglot/discussions\n[compile-emacs1]: https://lars.ingebrigtsen.no/2014/11/13/welcome-new-emacs-developers/\n[compile-emacs2]: https://batsov.com/articles/2021/12/19/building-emacs-from-source-with-pgtk/\n[compile-emacs3-official]: https://github.com/emacs-mirror/emacs/blob/master/INSTALL\n[emacs-bug-tracker-eglot]: https://debbugs.gnu.org/cgi/pkgreport.cgi?include=subject%3Aeglot;package=emacs\n[bug-reporting]: https://joaotavora.github.io/eglot/#Troubleshooting-Eglot\n[project]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Projects.html\n[emacs-upstream]: https://github.com/emacs-mirror/emacs\n[release-notes]: https://github.com/emacs-mirror/emacs/blob/master/etc/EGLOT-NEWS\n[build-status]: https://github.com/joaotavora/eglot/actions/workflows/test.yml\n[eglot-x]: https://github.com/nemethf/eglot-x\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaotavora%2Feglot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoaotavora%2Feglot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoaotavora%2Feglot/lists"}