1 ---@diagnostic disable: codestyle-check
2 -- With cursor on an option use <leader>h to open HELP page for it <--
3 MAP().nmap("<leader>h", ":h '<C-r><C-w>'<CR>*<C-w>Lzz<C-w><C-p>", "open [h]elp for current word")
6 local global_options
= { --<--
7 autowriteall
= true, -- Autosave when quitting
8 browsedir
= "buffer", -- Use directory of buffer if browser
9 cmdwinheight
= 20, -- Lines of command-line window <C-f>
10 completeopt
= "menu,menuone,preview",
11 confirm
= true, -- Ask when closing unsaved changes
12 diffopt
= "filler,context:3,vertical,closeoff,hiddenoff,followwrap,internal",
13 display
= "lastline,uhex",-- Show last line in window, and hexadecimal as <xx>
14 eadirection
= "ver", -- Make only vertical splits equal with <C-w>e
15 equalalways
= false, -- Don't make all split equal when creating new
16 exrc
= true, -- Source .nvim.lua, .nvimrc, .exrc files in cwd
17 fillchars
= "diff: ,eob: ", -- No fillchars in diff and end of buffer
18 --foldclose = "all", -- Fold is closed when the cursor isn't in it
19 fsync
= true, -- Fsync() will be called after saving a file
20 gdefault
= true, -- ":substitute" flag 'g' is default on
21 ignorecase
= true, -- Ignore case in search patterns
22 inccommand
= "split", -- Show effect of :s of off-screen lines
23 keywordprg
= ":help", -- Open vim help with K
24 laststatus
= 3, -- Global statusline at the bottom
25 more
= true, -- listing continues until finished
26 mouse
= "nvicr", -- mouse in norm, vis, ins, comm, more-prompt
27 mousemodel
= "popup_setpos", -- cursor will be moved where the mouse was clicked
28 report
= 0, -- Threshold for reporting number of lines changed
29 ruler
= false, -- Hide cursor position in status line
30 scrolljump
= 10, -- Going down from the last line scroll 10 lines
31 shortmess
= "atsOFWc", -- Avoids many prompt messages
32 showcmdloc
= "statusline", -- Show : in statusline when starting a command
33 showmode
= false, -- Don't show mode in last line
34 showtabline
= 2, -- Always show tabline
35 sidescrolloff
= 999, -- keeping the cursor horizontally centered
36 signcolumn
= "auto:2-9", -- Show sign in the number column
37 smartcase
= true, -- If search starts with capital don't ignore case
38 splitbelow
= true, -- New window below current
39 splitkeep
= "screen", -- Resizing splits keeps text on the same screen line
40 splitright
= true, -- Split to the right
41 statusline
= "%S %l/%L col:%c %= %y Buffer:%n ",
42 termguicolors
= true, -- 24-bit color in the TUI
43 tildeop
= true, -- Tilde behaves like operator
44 timeoutlen
= 300, -- Wait time for mapping to complete
45 updatetime
= 250, -- Decrease cursorhold update time
46 wildoptions
= "fuzzy,pum" -- Use fuzzy to find completion matches
50 local window_options
= { --<--
51 breakindent
= true, -- wrapped line will continue visually indented
52 breakindentopt
= "min:50", -- no text occupying lot of vertical space
53 concealcursor
= "n", -- text can also be concealed in NORMAL mode
54 conceallevel
= 1, -- Concealed text is replaced with one character
55 cursorline
= true, -- Highlights the text line with cursor on it
56 cursorlineopt
= "number,line", -- Number is highlighted too
59 foldmethod
= "marker",
60 list
= true, -- Show icons for whitespace
62 nbsp
= '⦸', -- Non breakable space character 0xA0 and U+202F
65 extends
= '→', -- When line keeps going to the left of window
70 relativenumber
= true,
72 -- statuscolumn = "%s%=%T%{v:relnum?v:relnum:v:lnum}│ %T",
73 virtualedit
= "block,insert",
76 local buffer_options
= { --<--
77 copyindent
= true, -- Copy structure when autoindenting newline
78 expandtab
= true, -- Use spaces in insert mode (<C-v><TAB> for tab)
86 -- disable builtin plugins for faster startuptime
87 vim
.g
.loaded_python3_provider
= 1
88 vim
.g
.loaded_python_provider
= 1
89 vim
.g
.loaded_node_provider
= 1
90 vim
.g
.loaded_ruby_provider
= 1
91 vim
.g
.loaded_perl_provider
= 1
93 if not vim
.g
.colors_name
then
94 vim
.cmd
.colorscheme("sorbet")
99 vim
.opt
.iskeyword
:append("-")
101 for _
, tbl
in ipairs({ global_options
, buffer_options
, window_options
}) do
102 for k
, v
in pairs(tbl
) do