R-nvim / R.nvim

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

Cleaner config.lua #19

Closed she3o closed 5 months ago

jalvesaq commented 5 months ago

Github doesn't allow the merge due to selene finding errors.

jalvesaq commented 5 months ago

I checked your branch out. It has loop errors. This means that module X requires module Y, which requires module X. I'm fixing this kind of issue by requiring module Y inside the function that uses it, not at the top of module X.

jalvesaq commented 5 months ago

Could you move the line local edit = require("r.edit") from the top of config.lua to the function where it is used?

she3o commented 5 months ago

I'll soon finish my work shift and be on it (Can it be done from Github mobile?).

Maybe I should just revert the second commit where I define r.edit and replace its references. I expect a lot of the functions will be moved around files anyway. Does that seem right?

jalvesaq commented 5 months ago

I'll soon finish my work shift and be on it (Can it be done from Github mobile?).

I never used Github mobile, but there is no hurry.

Maybe I should just revert the second commit where I define r.edit and replace its references.

I think this would be enough for now.

I expect a lot of the functions will be moved around files anyway. Does that seem right?

Yes, at some point we may think about moving functions to more appropriate modules. Other tasks are:

jalvesaq commented 5 months ago

It seems tha uv.fs_access requires the file's full path. So, it returns false when checking if "R" is executable.

jalvesaq commented 5 months ago

As far as I know, Lua doesn't support patterns with |.

I will fix these issues in the next commit.