updated to v1.13

This commit is contained in:
Dan Remollino
2023-03-31 01:05:51 -04:00
parent 2297e68c86
commit 941844d99a
3 changed files with 21 additions and 7 deletions

View File

@ -1,3 +1,6 @@
## Version 1.13
- added option to set how FIGcharacters are spaced
## Version 1.12 ## Version 1.12
- added option toggle margin output - added option toggle margin output
- added separate Comment Padding output options for block and inline comments - added separate Comment Padding output options for block and inline comments

View File

@ -61,9 +61,10 @@ nova.commands.register('figlet', (workspace, figletArgs, textToConvert, postConv
// FIGlet convert the selected text in the editor // FIGlet convert the selected text in the editor
nova.commands.register('figletTextEditor', editor => { nova.commands.register('figletTextEditor', editor => {
let figConfig = { let figConfig = {
outputWidth: '-w' + nova.config.get('figlet_text.outputWidth', 'number'), outputWidth: '-w' + nova.config.get('figlet_text.outputWidth', 'number'),
textDirection: nova.config.get('figlet_text.textDirection', 'string'), charSpacing: nova.config.get('figlet_text.charSpacing', 'string'),
justification: nova.config.get('figlet_text.justification', 'string'), textDirection: nova.config.get('figlet_text.textDirection', 'string'),
justification: nova.config.get('figlet_text.justification', 'string')
} }
let bordersEnabled = nova.config.get('figlet_text.borders', 'boolean') let bordersEnabled = nova.config.get('figlet_text.borders', 'boolean')
@ -199,7 +200,7 @@ nova.commands.register('figletTextEditor', editor => {
switch (border) { switch (border) {
case 'left': case 'left':
figletTextArr = figletTextArr.map(line => { figletTextArr = figletTextArr.map(line => {
if (!/^\s+$/.test(line)) { return `${borders[border].char.repeat(borders[border].width)}${line}` } if (!/^\s+$/.test(line)) return `${borders[border].char.repeat(borders[border].width)}${line}`
}) })
break break
case 'right': case 'right':

View File

@ -3,7 +3,7 @@
"name": "FIGlet Text", "name": "FIGlet Text",
"organization": "Dan Remollino", "organization": "Dan Remollino",
"description": "Convert selected text to FIGlet. Great for adding readable text to the Minimap, creating l33t text headers, and organizing files.", "description": "Convert selected text to FIGlet. Great for adding readable text to the Minimap, creating l33t text headers, and organizing files.",
"version": "1.12", "version": "1.13",
"categories": ["commands", "formatters"], "categories": ["commands", "formatters"],
"entitlements": { "entitlements": {
@ -485,6 +485,16 @@
"type": "number", "type": "number",
"default": 160 "default": 160
}, },
{
"key": "figlet_text.charSpacing",
"title": "Character Spacing",
"description": "These options control how FIGlet spaces the FIGcharacters that it outputs. These options may or may not affect the character output depending on your font selection.",
"link": "http://www.figlet.org/figlet-man.html",
"type": "enum",
"radio": false,
"values": [["-s", "Default (-s)"], ["-S", "Smushing (-S)"], ["-k", "Kerning (-k)"], ["-W", "Full Width (-W)"]],
"default": "-s"
},
{ {
"key": "figlet_text.textDirection", "key": "figlet_text.textDirection",
"title": "Text Direction", "title": "Text Direction",
@ -492,7 +502,7 @@
"link": "http://www.figlet.org/figlet-man.html", "link": "http://www.figlet.org/figlet-man.html",
"type": "enum", "type": "enum",
"radio": false, "radio": false,
"values": [["-X", "Auto"], ["-L", "Left-to-right"], ["-R", "Right-to-left"]], "values": [["-X", "Auto (-X)"], ["-L", "Left-to-right (-L)"], ["-R", "Right-to-left (-R)"]],
"default": "-X" "default": "-X"
}, },
{ {
@ -502,7 +512,7 @@
"link": "http://www.figlet.org/figlet-man.html", "link": "http://www.figlet.org/figlet-man.html",
"type": "enum", "type": "enum",
"radio": false, "radio": false,
"values": [["-x", "Auto"], ["-l", "Left"], ["-c", "Center"], ["-r", "Right"]], "values": [["-x", "Auto (-x)"], ["-l", "Left (-l)"], ["-c", "Center (-c)"], ["-r", "Right (-r)"]],
"default": "-x" "default": "-x"
} }
] ]