Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Load package config from 'ide-crystal' instead of 'crystal' key. #26

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions lib/util/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {spawn} from './process';

export function getBuildJSON(filePath) {
return new Promise(resolve => {
const command = atom.config.get('crystal.compilerExecPath');
const command = atom.config.get('ide-crystal.compilerExecPath');
const args = getCommandArguments(filePath);
createProperCrystalPath().then(path => {
const env = Object.assign({}, process.env, {CRYSTAL_PATH: path});
Expand All @@ -31,11 +31,11 @@ export function getBuildJSON(filePath) {

export function getCommandArguments(filePath) {
const args = [];
args.push(atom.config.get('crystal.diagnosticsCommand'));
if (!atom.config.get('crystal.artifactsDuringDiagnostics')) {
args.push(atom.config.get('ide-crystal.diagnosticsCommand'));
if (!atom.config.get('ide-crystal.artifactsDuringDiagnostics')) {
args.push('--no-codegen');
}
if (!atom.config.get('crystal.compilerColorOutput')) {
if (!atom.config.get('ide-crystal.compilerColorOutput')) {
args.push('--no-color');
}
args.push('-f', 'json');
Expand Down
4 changes: 2 additions & 2 deletions lib/util/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function register(subscriptions) {
if (editor.getGrammar().scopeName !== 'source.crystal') {
return;
}
if (!atom.config.get('crystal.formatOnSave')) {
if (!atom.config.get('ide-crystal.formatOnSave')) {
return;
}
format(evt.path);
Expand All @@ -17,7 +17,7 @@ export function register(subscriptions) {
}

function format(file) {
const command = atom.config.get('crystal.compilerExecPath');
const command = atom.config.get('ide-crystal.compilerExecPath');
const args = ['tool', 'format', file];

return new BufferedProcess({command, args});
Expand Down