aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/nvim/lua/cfg/options.lua
blob: ee957a22c4c67c33f3fae90bfa207cecd453fb67 (plain) (blame)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
local opt = vim.opt

opt.undofile = true
opt.swapfile = false
opt.shadafile = "NONE"

opt.number = true
opt.cursorline = true
opt.signcolumn = "auto:2"
opt.showmatch = true

opt.expandtab = true
opt.shiftround = true
opt.shiftwidth = 0
opt.softtabstop = -1
opt.tabstop = 4

opt.splitbelow = true
opt.splitright = true

opt.linebreak = true
opt.breakindent = true
opt.textwidth = 80
opt.colorcolumn = "+1"
opt.formatoptions:remove("t")

opt.cmdheight = 2

opt.shortmess:append({ a = true })

opt.gdefault = true
opt.synmaxcol = 500

opt.completeopt = { "menu", "menuone", "noselect" }
opt.scrolloff = 999
opt.sidescrolloff = 5

opt.clipboard = "unnamedplus"

opt.wildmode = { "longest", "full" }

opt.cpoptions:remove({ "_" })

opt.listchars = {
  tab = "> ",
  trail = "·",
  extends = ">",
  precedes = "<",
  nbsp = "+",
}
opt.list = true

opt.virtualedit = "block"
opt.spelloptions = "camel"

vim.g.is_posix = 1
vim.g.python_host_prog = 0
vim.g.python3_host_prog = 0
vim.g.netrw_home = vim.fn.stdpath("data")

vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.loaded_netrwSettings = 1
vim.g.loaded_netrwFileHandlers = 1
vim.g.loaded_gzip = 1
vim.g.loaded_zip = 1
vim.g.loaded_zipPlugin = 1
vim.g.loaded_tar = 1
vim.g.loaded_tarPlugin = 1
vim.g.loaded_zipPlugin = 1
vim.g.loaded_getscript = 1
vim.g.loaded_getscriptPlugin = 1
vim.g.loaded_vimball = 1
vim.g.loaded_vimballPlugin = 1
vim.g.loaded_2html_plugin = 1
vim.g.loaded_logipat = 1
vim.g.loaded_rrhelper = 1
vim.g.loaded_matchparen = 1
vim.g.loaded_spec = 1

opt.diffopt:append({
  ["indent-heuristic"] = true,
  hiddenoff = true,
  iblank = true,
  iwhiteall = true,
  algorithm = "histogram",
})

if vim.fn.executable("rg") then
  opt.grepprg = "rg\\ --vimgrep"
  opt.grepformat:append("f:%l:%c:%m")
end

opt.termguicolors = true
opt.pumblend = 20

opt.foldmethod = "expr"
opt.foldexpr = "nvim_treesitter#foldexpr()"
opt.foldenable = false

vim.g.mapleader = " "
vim.g.maplocalleader = ","

vim.diagnostic.config({
  virtual_text = {
    source = "if_many",
    severity = vim.diagnostic.severity.ERROR,
  }
})