Skip to content

Commit

Permalink
nvim: use nu in terminal window if available
Browse files Browse the repository at this point in the history
  • Loading branch information
chris468 committed Jun 23, 2024
1 parent a054f5a commit 25ff227
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,20 @@ local terminal_id = {
chezmoi = 3,
}

local function nu_or_default()
local nu_path = vim.fn.exepath("nu")
if nu_path == "" then
return nil
end
return nu_path .. " -i"
end

local terminals = {
default = { id = terminal_id.default, display_name = "Terminal" },
default = {
id = terminal_id.default,
cmd = nu_or_default(),
display_name = "Terminal",
},
lazygit = {
id = terminal_id.lazygit,
display_name = "Lazygit",
Expand Down

0 comments on commit 25ff227

Please sign in to comment.