GithubHelp home page GithubHelp logo

keyhr / vscode-42-c-format Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 1.0 733 KB

A vscode extension to provide formatting from c_formatter_42

Home Page: https://marketplace.visualstudio.com/items?itemName=keyhr.42-c-format

License: MIT License

TypeScript 100.00%
c 42 42school formatter norminette

vscode-42-c-format's Introduction

42 C-Format

42 C-Format is a VScode formatting provider extension for c_formatter_42, which is a c-language formatter that conforms to Norm v3 in 42 schools.

Features

Provide document formatting using c_formatter_42.

feature gif

Usage

$ pip3 install c_formatter_42
$ pip3 install --user c_formatter_42   // if you don't have privilege
  • Then enable formatting with 42 C-Format, adding configuration as below.
{
    "[c]": {
        "editor.defaultFormatter": "keyhr.42-c-format"
    },
}

Requirements

Contributions

Issues and pull requests are welcomed.

Release Notes

0.0.5

Added windows support.

0.0.4

Impoved output when catching an error.

0.0.3

Added an instruction for installing c_formatter_42.

0.0.2

Fixed the usage instruction.

0.0.1

Initial release.

vscode-42-c-format's People

Contributors

keyhr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

42mgr

vscode-42-c-format's Issues

VSCodium

How to install it when using VSCodium?

Not working on Windows

c_formatter_42 now supports Windows but this extension fails to run on Windows because of the following error:

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

42-c-format: Please read README and check requirements.

Indeed, the default name of the Python 3 interpreter on Windows is just python, not python3.

VS Code can't find c_formatter_42 in python : `/usr/bin/python3: No module named c_formatter_42`

VS-Code tells :
/usr/bin/python3: No module named c_formatter_42
I launched the installation again :

`pip3 install --user c_formatter_42`
Looking in indexes: https://pypi.python.org/simple
Requirement already satisfied: c_formatter_42 in /home/melobern/.local/lib/python3.8/site-packages (0.2.7)

If I do "c_formatter_42 < file.c" or "python3 -m c_formatter_42 < file.c" or even "c_formatter_42 file.c" in my terminal, it works.
In Vim and Neovim, <F2> works as well.
The only place where I have this problem is in VS Code and I couldn't find how to fix this.

No module named c_formatter_42

Hello this is a very good extension but i can't use it.
This is the massage error I have : /usr/bin/python3: No module named c_formatter_42.

it's said that c_formatter_42 is in my folder python3.8 and not python3.
thks for all

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.