mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 18:07:58 +01:00
Moderately different (and probably jarring) :*usage definition information.
This commit is contained in:
@@ -232,6 +232,11 @@ const ConfigBase = Class(ModuleBase, {
|
||||
Keyword color: red;
|
||||
Tag color: blue;
|
||||
|
||||
Usage
|
||||
LineInfo
|
||||
Usage>LineInfo display: none;
|
||||
Usage:hover>LineInfo display: inline;
|
||||
|
||||
!StatusLine color: white !important; background: black !important
|
||||
StatusLineBroken color: black !important; background: #FFa0a0 !important /* light-red */
|
||||
StatusLineSecure color: black !important; background: #a0a0FF !important /* light-blue */
|
||||
|
||||
@@ -148,7 +148,7 @@ const Highlights = Module("Highlight", {
|
||||
*/
|
||||
selector: function (class_)
|
||||
let (self = this)
|
||||
class_.replace(/(^|\s)([A-Z]\w+)\b/g,
|
||||
class_.replace(/(^|[>\s])([A-Z]\w+)\b/g,
|
||||
function (m, n1, hl) n1 +
|
||||
(self.highlight[hl] && self.highlight[hl].class != class_
|
||||
? self.highlight[hl].selector : "[dactyl|highlight~=" + hl + "]")),
|
||||
|
||||
@@ -294,12 +294,16 @@ const Template = Module("Template", {
|
||||
{
|
||||
this.map(iter, function (item)
|
||||
<tr>
|
||||
<td highlight="Title" style="padding-right: 20px">{
|
||||
<td style="padding-right: 20px" highlight="Usage">{
|
||||
let (name = item.name || item.names[0], frame = item.definedAt)
|
||||
frame ? <a xmlns:dactyl={NS} dactyl:command="buffer.viewSource"
|
||||
href={frame.filename} line={frame.lineNumber}
|
||||
title={"Defined at " + frame.filename + ":" + frame.lineNumber}
|
||||
>{name}</a>
|
||||
frame ? <><span highlight="Title">{name}</span> 
|
||||
<span highlight="LineInfo">
|
||||
Defined at <a xmlns:dactyl={NS} dactyl:command="buffer.viewSource"
|
||||
href={frame.filename} line={frame.lineNumber}
|
||||
highlight="URL">{
|
||||
frame.filename + ":" + frame.lineNumber}</a>
|
||||
</span>
|
||||
</>
|
||||
: name
|
||||
}</td>
|
||||
<td>{item.description}</td>
|
||||
|
||||
Reference in New Issue
Block a user