Code Monkey home page Code Monkey logo

plugin-haml's Introduction

Prettier Banner

Opinionated Code Formatter

JavaScript · TypeScript · Flow · JSX · JSON
CSS · SCSS · Less
HTML · Vue · Angular
GraphQL · Markdown · YAML
Your favorite language?

Github Actions Build Status Github Actions Build Status Github Actions Build Status Codecov Coverage Status Blazing Fast
npm version weekly downloads from npm code style: prettier Follow Prettier on Twitter

Intro

Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

Input

foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());

Output

foo(
  reallyLongArg(),
  omgSoManyParameters(),
  IShouldRefactorThis(),
  isThereSeriouslyAnotherOne(),
);

Prettier can be run in your editor on-save, in a pre-commit hook, or in CI environments to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!


Documentation

Install · Options · CLI · API

Playground


Badge

Show the world you're using Prettiercode style: prettier

[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)

Contributing

See CONTRIBUTING.md.

plugin-haml's People

Contributors

kddnewton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

plugin-haml's Issues

Installation error: "cannot load such file -- haml (LoadError)"

Hey!

First off, thank you so much for this plugin, as it makes developing in HAML a breeze.

I opened this issue because I encountered several problems during installation, some of them I don’t really know where they come from. I managed to hack my way through to a solution, which I will post here also in case it helps someone else out there.

Implicit haml requirement

This line

require 'haml'

is an implicit requirement on the haml gem. That raised the following error at runtime in VSCode:

`require': cannot load such file -- haml (LoadError)

As this plugin is supposed to, well, work with haml, one could think that the requirement will always be fulfilled. However that was not the case for me. That brings me to my second issue.

VSCode is not using my rbenv version of ruby

The VSCode stacktrace was mentioning the following path for Ruby when using this plugin /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby, which is the OSX default one and not the one used by my shell, development environment or otherwise as all of those are managed by rbenv.

I don’t know why that is, but that’s the reason why haml wasn’t installed (as I never use the system version of ruby).

The (admittedly dirty) fix to my issue was then to run the following command:

sudo /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/gem install haml

I think finding a way to have the plugin use the “correct” path to ruby for rbenv users would solve all this.

Feel free to close this issue if it is out of scope of the plugin (I don’t have a clue what’s going on. Otherwise, I’d be happy to help in any way I can!

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.