User talk:Most2dot0
Scribunto
We now have Lua modules (output of example module: Hello World!) with syntax highlighting and a special code editor for editing the module pages (and user CSS and JS pages — see, "Appearance" in your Preferences). To use the code editor, you have to have "Enable the editing toolbar" selected in your preferences (under "Editing"). Unfortunately, the font used in the code editor is hardcoded to a tiny size (for me, anyway), and user CSS cannot override that (and almost certainly not sitewide CSS either, although I have not tried that). Note that you can toggle between the code editor and the normal "source" editor (i.e., the one used for normal wikitext) using the "<>" icon in the upper-left corner of the code editor (the icon is not shown when editing normal wiki pages). Happy coding… (BTW, if you reply, please do so here and not on my user page, so the discussion stays in one place.) - dcljr (talk) 00:59, 24 July 2024 (UTC)
- Thanks, Lua seems to work fine. Though I wonder, if this is a different editor than the one on Wikipedia, or if it is differently configured? One thing I noticed is that there is no special support for JSON files, whereas on Wikipedia, there is a syntax check that is helpful. They also have a special view for them outside of the editor (but that's less important, thought it can be convinient to understand the content). ~ Most2dot0 (talk) 23:16, 28 July 2024 (UTC)
- Not surprising that it's different on Wikimedia sites. If you can find out what is causing the differences, I can look into maybe enabling/installing those things here. Speaking of differences, do you see OK font sizes in both the Code Editor and the regular source editor? For me, it's very much smaller in the Code Editor. I have been reminded that I set up a site-wide override for the editor font size in MediaWiki:vector.css back when I first started using the wiki. That has no effect in the Code Editor, though. If you'd like, I can delete that and instead use my own per-user "vector.css" or "common.css" for myself. I have also been reminded that I have my own User:Dcljr/common.js that provides syntax highlighting in the regular "source" editor, which is very helpful when editing templates. I can try to set that up site-wide through the CodeMirror extension (which allows you to turn it on and off in the editor). Or you can copy the code in my "common.js" to yours (accessible through your preferences), if you'd like to try it out. - dcljr (talk) 06:29, 30 July 2024 (UTC)
- I'd say the size in the code editor is indeed very small, and I usually enlarge it using the zoom feature of the browser. However, it's not smaller than e.g. the Wiki menu on the left (below your Wiki's logo), or like text in article pages. So it's more a general problem. The one in the normal editor is indeed larger, maybe a nod larger than needed. But I have no issue with that. For the syntax highlighting, I copied your .js file. It looks like a help indeed, though the highlighting of the background instead of the font is somewhat unusual. ~ Most2dot0 (talk) 16:36, 30 July 2024 (UTC)
- Not surprising that it's different on Wikimedia sites. If you can find out what is causing the differences, I can look into maybe enabling/installing those things here. Speaking of differences, do you see OK font sizes in both the Code Editor and the regular source editor? For me, it's very much smaller in the Code Editor. I have been reminded that I set up a site-wide override for the editor font size in MediaWiki:vector.css back when I first started using the wiki. That has no effect in the Code Editor, though. If you'd like, I can delete that and instead use my own per-user "vector.css" or "common.css" for myself. I have also been reminded that I have my own User:Dcljr/common.js that provides syntax highlighting in the regular "source" editor, which is very helpful when editing templates. I can try to set that up site-wide through the CodeMirror extension (which allows you to turn it on and off in the editor). Or you can copy the code in my "common.js" to yours (accessible through your preferences), if you'd like to try it out. - dcljr (talk) 06:29, 30 July 2024 (UTC)