coolwanglu / neovim-e

Electron UI for Neovim
MIT License
271 stars 29 forks source link

Doesn't read guifont option #6

Closed rygwdn closed 9 years ago

rygwdn commented 9 years ago

neovim.as should respect the guifont option from vim, or provide another way to set it. E.g. in my .nvimrc I have:

set guifont=Droid\ Sans\ Mono\ for\ Powerline:h11
coolwanglu commented 9 years ago

Do you think you cat set the value to guifont, seems that I couldn't find a way. Also I'm not sure how to obtain this value using the protocol.

rygwdn commented 9 years ago

looks like guifont is gone in neovim, it fails when I try to set it. maybe this issue should become "Allow setting custom font".

coolwanglu commented 9 years ago

Yeah, I think we should file the issue to neovim.

kopischke commented 9 years ago

Yeah, I think we should file the issue to neovim.

Not sure that will help, the point of Neovim being to decouple UIs from the editor core; IIRC the removal of all GUI options is intentional. This option is probably better provided by Neovim.AS.

coolwanglu commented 9 years ago

@kopischke I see, so we will not be able to store GUI config in ~/.vimrc?

rygwdn commented 9 years ago

I think if we want to store gui config in a vimrc, it would be stored the same as a normal plugin:

let g:neovimas_font = "my font"

That would then be available through the neovim API

kopischke commented 9 years ago

I’d argue that set guifont doesn'’t belong into .vimrc anyway, but to the GUI specific .gvimrc. AFAIK Neovim doesn’t read for that file for exactly this reason, so how about Neovim.as does? Configuration would still happen in Vimland, as per user expectation.

rygwdn commented 9 years ago

I think they removed .gvimrc because it doesn't make sense anymore. With neovim you can have two UIs attached to the same neovim process. That means you could have the terminal UI and a "GUI" attached at the same time.

kopischke commented 9 years ago

Yup exactly, which is why is it is available as a configuration file for GUIs. However, that is only a solution in theory, as .gvimrc is a full fledged VimL file, not something you would want to re-implement a parser for. The path of least resistance would probably be to provide a Neovim.AS specific JSON configuration file.

coolwanglu commented 9 years ago

Right, I guess a JSON/CSON file would fit Neovim.AS better.

justinmk commented 9 years ago

I'm sure we will add that option back.

coolwanglu commented 9 years ago

So what do you think, a ~/.nvas.json file or an nvas_option in ~/.vimrc? Like this

let g:nvas_option = "{ \
'font': 'monospace' \
}"
coolwanglu commented 9 years ago

Now config from userDataDir/config.cson is read, which overrides the default configuration.

See also: https://github.com/atom/atom-shell/blob/master/docs/api/app.md#appgetpathname