Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow repl_open_cmd to be custom function for dynamic views #298

Open
jakubkaczor opened this issue Oct 12, 2022 · 0 comments
Open

Allow repl_open_cmd to be custom function for dynamic views #298

jakubkaczor opened this issue Oct 12, 2022 · 0 comments

Comments

@jakubkaczor
Copy link

Preferred behavior

Setting repl_open_cmd to custom function makes iron call this function to determine the view. This lets setting the view dynamically. For example, one could define a function with a conditional statement, so that when the window is in landscape proportion, the window is split vertically, but otherwise horizontally. For example

repl_open_cmd = function()
    if vim.o.columns < 158 then
        return iron.view.bottom(15)
    end
    return iron.view.right(79)
end,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant