summaryrefslogtreecommitdiff
path: root/nvim/lua/options.lua
blob: ae802bedf313735517bc60378c149acc8d969704 (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
81
82
83
84
85
86
-- Hint: use `:h <option>` to figure out the meaning if needed
vim.opt.clipboard = 'unnamedplus'   -- use system clipboard
vim.opt.completeopt = {'menu', 'menuone', 'noselect'}
vim.opt.mouse = 'a'                 -- allow the mouse to be used in nvim

-- Tab
vim.opt.tabstop = 2                 -- number of visual spaces per TAB
vim.opt.softtabstop = 2             -- number of spaces in tab when editing
vim.opt.shiftwidth = 2              -- insert 2 spaces on a tab
vim.opt.expandtab = true            -- tabs are spaces
vim.opt.smartindent = true
vim.opt.smarttab = true

-- UI config
vim.opt.number = true               -- show absolute number
vim.opt.relativenumber = true       -- show relative numbers
vim.opt.cursorline = true           -- highlight cursor line underneath cursor horizontally
vim.opt.splitbelow = true           -- open new vertical splits bottom
vim.opt.splitright = true           -- open new horizontal splits right
-- vim.opt.termguicolors = true     -- enable 24-bit RGB color in the TUI
vim.opt.showmode = false            -- show the "-- INSERT --" and other hints

-- Searching
vim.opt.incsearch = true            -- search as characters are entered
vim.opt.hlsearch = false            -- do not highlight matches
vim.opt.ignorecase = true           -- ignore case in searches by default
vim.opt.smartcase = true            -- but make it case sensitive if an uppercase is entered

-- Etc
vim.opt.ruler = true                -- Show row and column ruler info
vim.opt.undolevels = 1000           -- Number of undo levels
vim.opt.backspace = { "indent", "eol", "start" } -- Backspace behavior
vim.opt.foldmethod = "marker"
vim.opt.conceallevel = 2

-- Plugins
-- emmet
vim.g.user_emmet_leader_key = '<C-a>'

-- zig
vim.g.zig_fmt_autosave = 1

-- markdown
vim.g.vim_markdown_folding_disabled = 1
vim.g.vim_markdown_folding_level = 3
vim.g.vim_markdown_toc_autofit = 1
vim.g.vim_markdown_emphasis_multiline = 0
vim.g.tex_conceal = ""
vim.g.vim_markdown_math = 1
vim.g.vim_markdown_conceal_code_blocks = 1
vim.g.vim_markdown_fenced_languages = { 'c++=cpp', 'viml=vim', 'bash=sh', 'ini=dosini' }
vim.g.vim_markdown_follow_anchor = 1
vim.g.vim_markdown_math = 1
vim.g.vim_markdown_frontmatter = 1
vim.g.vim_markdown_toml_frontmatter = 1
vim.g.vim_markdown_strikethrough = 1
vim.g.vim_markdown_no_extensions_in_markdown = 1
vim.g.vim_markdown_autowrite = 1
vim.g.vim_markdown_auto_insert_bullets = 0
vim.g.vim_markdown_new_list_item_indent = 0
vim.g.vim_markdown_edit_url_in = 'tab'

-- NERDTree
vim.g.NERDTreeGitStatusUseNerdFonts = 1
vim.g.NERDTreeGitStatusShowClean = 1
vim.g.NERDTreeDirArrowExpandable = '>'
vim.g.NERDTreeDirArrowCollapsible = '<'
vim.g.NERDTreeMapToggleHidden = 'z'

-- goyo
vim.g.goyo_width = '90%'
vim.g.goyo_height = '100%'

-- limelight
vim.g.limelight_conceal_ctermfg = 'gray'
vim.g.limelight_conceal_guifg = 'gray'

-- devicon
vim.g.airline_powerline_fonts = 1
vim.g.webdevicons_enable_nerdtree = 1

-- vim-indent-guides
vim.g.indent_guides_enable_on_vim_startup = 0

-- vim-signify
vim.opt.updatetime = 100