emacs-elpa-diffs
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]