nelsam / vidar

vidar is a highly experimental Go editor, written in Go, using gxui
The Unlicense
50 stars 7 forks source link

settings: drop font and config file dependencies #163

Closed nelsam closed 5 years ago

nelsam commented 5 years ago

We're dropping tmc/fonts as a dependency mostly because it's a very small dependency and we uncovered a couple bugs in it. 'A little bit of copy/paste is better than a little bit of dependency' seems like a sane reason for us to drop it and write our own. It also gives us some flexibility to look for fonts in the XDG dirs.

We're dropping viper because we submitted github.com/spf13/viper#271 ages ago, but it never got a response. I don't want to keep our workaround code any more.

We've switched to OpenPeeDeeP/xdg for our xdg code mostly because it seems to be more maintained and has a clear README.

Type

Tests

I have tested locally against:

I have included automated tests:

nelsam commented 5 years ago

@Kvaz1r could you give this a try on Windows? It changes quite a few things about the config file parsing, but it should all work the same in the end.

I've replaced github.com/tmc/fonts with our own font finding logic, so hopefully vidar will recognize fonts on Windows now, too.

Kvaz1r commented 5 years ago

Yes, it definitely works.