GithubHelp home page GithubHelp logo

edheltzel / nunjucks-for-visual-studio-code Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 0.0 26.72 MB

๐Ÿฆพ Better Nunjucks Syntax and Snippets Extension for Visual Studio Code

Home Page: https://marketplace.visualstudio.com/items?itemName=ginfuru.better-nunjucks

License: MIT License

JavaScript 100.00%
nunjucks vscode-extension 11ty eleventy nunjucks-snippets nunjucks-syntax visual-studio-code-extension nunjucks-grammar vscode-grammar vscode-language-support

nunjucks-for-visual-studio-code's People

Contributors

edheltzel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nunjucks-for-visual-studio-code's Issues

add option for comment style

as mentioned in #1, the fact that the extension overrides the default comment style in all html files can be very frustrating.

I would suggest adding a configuration option to revert the comment style to default html comments.

it is probably even a good idea to leave the html style as default and make the nunjucks-style optional.

Nunjucks Style Comments

First and foremost, thank you for making a good Nunjucks extension that works for Eleventy. In the little amount of time that I have used it it has been great.

The only thing I can see that is missing is nunjucks style comments. In VS Code when you hit ctrl + / or cmd + / you still get the HTML formatted comments (<!-- -->). It would be nice to get the nunjucks style comments ({# #}).

Syntax highlight on other languages

Hello, i really like this plugin for nunjacks,
however i discovered that it breaks the syntax highlighting in similar languages, for example in .liquid files, which i handle with the official shopify extension, it doesn't let {% comment %} appear greyed out like they should. It also breaks {% schema %} tags highlighting.
I tried to set the correct files associations in settings.json but it didn't help either.
If i disable the extension, the liquid syntax highlight go back to work normally.

No response or How to use with .md file

Sorry to bother for my limited level. After reading the readme quite a few times, I still can not figure out how to use this plugin to highlight, format and use the snippets for the nunjuck language.

My usage scenario is to write the zotero integration template in .md format. Thanks again.

Formatting Indentation

Hi, Love the extension as it's the only one that keeps everything working as it is supposed to.

Just wondering if there is a way to enable indentation when using auto format, so my templates appear as so

{%
    set foo = "bar"
%}

instead of it currently doing

{%
set foo = "bar"
%}

same goes for {% block foo %} tags also. Hoping you can point me in the right direction

Syntax Highlighting

Very good plugin, I found an issue for specific file configuration with 11ty.

I'm using the before callback for a specific file, because I need to filter my variable for localisation, normally I do not need that, because I do create page in every languages.

But using ---js broke syntax highlighting but it is required for 11ty (https://www.11ty.dev/docs/pagination/#the-before-callback)

Code_MrZDPlk47F.mp4

Possible to use on other grammar instead of HTML?

from readme:

provide syntax highlighting for Nunjucks tags, filers, and variables which are injected into the default html grammar

So I'm making a code generator from openapi definition. I'm generating typescript files, so my files are named operation.ts.njk etc. Now obviously the base code is typescript, then I have nunjucks sprinkled inside it. Can I make the base grammar typescript and not html?

Actually I face this issue often, something.html.twig, works kinda okey with a twig extension, but making a php/rust/go file with twig, it craps out. So this question is kinda broad, is it possible to for [Template Engine] Extensions to inject their tags, filers, and variables into arbitrary user selectable grammar?

Bug: Indented YAML Frontmatter does not retain indention

Hi, first of all, just wanted to say that I think this extension works really well most of the time and I hope you continue to improve it :)

Bug

With only the Better Nunjucks extension enabled, if I have frontmatter in my file (.html) that has indented properties, formatting the document will remove the indention.

This is pretty critical for 11ty Pagination, which is how I noticed the problem.

Gif

better-nunjucks-format

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.