Does not read ~/.config/oni/config.js symlink
My dotfiles are all managed in a git repo and the real paths are symlinks into that repo.
When ~/.config/oni/config.js is a symlink it appears to load the default config instead of the file the symlink is pointing too.
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
I have been doing exactly that with the latest version of Oni and it works as expected. You can take a look in my symlink here: https://github.com/josemarluedke/dotfiles/blob/master/install.sh#L91
You might want to check if there is already a config file, if there is, remove it and then create the symlink.
Also worth mentioning the recent changes of the configuration to TypeScript instead of JavaScript: https://github.com/onivim/oni/wiki/Migrating-Configuration-to-TypeScript
Are you using the latest version? In older installations the config live lives in a different place (~/.oni/config.js)
Hello,
Thanks for the welcome and swift responses.
I am using v0.3.2 however I was not aware of the typescript change. I just grabbed the minimal config from the wiki a couple of days ago and it said to place that in ~/.config/oni/config.js perhaps nix-home does something other than a simple simlink like you are doing. I will close this issue and migrate to typescript and only re-open if I get more information on the problem should it persist.
Much appreciated!
Whoops, that's left over from before the config file was switched to tsx. I updated the wiki so nobody else will be led astray. 😄
This issue persists for me. I have switched format and am using my dotfiles causing this kind of symlink and when I load up oni it has the default theme and configs still but I have solarized dark enabled. If I copy the file into place then it works:
┬─[nekroze:~/dotfiles]
╰─>$ ls -al ~/.config/oni/
total 24
drwxr-xr-x 3 nekroze nekroze 4096 Apr 25 11:05 ./
drwxr-xr-x 25 nekroze nekroze 4096 Apr 25 11:04 ../
lrwxrwxrwx 1 nekroze nekroze 70 Apr 25 11:04 config.tsx -> /nix/var/nix/profiles/per-user/nekroze/nix-home/.config/oni/config.tsx
drwx------ 2 nekroze nekroze 4096 Apr 25 11:05 GPUCache/
-rw------- 1 nekroze nekroze 69 Apr 25 11:05 Preferences
-rw-r--r-- 1 nekroze nekroze 275 Apr 25 11:05 Settings
┬─[nekroze:~/dotfiles]
╰─>$ head -n 3 ~/.config/oni/config.tsx
import * as React from "/opt/Oni/resources/app/node_modules/react"
import * as Oni from "/opt/Oni/resources/app/node_modules/oni-api"
I managed to get it working, I had to launch Oni and then edit the config file and then force save it with :w! because it is a symlink and thus readonly, then Oni loaded the config and it all worked.
I guess then the problem is more that the config is not getting automatically compiled/loaded in this circumstance and I have to do something to force that to happen.