Skip to content
This repository was archived by the owner on Feb 12, 2018. It is now read-only.

Commit 17914d6

Browse files
kylebarronguillaumechaumet
authored andcommitted
Import code from r-indent package. Seems to be working. (#13)
1 parent 020fe29 commit 17914d6

File tree

4 files changed

+1013
-0
lines changed

4 files changed

+1013
-0
lines changed

lib/main.js

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"use babel";
2+
3+
import { CompositeDisposable } from "atom"; // eslint-disable-line import/no-unresolved
4+
import RIndent from "./r-indent";
5+
6+
export default {
7+
config: {
8+
hangingIndentTabs: {
9+
type: "number",
10+
default: 1,
11+
description: "Number of tabs used for _hanging_ indents",
12+
enum: [
13+
1,
14+
2,
15+
],
16+
},
17+
},
18+
activate: () => {
19+
this.rIndent = new RIndent();
20+
this.subscriptions = new CompositeDisposable();
21+
this.subscriptions.add(atom.commands.add("atom-text-editor",
22+
{ "editor:newline": () => this.rIndent.properlyIndent() }));
23+
},
24+
};

0 commit comments

Comments
 (0)