lessmd icon indicating copy to clipboard operation
lessmd copied to clipboard

Configuration file

Open blacksun1 opened this issue 9 years ago • 5 comments

Hi,

Would it be possible for you to share a working example of a .lessmd.js configuration file? I see you've added an empty one, but how about one with some valid defaults?

I'd be happy to document this up and send a pull request once you have.

Regards,

blacksun1 avatar Oct 25 '16 13:10 blacksun1

Hi @blacksun1 , thank you for response.

Yes, it would be cool to document it . At now, i use color-header

color-header-preview

for colorizing marked options of :

  text : '', //ch.COLOR_WHITE_NORMAL_COLOREND,
  lang : ch.COLOR_BOLD_YELLOW_NORMAL,
  heading : ch.COLOR_BOLD_WHITE_NORMAL_COLOREND,
  code : ch.COLOR_YELLOW_NORMAL,
  quote : ch.COLOR_MAGENTA_NORMAL,
  em : ch.COLOR_WHITE_NORMAL,
  codespan : ch.COLOR_CYAN_BLACK,
  strong : ch.COLOR_WHITE_NORMAL,
  html : ch.COLOR_MAGENTA_NORMAL,
  del : ch.COLOR_UNDERSCORE_WHITE_NORMAL,
  link : ch.COLOR_CYAN_NORMAL,
  hr : '',
 listitem : ch.COLOR_WHITE_NORMAL,

I thought about using rgb colors (or convert hex colors) for simplifying the color table, but it will be not so cool, because terminals support background colors as well as foreground color for characters. for an instance hr can be colorized with background color ... white (ok) , and will draw white line for next line. but.. it is just some thoughts ) Maybe you have ideas to improve it .. maybe by usign fg and bg color for each option ? ok ))

linuxenko avatar Oct 25 '16 13:10 linuxenko

ah , stop, example ))

   text : '\033[31;43m'  

makes text yellow

linuxenko avatar Oct 25 '16 13:10 linuxenko

Yeah, I tried to include color-header in my config and I couldn't get the require to work. It would be nice to have something like

const ch = require('color-header');

module.exports = {
    colors: {

        text : ch.COLOR_WHITE_NORMAL_COLOREND
    }
};

but it kept telling me that module color-header could not be found.

blacksun1 avatar Oct 25 '16 14:10 blacksun1

Yeah, you are right, it because npm require some configuration for using globally installed modules, somethings like this:

~~~ grep NODE_PA ~/.zshrc
export NODE_PATH=$HOME/Soft/node/lib/node_modules

npm i -g color-header have to be installed as well.

linuxenko avatar Oct 25 '16 14:10 linuxenko

btw there is another mosules with colors to use .. they are not mine, therefore i can't recomend any exactly one, but they are is and there is cool color themes

linuxenko avatar Oct 25 '16 14:10 linuxenko