Giter Site home page Giter Site logo

nimib-land / nimiboost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nukopy/python-string-markdown

2.0 2.0 0.0 2.01 MB

Highlight Markdown in Nimib files and preview the result in a separate panel.

Home Page: https://marketplace.visualstudio.com/items?itemName=hugogranstrom.nimiboost

License: MIT License

TypeScript 100.00%

nimiboost's Introduction

nimiBoost

Features

  • Syntax highlighting for markdown/Python/HTML/Nim in strings marked with hlMd/hlPy/hlHtml/hlNim. For markdown use hlMd or hlMdF (F-variant is alias for string interpolation: &(hlMd""""Text here""")). Example:
nbText: hlMd"""
# The markdown
- goes
- here
"""
  • Syntax highlight python code in nbPython blocks using hlPy or hlPyF similairly as hlMd.

  • Syntax highlight HTML code using hlHtml or hlHtmlF similairly as hlMd.

  • Syntax highlight Nim code using hlNim or hlNimF similairly as hlMd.

  • Preview current Nimib-file using the task Nimib Preview, clicking on NimiBoost ๐Ÿš€ in the statusbar or the shortcut Ctrl+K V (Ctrl+K, release, V).

    • codeAsInSource setting is available to use -d:nimibPreviewCodeAsInSource in the preview.

Requirements

Requires an installation of Nim and Nimib. There is a separate Nim extension for general Nim programming.

Installation

You may have to restart VSCode for all features to activate.

Known Issues

  • Only triple-quote strings supported.
  • It's picky about where the ending """ is. It has to be on it's own row. So this is not allowed:
nbText: hlMd"""
# Header
text, more text and even more text"""
# """ <-- This is the correct position!

Release Notes

0.4.3

  • hlHtml and hlHtmlF for highlighting HTML in strings.

0.4.2

  • Nim highlighted strings now supported using hlNim and hlNimF.

0.4.1

  • Python highlighted strings are now supported using the hlPy and hlPyF markers:
nbPython: hlPy"""
import numpy as np
print(np.linspace(0, 10, 11))
"""
  • Nimib is switching over from using md and fmd to the more general hlMd and hlMdF. The old variants will still work but may be removed in the future.

0.4

  • No more annoying popups saying that the compilation has started and succeded! Now all of that happens in the statusbar at the bottom.
  • new configuration option cmdArgs to pass in command line arguments to the compiler.
  • -d:release is no longer the default, use above-mentioned configuration if you want to compile in release mode.

0.3.1

Limit the preview keybindings to Nim files (it tried to run it on markdown files otherwise).

0.3

Preview mode is upgraded to understand nimib.toml files and will no longer create temporary folders. Files will go where nimib would have put them. The old command is still available but under the name Nimib Preview (Legacy) which you can add your own keybinding for if you want to keep it. This means themes like nimiBook will have correct styling and loading of files works as expected in nimib.

0.2

  • Support nimib 0.2
  • Added setting to enable codeAsInSource.

0.1.2

Fix syntax highlighting for indented nbText blocks.

0.1.1

Improved the error experience. Now the stderr is shown in the Output window.

0.1

Initial release of NimiBoost

Todo

Empty for now.

nimiboost's People

Contributors

hugogranstrom avatar 0x00000001a avatar nukopy avatar ptweir avatar alesanchezr avatar feluxe avatar yozman avatar

Stargazers

 avatar Pietro Peterlongo avatar

Watchers

James Cloos avatar  avatar

nimiboost's Issues

highlight inside generalized string literals

If I am seeing this correctly you are highlighting markdown now when you see string preceded by nbText, correct?

What about providing a mechanism to highlight when provided with a md string literal that is just a marker.

For example:

template md(s: string): string = s

echo md"# a title with [link](#somehwere)"
echo md"""## another smaller title

with some content written in **markdown**

So that link to [stuff] is easy to add.

[stuff]: https://stuff.org
"""

of course the template md should be provided externally (and if you want to use formatted string you would have to do stuff like &(md"hi **{name}**") or defined a fmd template that is md + fmt). The same mechanism could apply to html to highlight it (not necessarily relevant for nimib, but it could be useful in general).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.