aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/opts.lua
blob: b9ac5f9b4327cbdb6e22334290b25884f59a44c3 (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
local opts = {
    -- clipboard = "unnamedplus",
    -- textwidth = 80,
    autochdir = true,
    autoindent = true,
    cursorline = true,
    expandtab = true,
    hlsearch = true,
    ignorecase = true,
    listchars = { tab = ">-", trail = "~", extends = ">", precedes = "<", space = "." },
    linebreak = true,
    mouse = "a",
    number = true,
    relativenumber = true,
    shiftwidth = 4,
    showmatch = true,
    smartcase = true,
    softtabstop = 4,
    tabstop = 4,
    termguicolors = true,
    ttimeout = true,
    ttimeoutlen = 1,
    ttyfast = true,
}

-- use a line cursor within insert mode and a block cursor everywhere else.
-- reference chart of values:
--   ps = 0  -> blinking block.
--   ps = 1  -> blinking block (default).
--   ps = 2  -> steady block.
--   ps = 3  -> blinking underline.
--   ps = 4  -> steady underline.
--   ps = 5  -> blinking bar (xterm).
--   ps = 6  -> steady bar (xterm).
vim.g.t_SI = "\27[6 q"
vim.g.t_EI = "\27[2 q"

if vim.env.TERM == "alacritty" then
  vim.opt.ttymouse = "sgr"
end

for k, v in pairs(opts) do
  vim.opt[k] = v
end