Formatters for C, C++, C#, Java, D
This commit is contained in:
parent
19cf4edab4
commit
ad75ab04f7
|
@ -301,6 +301,7 @@ Nude pagoda careens.
|
||||||
main: "main.c",
|
main: "main.c",
|
||||||
compile: "clang -Wall -Wextra main.c -o main",
|
compile: "clang -Wall -Wextra main.c -o main",
|
||||||
run: "./main",
|
run: "./main",
|
||||||
|
format: "clang-format main.c",
|
||||||
lspSetup: `echo '-Wall -Wextra' | sed -E 's/\\s+/\\n/g' > compile_flags.txt`,
|
lspSetup: `echo '-Wall -Wextra' | sed -E 's/\\s+/\\n/g' > compile_flags.txt`,
|
||||||
lsp: "clangd",
|
lsp: "clangd",
|
||||||
template: `#include <stdio.h>
|
template: `#include <stdio.h>
|
||||||
|
@ -437,6 +438,7 @@ Refrigerate for 1 hour.
|
||||||
main: "main.cpp",
|
main: "main.cpp",
|
||||||
compile: "clang++ -Wall -Wextra main.cpp -o main",
|
compile: "clang++ -Wall -Wextra main.cpp -o main",
|
||||||
run: "./main",
|
run: "./main",
|
||||||
|
format: "clang-format main.cpp",
|
||||||
lspSetup: `echo '-Wall -Wextra' | sed -E 's/\\s+/\\n/g' > compile_flags.txt`,
|
lspSetup: `echo '-Wall -Wextra' | sed -E 's/\\s+/\\n/g' > compile_flags.txt`,
|
||||||
lsp: "clangd",
|
lsp: "clangd",
|
||||||
template: `#include <iostream>
|
template: `#include <iostream>
|
||||||
|
@ -462,6 +464,7 @@ int main() {
|
||||||
main: "main.cs",
|
main: "main.cs",
|
||||||
compile: "mcs main.cs",
|
compile: "mcs main.cs",
|
||||||
run: "mono main.exe",
|
run: "mono main.exe",
|
||||||
|
format: `clang-format --style="{BasedOnStyle: llvm, IndentWidth: 4}" main.cs`,
|
||||||
template: `class main {
|
template: `class main {
|
||||||
static void Main(string[] args) {
|
static void Main(string[] args) {
|
||||||
System.Console.WriteLine("Hello, world!");
|
System.Console.WriteLine("Hello, world!");
|
||||||
|
@ -523,10 +526,12 @@ require("/usr/lib/node_modules/coffeescript/repl").start()
|
||||||
main: "main.d",
|
main: "main.d",
|
||||||
compile: "dmd main.d",
|
compile: "dmd main.d",
|
||||||
run: "./main",
|
run: "./main",
|
||||||
|
format: "dfmt main.d",
|
||||||
template: `import std.stdio;
|
template: `import std.stdio;
|
||||||
|
|
||||||
void main() {
|
void main()
|
||||||
writeln("Hello, world!");
|
{
|
||||||
|
writeln("Hello, world!");
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
@ -878,6 +883,7 @@ PLEASE GIVE UP
|
||||||
main: "Main.java",
|
main: "Main.java",
|
||||||
compile: "javac Main.java",
|
compile: "javac Main.java",
|
||||||
run: "java Main",
|
run: "java Main",
|
||||||
|
format: `clang-format --style="{BasedOnStyle: llvm, IndentWidth: 4}" Main.java`,
|
||||||
template: `public class Main {
|
template: `public class Main {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("Hello, world!");
|
System.out.println("Hello, world!");
|
||||||
|
@ -1141,6 +1147,7 @@ require("repl").start()
|
||||||
compile:
|
compile:
|
||||||
"gcc $(gnustep-config --objc-flags) main.m $(gnustep-config --base-libs) -o main",
|
"gcc $(gnustep-config --objc-flags) main.m $(gnustep-config --base-libs) -o main",
|
||||||
run: "./main",
|
run: "./main",
|
||||||
|
format: "clang-format main.m",
|
||||||
lspSetup: `(gnustep-config --objc-flags && gnustep-config --base-libs) | sed -E 's/\\s+/\\n/g' > compile_flags.txt`,
|
lspSetup: `(gnustep-config --objc-flags && gnustep-config --base-libs) | sed -E 's/\\s+/\\n/g' > compile_flags.txt`,
|
||||||
lsp: "clangd",
|
lsp: "clangd",
|
||||||
template: `#import <Foundation/Foundation.h>
|
template: `#import <Foundation/Foundation.h>
|
||||||
|
|
|
@ -39,9 +39,11 @@ beef
|
||||||
|
|
||||||
# C/C++
|
# C/C++
|
||||||
clang
|
clang
|
||||||
|
clang-format
|
||||||
clangd
|
clangd
|
||||||
|
|
||||||
# C#
|
# C#
|
||||||
|
clang-format
|
||||||
mono-mcs
|
mono-mcs
|
||||||
|
|
||||||
# Ceylon
|
# Ceylon
|
||||||
|
|
|
@ -51,6 +51,7 @@ haxe
|
||||||
intercal
|
intercal
|
||||||
|
|
||||||
# Java
|
# Java
|
||||||
|
clang-format
|
||||||
default-jdk
|
default-jdk
|
||||||
|
|
||||||
# Julia
|
# Julia
|
||||||
|
|
|
@ -50,6 +50,11 @@ npm install -g lumo-cljs
|
||||||
# CoffeeScript
|
# CoffeeScript
|
||||||
npm install -g coffeescript
|
npm install -g coffeescript
|
||||||
|
|
||||||
|
# D
|
||||||
|
dub fetch --version='~master' dfmt
|
||||||
|
dub run dfmt -- --version
|
||||||
|
mv "$HOME/.dub/packages/dfmt-master/dfmt/bin/dfmt" /usr/local/bin/
|
||||||
|
|
||||||
# Dogescript
|
# Dogescript
|
||||||
npm install -g dogescript
|
npm install -g dogescript
|
||||||
|
|
||||||
|
@ -126,7 +131,7 @@ pip3 install whitespace
|
||||||
# Wolfram Language
|
# Wolfram Language
|
||||||
python3.7 -m pip install mathics
|
python3.7 -m pip install mathics
|
||||||
|
|
||||||
rm -rf /root/.cache /root/.config /root/.cpan /root/.cpanm /root/.gem /root/.npm /root/.npmrc
|
rm -rf /root/.cache /root/.config /root/.cpan /root/.cpanm /root/.dub /root/.gem /root/.npm /root/.npmrc
|
||||||
rm -f /tmp/core-js-banners
|
rm -f /tmp/core-js-banners
|
||||||
|
|
||||||
rm "$0"
|
rm "$0"
|
||||||
|
|
Loading…
Reference in New Issue