R-nvim / R.nvim

Neovim plugin to edit R files
GNU General Public License v3.0
155 stars 16 forks source link

Unrecognized option `rout_follow_colorscheme` #88

Closed typhooncamel closed 6 months ago

typhooncamel commented 6 months ago

Option rout_follow_colorscheme is urnecognized. While it is still mentioned in the docs, it does not appear in the list of options, so maybe it has been removed?

jalvesaq commented 6 months ago

How did you try to set the option? Did you see the examples in section 4.6 of the documentation? Syntax highlighting of the Object Browser, R documentation, and R Console output is the only thing that still uses the old VimScript. We use global variables to control them and they must be set before configuring R.nvim.

typhooncamel commented 6 months ago

Ah, I was setting it within the plugin configuration. I no longer get the error. Thanks! Incidentally, there is no difference between setting that variable as true or false, do you know why that might be?

jalvesaq commented 6 months ago

How and where did you set it?

typhooncamel commented 6 months ago

In an options.lua file that is sourced in the init.lua, by just adding the line vim.g.rout_follow_colorscheme = true.

jalvesaq commented 6 months ago

It works for me regardless of being vim.g.rout_follow_colorscheme = true or vim.g.rout_follow_colorscheme = 1, and of being before or after running lazy.nvim or within the R.nvim's config option. Actually, it can be anywhere and the result should be the same. Please, check if the output of :echo g:rout_follow_colorscheme is either 1 or v:true.

typhooncamel commented 6 months ago

The output does indeed say v:true. Setting it to false appears to make no difference (for instance, outputting a data.frame on the R console, or is that not where I would see a difference?).

jalvesaq commented 6 months ago

Do you have colorout installed and loaded or are you running radian? If yes, R.nvim will not syntax highlight the terminal.

typhooncamel commented 6 months ago

I do have colorout, I'm using external_term = true, so now that finally makes sense. I assume that's the better way to go anyway (if using the external terminal), right? Thanks again, and sorry for the confusion.

jalvesaq commented 6 months ago

Yes, R.nvim can only syntax highlight the contents of its windows and we can't notice any delay in R's output with colorout. On the contrary, it is certainly faster than Neovim's highlighting, and you can make your color scheme for colourout too.