Skip to content

Commit

Permalink
chore(toggleterm): modify
Browse files Browse the repository at this point in the history
  • Loading branch information
ttak0422 committed Jan 26, 2025
1 parent 7740506 commit 97dc2f5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion fnl/toggleterm.fnl
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
(let [M (require :toggleterm)
size (fn [term]
(if (= term.direction :horizontal) (* vim.o.lines 0.35)
(* vim.o.columns 0.5)))]
(* vim.o.columns 0.5)))
float_opts {:border :single
:width (fn [] (math.min vim.o.columns 150))
:height (fn [] (math.floor (* vim.o.lines 0.8)))
; :row <value>
; :col <value>
; :winblend 3
; zindex <value>
:title_pos :center}]
(M.setup {: size
: float_opts
:shade_terminals false
:auto_scroll false
:start_in_insert true
Expand Down
2 changes: 1 addition & 1 deletion fnl/toolwindow.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
term_open (fn [_plugin args]
(doto (let [val (. term_table args.idx)]
(if (= val nil)
(let [term (Terminal:new {:direction :horizontal})]
(let [term (Terminal:new {:direction :float})]
(tset term_table args.idx term)
term)
(. term_table args.idx)))
Expand Down
10 changes: 9 additions & 1 deletion lua/autogen/toggleterm.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lua/autogen/toolwindow.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 97dc2f5

Please sign in to comment.