NvChad / ui

Lightweight & high performance UI plugin for nvchad
GNU General Public License v3.0
295 stars 135 forks source link

Support change nvterm size #209

Closed phamngocquy closed 1 year ago

phamngocquy commented 1 year ago

I saw that nvchad 2.0 is not allow to config nvterm size as in version 1.0


 ➜  main ❯ cat lua/plugins/configs/nvterm.lua 
local present, nvterm = pcall(require, "nvterm")

if not present then
  return
end

require "base46.term"

local options = {
  terminals = {
    list = {},
    type_opts = {
      float = {
        relative = "editor",
--        row = 0.3,
--        col = 0.25,
--        width = 0.5,
--        height = 0.4
        row = 0.1,
        col = 0.1,
        width = 0.8,
        height = 0.7,
        border = "single",
      },
      horizontal = { location = "rightbelow", split_ratio = 0.3 },
      vertical = { location = "rightbelow", split_ratio = 0.5 },
    },
  },
  behavior = {
    close_on_exit = true,
    auto_insert = true,
  },
  enable_new_mappings = true,
}

options = require("core.utils").load_override(options, "NvChad/nvterm")

nvterm.setup(options)
siduck commented 1 year ago

nvterm will be removed in v3.0 ( as i didnt write its codebase and it felt complex to me) So ive written our own module for terminal handling which is better and has more options than nvterm. check v3.0 branch core/mappings.lua