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

feature request: set filetype for REPL buffer #323

Open
wangl-cc opened this issue Mar 16, 2023 · 0 comments
Open

feature request: set filetype for REPL buffer #323

wangl-cc opened this issue Mar 16, 2023 · 0 comments

Comments

@wangl-cc
Copy link

Set filetype for REPL buffer will be helpful for being detected by iron and other plugins. For example, toggle REPL with IronRepl will cause an error at REPL buffer. Thus, I set it filetype to iron and check it like this:

if vim.bo.filetype == "iron" then
  vim.api.nvim_win_hide(0)
else
  iron.repl_for(vim.bo.filetype)
end

Currently, I set filetype in repl_open_cmd. But I think it's an abusing, because it's designed to setup windows instead of buffer. It may be better to be specified when the REPL buffer is created.

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