summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/settings.lua
blob: aa2bdd8da76a415a2543e7fb1a9cb1d57d6b0607 (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
---  HELPERS  ---

local cmd = vim.cmd
local opt = vim.opt

---  VIM ONLY COMMANDS  ---

cmd "filetype plugin on"
cmd('let &titleold="' .. TERMINAL .. '"')
cmd "set inccommand=split"
cmd "set iskeyword+=-"

if O.line_wrap_cursor_movement then
  cmd "set whichwrap+=<,>,[,],h,l"
end

if O.transparent_window then
  cmd "au ColorScheme * hi Normal ctermbg=none guibg=none"
  cmd "au ColorScheme * hi SignColumn ctermbg=none guibg=none"
  cmd "au ColorScheme * hi NormalNC ctermbg=none guibg=none"
  cmd "au ColorScheme * hi MsgArea ctermbg=none guibg=none"
  cmd "au ColorScheme * hi TelescopeBorder ctermbg=none guibg=none"
  cmd "au ColorScheme * hi NvimTreeNormal ctermbg=none guibg=none"
  cmd "let &fcs='eob: '"
end

---  SETTINGS  ---

opt.shortmess:append "c"

for _, plugin in pairs(O.disabled_built_ins) do
  vim.g["loaded_" .. plugin] = 1
end

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