onivim/oni

Bug - Configuration: If there is only a `config.tsx` present, config doesn't load until saved once

Open

#2056 opened on Apr 6, 2018

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (11,389 stars) (336 forks)batch import
bughelp wantedinsider

Description

It's common to save out the dotfiles of your config - like stashing a config.tsx somewhere, and sharing it between machines.

Repro:

  • Customize your configuration by saving a value in your config.tsx
  • Delete the config.js that is (generated) next to your config.tsx
  • Reload Oni

Expected: Configuration changes should still be present Actual: Configuration changes are not present

Oni actually uses a config.js, and when you save the config.tsx, it automatically generates the corresponding config.js. It doesn't make sense to check-in both of these, but if you only bring over a config.tsx, the config.js won't be generated until you've saved your config.tsx once.

We should detect this case (where there is a config.tsx, but no corresponding config.js) and attempt to transpile it on startup.

Contributor guide