cacharle / c_formatter_42.vim Goto Github PK
View Code? Open in Web Editor NEWVim plugin for the c_formatter_42 formatter
License: MIT License
Vim plugin for the c_formatter_42 formatter
License: MIT License
Hi!
When running the plugin on a .h
file, some norm rules aren't applied or aren't well applied, e.g.:
For the following file, this is how it gets formatted after running the :CFormatter42
command:
13 #ifndef CUB3D_H
14 #define CUB3D_H
15
16 #include <mlx.h>
17
18 typedef struct s_data
19 {
20 void *img;
21 char *addr;
22 int bits_per_pixel;
23 int line_length;
24 int endian;
25 } t_data;
26
27 #endif
Though here we've got some norm errors according to the Norminette:
Error (line 14): wrong number of spaces in preprocessor indentation
Error (line 16): wrong number of spaces in preprocessor indentation
Error (line 18): Struct s_data bad aligned
And thus this is how it should be formatted:
13 #ifndef CUB3D_H
14 # define CUB3D_H
15
16 # include <mlx.h>
17
18 typedef struct s_data
19 {
20 void *img;
21 char *addr;
22 int bits_per_pixel;
23 int line_length;
24 int endian;
25 } t_data;
26
27 #endif
As a temporary fix, is there a way to disable the plugin on header files? Since I'd like to keep using the format-on-save option.
Thanks!
When loaded the plugin should detect if c_formatter_42 is installed and if not, install it with pip
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.