Make autocomplete configurable

js-version
Anton Medvedev 6 years ago
parent a29d43017e
commit c8cd6ceef5

@ -11,11 +11,10 @@ Command-line JSON processing tool
## Features
* Don't need to learn new syntax
* Plain JavaScript
* Formatting and highlighting
* Standalone binary
* Interactive mode 🎉
* Themes support 🎨
## Install

@ -1,6 +1,13 @@
'use strict'
const chalk = require('chalk')
const noop = x => x
const list = {
fg: 'black',
bg: 'cyan',
selected: {
bg: 'magenta'
}
}
module.exports = {
space: global.FX_STYLE_SPACE || 2,
@ -12,4 +19,5 @@ module.exports = {
bracket: global.FX_STYLE_BRACKET || noop,
comma: global.FX_STYLE_COMMA || noop,
colon: global.FX_STYLE_COLON || noop,
list: global.FX_STYLE_LIST || list,
}

@ -5,6 +5,7 @@ const blessed = require('@medv/blessed')
const stringWidth = require('string-width')
const reduce = require('./reduce')
const print = require('./print')
const config = require('./config')
module.exports = function start(filename, source) {
let json = source
@ -54,13 +55,7 @@ module.exports = function start(filename, source) {
height: 7,
left: 1,
bottom: 1,
style: {
fg: 'black',
bg: 'cyan',
selected: {
bg: 'magenta'
}
},
style: config.list,
})
screen.title = filename

Loading…
Cancel
Save