{"id":23097102,"url":"https://github.com/emacs-sideline/sideline","last_synced_at":"2025-04-03T20:15:50.955Z","repository":{"id":37455443,"uuid":"502982445","full_name":"emacs-sideline/sideline","owner":"emacs-sideline","description":"Show information on the side","archived":false,"fork":false,"pushed_at":"2025-03-11T21:49:40.000Z","size":418,"stargazers_count":158,"open_issues_count":2,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-11T22:25:35.112Z","etag":null,"topics":["elisp","emacs","emacs-lisp","sideline"],"latest_commit_sha":null,"homepage":"","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/emacs-sideline.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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},"funding":{"github":["emacs-sideline","jcs090218"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-06-13T14:06:37.000Z","updated_at":"2025-03-11T21:49:42.000Z","dependencies_parsed_at":"2024-05-20T23:48:12.392Z","dependency_job_id":"a77eb19e-2033-41d9-9834-a20a658e904a","html_url":"https://github.com/emacs-sideline/sideline","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-sideline%2Fsideline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-sideline%2Fsideline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-sideline%2Fsideline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emacs-sideline%2Fsideline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emacs-sideline","download_url":"https://codeload.github.com/emacs-sideline/sideline/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247070927,"owners_count":20878586,"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":["elisp","emacs","emacs-lisp","sideline"],"created_at":"2024-12-16T22:51:58.076Z","updated_at":"2025-04-03T20:15:50.935Z","avatar_url":"https://github.com/emacs-sideline.png","language":"Emacs Lisp","funding_links":["https://github.com/sponsors/emacs-sideline","https://github.com/sponsors/jcs090218","https://www.paypal.me/jcs090218","https://www.patreon.com/jcs090218"],"categories":[],"sub_categories":[],"readme":"[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![JCS-ELPA](https://raw.githubusercontent.com/jcs-emacs/badges/master/elpa/v/sideline.svg)](https://jcs-emacs.github.io/jcs-elpa/#/sideline)\n[![MELPA](https://melpa.org/packages/sideline-badge.svg)](https://melpa.org/#/sideline)\n[![MELPA Stable](https://stable.melpa.org/packages/sideline-badge.svg)](https://stable.melpa.org/#/sideline)\n\n\u003ca href=\"#\"\u003e\u003cimg align=\"right\" src=\"./etc/logo.png\" width=\"20%\"\u003e\u003c/a\u003e\n# sideline\n\u003e Show informations on the side\n\n[![CI](https://github.com/emacs-sideline/sideline/actions/workflows/test.yml/badge.svg)](https://github.com/emacs-sideline/sideline/actions/workflows/test.yml)\n\nThis library provides the frontend UI to display information either on the\nleft/right side of the buffer window.\n\n*📝 P.S. The implementation is extracted and modified from [lsp-ui-sideline](https://github.com/emacs-lsp/lsp-ui#lsp-ui-sideline).*\n\n\u003c!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc --\u003e\n**Table of Contents**\n\n- [sideline](#sideline)\n  - [❓ Why?](#-why)\n  - [🔨 Quickstart](#-quickstart)\n    - [👥 Configure backends](#-configure-backends)\n  - [📌 Define your own backend](#-define-your-own-backend)\n  - [❓ FAQ](#-faq)\n    - [💫 Why is sideline not being render?](#-why-is-sideline-not-being-render)\n    - [💫 How to force render the sideline on the next command?](#-how-to-force-render-the-sideline-on-the-next-command)\n  - [📂 Example projects](#-example-projects)\n  - [🛠️ Contribute](#-contribute)\n    - [🔬 Development](#-development)\n  - [⚜️ License](#-license)\n\n\u003c!-- markdown-toc end --\u003e\n\n## ❓ Why?\n\nMany packages offer similar features, but it's impossible to use multiple packages with\nsimilar functionality simultaneously because each implements its solution differently.\nThis often results in display errors and conflicts between the packages' implementations.\n\nSideline provides a universal interface that seamlessly combines these features by utilizing\nsimple backend rules. Rather than relying on hard-coded information, it separates the data\ninto multiple distinct backends. This approach offers greater flexibility and configurability,\nallowing users to customize the information they want to display.\n\nHere are some examples of packages with similar functionality:\n\n- [lsp-ui-sideline.el](https://github.com/emacs-lsp/lsp-ui/blob/master/lsp-ui-sideline.el) (`sideline.el` is inspired from this package)\n- [eglot](https://github.com/joaotavora/eglot)\n- [blamer](https://github.com/Artawower/blamer.el)\n- [eros](https://github.com/xiongtx/eros)\n- and others.\n\nAdditionally, the above packages can be replaced by:\n\n```elisp\n(use-package sideline\n  :init\n  (setq sideline-backends-right '(sideline-lsp       ; `lsp-ui-sideline.el'\n                                  sideline-flycheck  ; `lsp-mode' uses `flycheck' by default\n                                  sideline-eglot     ; `eglot'\n                                  sideline-flymake   ; `eglot' uses `flymake' by default\n                                  sideline-blame     ; For `blamer'\n                                  sideline-eros)))   ; For `eros'\n```\n\n## 🔨 Quickstart\n\n```elisp\n(use-package sideline\n  :init\n  (setq sideline-backends-left-skip-current-line t   ; don't display on current line (left)\n        sideline-backends-right-skip-current-line t  ; don't display on current line (right)\n        sideline-order-left 'down                    ; or 'up\n        sideline-order-right 'up                     ; or 'down\n        sideline-format-left \"%s   \"                 ; format for left aligment\n        sideline-format-right \"   %s\"                ; format for right aligment\n        sideline-priority 100                        ; overlays' priority\n        sideline-display-backend-name t))            ; display the backend name\n```\n\nThen you enable `sideline-mode` depends on the backend you use. For example:\n\n```elisp\n(use-package sideline\n  :hook ((flycheck-mode . sideline-mode)   ; for `sideline-flycheck`\n         (flymake-mode  . sideline-mode))  ; for `sideline-flymake`\n  ...\n```\n\nSome backends require extra setup. `sideline-flycheck` is one of that backends:\n\n```elisp\n(use-package sideline-flycheck\n  :hook (flycheck-mode . sideline-flycheck-setup))\n```\n\nOr simply `M-x sideline-mode`!\n\n### 👥 Configure backends\n\nThe most basic way to set up the backends for sideline.\n\n```elisp\n(use-package sideline\n  :init\n  (setq sideline-backends-left '(sideline-flycheck)\n        sideline-backends-right '(sideline-lsp)))\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./etc/1.png\" width=\"70%\"/\u003e\n\u003c/p\u003e\n\nAlternatively, you could set it to cons cell with the search order.\n\n```elisp\n(use-package sideline\n  :init\n  (setq sideline-backends-right '((sideline-lsp      . up)\n                                  (sideline-flycheck . down))))\n```\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./etc/2.png\" width=\"70%\"/\u003e\n\u003c/p\u003e\n\n## 📌 Define your own backend\n\nFollowing is an example code to define your own sideline backend:\n\n```elisp\n(defun my-backend (command)\n  \"Example backend.\"\n  (cl-case command\n    (`candidates '(\"info 1\" \"info 2\" \"info 3\"))  ; required\n    (`action (lambda (candidate \u0026rest _)   ; optional\n               (message \"Execute command for `%s`!\" candidate)))))\n```\n\nor define it asynchronously:\n\n```elisp\n(defun my-backend-async (command)\n  \"Example async backend.\"\n  (cl-case command\n    (`candidates (cons :async (lambda (callback \u0026rest _)\n                                (funcall callback '(\"info 1\" \"info 2\" \"info 3\")))))\n    (`action ...)))\n```\n\nthen you can tell your user to...\n\n```elisp\n(setq sideline-backends-left '(my-backend))  ; use `sideline-backends-right' for right alignment\n```\n\nHere is a list of supported commands:\n\n- `candidates` - list of strings to display; accept async function\n- `action` - (optional) callback function after the mouse click\n- `face` - (optional) face overrides the default sideline face\n- `name` - (optional) backend name to display\n\n## ❓ FAQ\n\n### 💫 Why is sideline not being render?\n\n`sideline` omit the information by default when the message is too long to\ndisplay on the screen. You can force display these long messages by doing:\n\n```elisp\n(setq sideline-force-display-if-exceeds t)  ; display it regardless the message length\n```\n\nor\n\n```elisp\n(setq sideline-truncate t)  ; force display but truncate it when too long\n```\n\n*📝 P.S. `sideline-truncate` is enabled by default after version `0.3.0`!*\n\n### 💫 How to force render the sideline on the next command?\n\nYou can force update sideline by adding a hook or advice with the function\n`sideline-render-this`.\n\n```elisp\n(add-hook 'ts-fold-on-fold-hook #'sideline-render-this)\n```\n\n## 📂 Example projects\n\n- [sideline-blame](https://github.com/emacs-sideline/sideline-blame)\n- [sideline-flycheck](https://github.com/jcs-elpa/sideline-flycheck)\n- [sideline-flymake](https://github.com/emacs-sideline/sideline-flymake)\n- [sideline-lsp](https://github.com/jcs-elpa/sideline-lsp)\n- [sideline-eldoc](https://github.com/ginqi7/sideline-eldoc)\n- [sideline-color](https://github.com/emacs-sideline/sideline-color)\n- [sideline-load-cost](https://github.com/emacs-sideline/sideline-load-cost)\n\n## 🛠️ Contribute\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n[![Elisp styleguide](https://img.shields.io/badge/elisp-style%20guide-purple)](https://github.com/bbatsov/emacs-lisp-style-guide)\n[![Donate on paypal](https://img.shields.io/badge/paypal-donate-1?logo=paypal\u0026color=blue)](https://www.paypal.me/jcs090218)\n[![Become a patron](https://img.shields.io/badge/patreon-become%20a%20patron-orange.svg?logo=patreon)](https://www.patreon.com/jcs090218)\n\nIf you would like to contribute to this project, you may either\nclone and make pull requests to this repository. Or you can\nclone the project and establish your own branch of this tool.\nAny methods are welcome!\n\n### 🔬 Development\n\nTo run the test locally, you will need the following tools:\n\n- [Eask](https://emacs-eask.github.io/)\n- [Make](https://www.gnu.org/software/make/) (optional)\n\nInstall all dependencies and development dependencies:\n\n```sh\neask install-deps --dev\n```\n\nTo test the package's installation:\n\n```sh\neask package\neask install\n```\n\nTo test compilation:\n\n```sh\neask compile\n```\n\n**🪧 The following steps are optional, but we recommend you follow these lint results!**\n\nThe built-in `checkdoc` linter:\n\n```sh\neask lint checkdoc\n```\n\nThe standard `package` linter:\n\n```sh\neask lint package\n```\n\n*📝 P.S. For more information, find the Eask manual at https://emacs-eask.github.io/.*\n\n## ⚜️ License\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\nSee [`LICENSE`](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femacs-sideline%2Fsideline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femacs-sideline%2Fsideline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femacs-sideline%2Fsideline/lists"}