Comments (9)
Hmm... interesting. I tested it with only that in my
config.el
and it worked for me. Can you provide your configuration in a gist and I'll test more with what you have configured?
reversing the commands actually worked, interesting
my config is on my gitlab
but it actually works now :-)
from crafted-emacs.
In your rational-config-file
you can add (customize-set-variable 'display-line-numbers-type 'relative)
to use relative line numbers. For example, you might have something like this:
(require 'rational-ui)
(with-eval-after-load "rational-ui"
(customize-set-variable 'rational-ui-display-line-numbers t)
(customize-set-variable 'display-line-numbers-type 'relative))
Does this help? If this addresses your issue, would you consider closing this issue? If not, please continue the discussion and we will help as best we can.
from crafted-emacs.
In your
rational-config-file
you can add(customize-set-variable 'display-line-numbers-type 'relative)
to use relative line numbers. For example, you might have something like this:(require 'rational-ui) (with-eval-after-load "rational-ui" (customize-set-variable 'rational-ui-display-line-numbers t) (customize-set-variable 'display-line-numbers-type 'relative))Does this help? If this addresses your issue, would you consider closing this issue? If not, please continue the discussion and we will help as best we can.
this seems to not have worked
might be an issue with the majormode not being in the "whitelist" but it shouldn`t be as it should be "derived" from prog-mode
from crafted-emacs.
update
this seems to work but is ugly and might be the wrong way of doing it
(with-eval-after-load "rational-ui"
(global-display-line-numbers-mode nil)
(customize-set-variable 'display-line-numbers-type 'relative)
(setq display-line-numbers-type 'relative)
(customize-set-variable 'rational-ui-display-line-numbers t)
(global-display-line-numbers-mode t)
)
from crafted-emacs.
update
this seems to work but is ugly and might be the wrong way of doing it
(with-eval-after-load "rational-ui" (global-display-line-numbers-mode nil) (customize-set-variable 'display-line-numbers-type 'relative) (setq display-line-numbers-type 'relative) (customize-set-variable 'rational-ui-display-line-numbers t) (global-display-line-numbers-mode t) )
this seems to be the smallest possible fix at the moment,
i personally think that it should be part of the module but i will close the issue as its now fixed for me.
anyone should feel free to (re)open an issue or create a PR if you have a "better"(different/cleaner/smaller) solution that works
(with-eval-after-load "rational-ui"
(global-display-line-numbers-mode nil)
(customize-set-variable 'display-line-numbers-type 'relative)
(customize-set-variable 'rational-ui-display-line-numbers t)
(global-display-line-numbers-mode t)
)
from crafted-emacs.
Notice the order I call things in the example I provide. I customize the rational-ui-display-line-numbers
variable before customizing the display-line-numbers-type
value. In your examples, you invert that. Also, you use global-display-line-numbers-mode
which I assume means you prefer to have line numbers displayed regardless of which major mode is being used. In this case, you don't need rational-ui
at all (at least for the line-numbers configuration), these lines should do what you want:
;; don't need to use line number configuration in rational-ui if you want line numbers always displayed
(customize-set-variable 'display-line-numbers-type 'relative)
(global-display-line-numbers-mode)
And just to keep things close together, the original example:
(require 'rational-ui)
(with-eval-after-load "rational-ui"
;; N.B. line numbers in rational-ui only turn them on for conf-mode and prog-mode (and derivatives)
;; line numbers are turned off in org-mode
;; order matters here.
(customize-set-variable 'rational-ui-display-line-numbers t) ; must be set first as it configures modes for line numbers
(customize-set-variable 'display-line-numbers-type 'relative)) ; configured after the line above to set the type to preference
Hope this helps!
from crafted-emacs.
(with-eval-after-load "rational-ui"
;; N.B. line numbers in rational-ui only turn them on for conf-mode and prog-mode (and derivatives)
;; line numbers are turned off in org-mode
;; order matters here.
(customize-set-variable 'rational-ui-display-line-numbers t) ; must be set first as it configures modes for line numbers
(customize-set-variable 'display-line-numbers-type 'relative)) ; configured after the line above to set the type to preference
i tried this and it didnt work
from crafted-emacs.
Hmm... interesting. I tested it with only that in my config.el
and it worked for me. Can you provide your configuration in a gist and I'll test more with what you have configured?
from crafted-emacs.
nevermind
from crafted-emacs.
Related Issues (20)
- [craftedv2beta] Broken configuration guards (Tracking Issue) HOT 4
- [craftedv2beta] Improve documentation for using straight.el HOT 7
- Provide option for easier module loading. HOT 7
- [craftedv2beta] Use `customize-save-variable` vs. `customize-set-variable`? HOT 11
- [craftedv2beta] Question regarding the skeleton for new modules HOT 5
- Discussion: When do our own `defcustom` variables make sense? When are they best avoided? HOT 6
- [craftedv2beta] Evil bindings in crafted-speedbar are duplicate and inconsistent with evil-collection HOT 3
- [craftedv2beta] Standardized way for naming functions HOT 5
- [craftedv2beta] Unused function `crafted-completion/minibuffer-backward-kill` HOT 2
- texinfo tags in doc headings don't seem to be needed HOT 3
- [v2] Emacs 29+ check for executable prevents Treesitter setup HOT 12
- [v2] No easy way to opt out of tree sitter parsers HOT 5
- [v2] Corfu + Eglot have unsuitable performance for medium/large projects HOT 4
- [v2] defgroup crafted-startup not functioning properly
- [v2]package-selected-packages "Combobulate" problem. HOT 3
- Automating regeneration of Info file HOT 13
- Suggestion: Make examples loadable HOT 3
- Symbol's function definition is void: treesit-auto-add-to-auto-mode-alist HOT 3
- `crafted-init-config` automatically finding directory possibly confounded by submodule use HOT 9
- Eglot doesn't automatically load when a relevant mode is visited until explicitly required HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crafted-emacs.