[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eglot-inactive-regions 26f3b61b45 51/66: readme update
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eglot-inactive-regions 26f3b61b45 51/66: readme update |
Date: |
Fri, 6 Dec 2024 06:59:57 -0500 (EST) |
branch: elpa/eglot-inactive-regions
commit 26f3b61b45ff0b4c4ae0f2465a9cfb3b7c447a4e
Author: Filippo Argiolas <filippo.argiolas@gmail.com>
Commit: Filippo Argiolas <filippo.argiolas@gmail.com>
readme update
---
README.md | 65 ++++++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 39 insertions(+), 26 deletions(-)
diff --git a/README.md b/README.md
index e8c12c4dda..f93b54bc00 100644
--- a/README.md
+++ b/README.md
@@ -1,21 +1,25 @@
-# clangd-inactive-regions.el
+# eglot-inactive-regions
-## About
-
-Eglot extension to support the new clangd inactiveRegions LSP
-capability introduced in clangd-17.
+Emacs Eglot extension to visually style inactive preprocessor
+branches.
Highlights inactive code in a LSP aware way, taking into account
compile time includes and defines for current project.
-Listens to inactiveRegions notifications and shades them with one of
-the available-methods:
+## Features
+
+- **Visual indication of inactive code**: dimmed colors, shaded background or
custom face can be used to quickly identify disabled code sections.
+- **Automatic integration with eglot** when the `eglot-inactive-regions-mode`
global minor mode is enabled.
+
+### Styling methods
+* `darken-foreground` dims inactive code foreground colors
+* `shade-background` shades inactive code background (similar to eclipse
style)
+* `shadow-face` applies the shadow face (or any face you like) to inactive
code sections
+
+## Supported servers
-* `darken-foreground` makes inactive code semitransparent blending
- current foreground and background colors
-* `shade-background` makes inactive code background slightly darker or
- lighter depending on current theme
-* `shadow` applies the shadow face to inactive code
+- [clangd](https://clangd.llvm.org/) (since clangd-17) with
[inactiveRegions](https://github.com/clangd/clangd/issues/132) extension
+- [ccls](https://github.com/MaskRay/ccls) with skippedRanges extension. Still
experimenting with this. Poorly documented, seems to emit notifications only on
file save, feedback welcome!
## Screenshots
@@ -32,26 +36,35 @@ Windows code is correctly disabled.
![shade-background](./screenshots/shade-background-modus-operandi.png)
+## Requirements
+
+- emacs 29.1+
+- clangd with inactiveRegions support (clangd-17+)
+- ccls with skippedRanges support
+
## Installation
```lisp
-(unless (package-installed-p 'clangd-inactive-regions)
- (package-vc-install
"https://github.com/fargiolas/clangd-inactive-regions.el"))
+(unless (package-installed-p 'eglot-inactive-regions)
+ (package-vc-install "https://github.com/fargiolas/eglot-inactive-regions"))
```
-You will need at least emacs 29.1 and clangd-17.
-
## Usage
```lisp
-(use-package clangd-inactive-regions
- :init
- (add-hook 'eglot-managed-mode-hook #'clangd-inactive-regions-mode)
+(use-package eglot-inactive-regions
+ :custom
+ (eglot-inactive-regions-method 'darken-foreground)
+ (eglot-inactive-regions-opacity 0.4)
:config
- (clangd-inactive-regions-set-method "darken-foreground")
- (clangd-inactive-regions-set-opacity 0.55))
+ (eglot-inactive-regions-mode 1))
```
+## Customization
+
+`M-x customize-group inactive-regions` can be used to select the
+preferred shading style, customize text opacity and background shading
+or customize the base faces.
## Caveats
@@ -60,13 +73,13 @@ opacity. Best would be a face attribute so that you can set
it in an
overlay covering each inactive region and be done with it. Unfortunately
there is no attribute for this yet.
-Hence `darken-foreground` method is a fragile and inefficient hack around
-fontification: for each inactive region it looks for symbols with
-different faces and applies to each of them a different overlay with a
-dimmed foreground color.
+Hence `darken-foreground` method is a probably fragile and inefficient
+hack around fontification: for each inactive region it looks for
+symbols with different faces and applies to each of them a different
+overlay with a dimmed foreground color.
It seems to work with cc and c-ts modes and I've been using it daily
for more than a year now, but could totally break other modes or
features I'm not aware of.
-If you know a better way please do let me know.
\ No newline at end of file
+If you know a better way please do let me know.
- [nongnu] elpa/eglot-inactive-regions 8f341e9ad7 32/66: Minor cosmetics, (continued)
- [nongnu] elpa/eglot-inactive-regions 8f341e9ad7 32/66: Minor cosmetics, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 9f439654dc 27/66: Only run our fontification hook if our mode is enabled, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 42f37d0970 33/66: update README.md, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 5d1580f32b 38/66: fix docs and bump version, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions cd53f3244a 56/66: rename darken-foreground dimmed faces, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 437d09e552 53/66: revert to deprecated eglot functions, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions bf51947630 55/66: prefer when-let if no else clause is needed, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 193827fdeb 58/66: missing clangd references after rename, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 5c20f58422 60/66: clean up after review on emacs-devel, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 80c1b60009 44/66: Revert "revert to deprecated eglot functions", ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 26f3b61b45 51/66: readme update,
ELPA Syncer <=
- [nongnu] elpa/eglot-inactive-regions badb4e403a 46/66: cleanup on major mode changes, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions a810593308 59/66: bump version to 0.6, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 7e4eb584e0 61/66: fallback to deprecated functions, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 6ac373dfd0 62/66: bump version after emacs-devel review, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 3569bd5dc7 24/66: Properly enable/clean up state on minor mode toggle, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 3b248e0684 37/66: Update install section in README.md, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 3ca295f189 45/66: switch to global minor mode, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 15259e94b2 50/66: move to defcustoms for customization, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 5b48f4940d 54/66: rename shading method to shading style, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 2d93c0cab0 04/66: forgot some package comment, ELPA Syncer, 2024/12/06