You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the benefits this would bring to existing BookStack users
Ability to syntax-highlight Nix code :) That's all there is to it, really. Nix and NixOS are rapidly growing in adoption, and Bookstack is already packaged in NixOS, so this seems like it'd benefit some subset of other users too.
Can the goal of this request already be achieved via other means?
Yes; by patching the code and rebuilding the frontend JS assets. This doesn't seem like a sustainable solution however, as future additions of other languages are likely to break the patch, and so it makes upgrades significantly harder.
(A first-class "add your own syntax highlighters" mechanism would also be a viable solution, but I imagine that that'd be more development work, not less, at the current rate of syntax highlighting requests.)
Have you searched for an existing open/closed issue?
I have searched for existing issues and none cover my fundamental request
Thanks for the request @joepie91,
I usually limit the scope of languages to add to that officially supported by CodeMirror, for which this is not, otherwise it comes down to demand, so probably not one I'd look to add support for right away.
Describe the feature you'd like
Adding Nix to the supported languages for syntax highlighting, for example using this (CodeMirror 6) mode: https://github.com/replit/codemirror-lang-nix
Describe the benefits this would bring to existing BookStack users
Ability to syntax-highlight Nix code :) That's all there is to it, really. Nix and NixOS are rapidly growing in adoption, and Bookstack is already packaged in NixOS, so this seems like it'd benefit some subset of other users too.
Can the goal of this request already be achieved via other means?
Yes; by patching the code and rebuilding the frontend JS assets. This doesn't seem like a sustainable solution however, as future additions of other languages are likely to break the patch, and so it makes upgrades significantly harder.
(A first-class "add your own syntax highlighters" mechanism would also be a viable solution, but I imagine that that'd be more development work, not less, at the current rate of syntax highlighting requests.)
Have you searched for an existing open/closed issue?
How long have you been using BookStack?
Under 3 months
Additional context
This was prompted by me working on a wiki for learning NixOS, for which proper syntax highlighting is quite important: https://wiki.slightly.tech/books/learning-nixos
The text was updated successfully, but these errors were encountered: