1

Update generated neovim config

This commit is contained in:
2024-09-22 20:41:25 +02:00
parent 1743764e48
commit aa1271c42c
1247 changed files with 26512 additions and 15067 deletions

View File

@ -195,6 +195,7 @@ require("toggleterm").setup{
persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
direction = 'vertical' | 'horizontal' | 'tab' | 'float',
close_on_exit = true, -- close the terminal window when the process exits
clear_env = false, -- use only environmental variables from `env`, passed to jobstart()
-- Change the default shell. Can be a string or a function returning a string
shell = vim.o.shell,
auto_scroll = true, -- automatically scroll to the bottom on terminal output

View File

@ -1,4 +1,4 @@
*toggleterm.txt* For Neovim >= 0.8.0 Last change: 2024 July 17
*toggleterm.txt* For Neovim >= 0.8.0 Last change: 2024 August 08
==============================================================================
Table of Contents *toggleterm-table-of-contents*
@ -182,6 +182,7 @@ what options are available. It is not written to be used as is.
persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered
direction = 'vertical' | 'horizontal' | 'tab' | 'float',
close_on_exit = true, -- close the terminal window when the process exits
clear_env = false, -- use only environmental variables from `env`, passed to jobstart()
-- Change the default shell. Can be a string or a function returning a string
shell = vim.o.shell,
auto_scroll = true, -- automatically scroll to the bottom on terminal output

View File

@ -26,6 +26,7 @@ local function shade(color, factor) return colors.shade_color(color, factor) end
--- @field persist_size boolean
--- @field persist_mode boolean
--- @field close_on_exit boolean
--- @field clear_env boolean
--- @field direction '"horizontal"' | '"vertical"' | '"float"'
--- @field shading_factor number
--- @field shading_ratio number
@ -49,6 +50,7 @@ local config = {
persist_size = true,
persist_mode = true,
close_on_exit = true,
clear_env = false,
direction = "horizontal",
shading_factor = constants.shading_amount,
shading_ratio = constants.shading_ratio,

View File

@ -208,7 +208,7 @@ function Terminal:new(term)
term.id = id or next_id()
term.display_name = term.display_name
term.float_opts = vim.tbl_deep_extend("keep", term.float_opts or {}, conf.float_opts)
term.clear_env = term.clear_env
term.clear_env = vim.F.if_nil(term.clear_env, conf.clear_env)
term.auto_scroll = vim.F.if_nil(term.auto_scroll, conf.auto_scroll)
term.env = vim.F.if_nil(term.env, conf.env)
term.hidden = vim.F.if_nil(term.hidden, false)
@ -261,11 +261,11 @@ function Terminal:__restore_mode() self:set_mode(self.__state.mode) end
---@param m Mode
function Terminal:set_mode(m)
if m == mode.INSERT then
vim.cmd("startinsert")
vim.schedule(function() vim.cmd("startinsert") end)
elseif m == mode.NORMAL then
vim.cmd("stopinsert")
vim.schedule(function() vim.cmd("stopinsert") end)
elseif m == mode.UNSUPPORTED and config.get("start_in_insert") then
vim.cmd("startinsert")
vim.schedule(function() vim.cmd("startinsert") end)
end
end