Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
"type": "object",
"title": "Syntax Tree",
"properties": {
"syntaxTree.maximumLineWidth": {
"default": 80,
"markdownDescription": "The maximum line width to use when formatting.",
"type": "number"
},
"syntaxTree.singleQuotes": {
"default": false,
"markdownDescription": "Uses single-quoted strings when possible.",
Expand Down
3 changes: 3 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export async function activate(context: ExtensionContext) {
args.push(`--plugins=${Array.from(plugins).join(",")}`);
}

// Configure print width.
args.push(`--print-width=${config.get<number>("maximumLineWidth")}`)

// There's a bit of complexity here. Basically, if there's an open folder,
// then we're going to check if the syntax_tree gem is inside the bundle. If
// it is, then we'll run bundle exec stree. This is good, because it'll
Expand Down