Skip to content

feature request: set filetype for REPL buffer #323

Open
@wangl-cc

Description

@wangl-cc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions