aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 947c03526ca77d524e58a59587557b3b67bec956 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# NvChad Official Terminal Plugin

## Setup:

### Installation:

Simply install the plugin with packer as you would for any other:

```
use {
  "NvChad/chadterm",
  config = function ()
    require("chadterm").setup()
  end,
}
```

### Configuration:
Pass a table of configuration options to the plugin's `.setup()` function above.
A sample configuration table with the default options is shown below:

```lua
require("chadterm").setup({
  terminals = {
    list = {},
    type_opts = {
      float = {
        relative = 'editor',
        row = 0.3,
        col = 0.25,
        width = 0.5,
        height = 0.4,
        border = "single",
      },
      horizontal = { location = "rightbelow", split_ratio = .3, },
      vertical = { location = "rightbelow", split_ratio = .5 },
    }
  },
  behavior = {
    close_on_exit = true,
    auto_insert = true,
  },
  mappings = {
    toggle = {
      { '<A-i>', function () terminal.new_or_toggle('float') end },
      { '<A-s>', function () terminal.new_or_toggle('horizontal') end },
      { '<A-v>', function () terminal.new_or_toggle('vertical') end },
    }
  }
})
```