summaryrefslogtreecommitdiff
path: root/lua/user/jaq.lua
blob: 9ea672ec2ad4db6ccb8ca503aa9ae26b499aa44a (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
M = {}
local status_ok, jaq_nvim = pcall(require, "jaq-nvim")
if not status_ok then
  return
end

jaq_nvim.setup {
  -- Commands used with 'Jaq'
  cmds = {
    -- Default UI used (see `Usage` for options)
    default = "term",

    -- Uses external commands such as 'g++' and 'cargo'
    external = {
      typescript = "deno run %",
      javascript = "node %",
      -- markdown = "glow %",
      python = "ipython %",
      -- rust = "rustc % && ./$fileBase && rm $fileBase",
      rust = "cargo run",
      cpp = "g++ % -o $fileBase && ./$fileBase",
      go = "go run %",
      sh = "sh %",
    },

    -- Uses internal commands such as 'source' and 'luafile'
    internal = {
      -- lua = "luafile %",
      -- vim = "source %",
    },
  },

  behavior = {
    -- Default type
    default = "terminal",

    -- Start in insert mode
    startinsert = false,

    -- Use `wincmd p` on startup
    wincmd = false,

    -- Auto-save files
    autosave = false,
  },

  -- UI settings
  ui = {
    -- Floating Window / FTerm settings
    float = {
      -- Floating window border (see ':h nvim_open_win')
      border = "none",

      -- Num from `0 - 1` for measurements
      height = 0.8,
      width = 0.8,
      x = 0.5,
      y = 0.5,

      -- Highlight group for floating window/border (see ':h winhl')
      border_hl = "FloatBorder",
      float_hl = "Normal",

      -- Floating Window Transparency (see ':h winblend')
      blend = 0,
    },

    terminal = {
      -- Position of terminal
      position = "vert",

      -- Open the terminal without line numbers
      line_no = false,

      -- Size of terminal
      size = 60,
    },
  },
}
return M