aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorzbirenbaum <zacharyobirenbaum@gmail.com>2022-04-22 01:21:26 -0400
committerzbirenbaum <zacharyobirenbaum@gmail.com>2022-04-22 01:25:19 -0400
commit794256b2f108d6dfb48b0be7a2775a1b28b24ee6 (patch)
tree04877475a3acdff6d4fe9a2b0a0125a72af95554 /README.md
parentfix config not applying (diff)
add term_opts config shortcut
Diffstat (limited to 'README.md')
-rw-r--r--README.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1cc4152..9ec0a06 100644
--- a/README.md
+++ b/README.md
@@ -49,6 +49,43 @@ require("nvterm").setup({
}
})
```
+A shortcut is available for setting options of the different terminal types:
+```
+require("nvterm").setup({
+ 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 },
+})
+```
+
+is equivalent to:
+
+```
+require("nvterm").setup({
+ terminals = {
+ 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 },
+ }
+ }
+})
+```
+
### Additional Functionality:
NvTerm provides an api for you to send commands to the terminal. You can create different ones for different filetypes like so: