zbirenbaum / nvterm

NvChad's Official Terminal Plugin ( Unmaintained but still usable and stable), wait for v3.0
GNU General Public License v3.0
182 stars 20 forks source link

docs: always be insert mode #33

Open airtonix opened 1 year ago

airtonix commented 1 year ago

i was using toggle term previously where I had this in my lazy config :

local PluginSpec = {
    -- Terminal
    "akinsho/toggleterm.nvim",
    version = '*',
    config = function()

        require("toggleterm").setup({})

        vim.api.nvim_create_autocmd({
            "BufEnter"
        }, {
            pattern = { "term://*toggleterm#*" },
            callback = function()
                vim.cmd("startinsert!")
            end
        })
    end
}

return PluginSpec

this nvim_create_autocmd approach works for nvterm, except i feel like it needs a bit more, like:

Basically I want to be an heretical vim user (may the emporer of man smile upon me) and never leave insert mode when in a terminal.

airtonix commented 1 year ago

I saw this in the docs

behaviour = {
    auto_insert = true,
}

but it doesn't do what i expected.