summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/core/options.lua
diff options
context:
space:
mode:
authorYigit Sever2023-08-20 23:38:05 +0300
committerYigit Sever2023-08-20 23:38:05 +0300
commit33fe27fd3dfbe21cf1ca9b4ab2b9c960e0ef9dd4 (patch)
tree029c93b57f88f36d4b8cf4a389a906faae535e79 /.config/nvim/lua/core/options.lua
parenta986d07da86e951180b5eea7dfd20d0da46e0cd8 (diff)
downloaddotfiles-33fe27fd3dfbe21cf1ca9b4ab2b9c960e0ef9dd4.tar.gz
dotfiles-33fe27fd3dfbe21cf1ca9b4ab2b9c960e0ef9dd4.tar.bz2
dotfiles-33fe27fd3dfbe21cf1ca9b4ab2b9c960e0ef9dd4.zip
nvim: nvim-ufo, bunch of fixes
Diffstat (limited to '.config/nvim/lua/core/options.lua')
-rw-r--r--.config/nvim/lua/core/options.lua97
1 files changed, 48 insertions, 49 deletions
diff --git a/.config/nvim/lua/core/options.lua b/.config/nvim/lua/core/options.lua
index 3299e83..1a45b8f 100644
--- a/.config/nvim/lua/core/options.lua
+++ b/.config/nvim/lua/core/options.lua
@@ -1,75 +1,74 @@
1local opts = { 1local opts = {
2 -- this might not be needed anymore 2 -- this might not be needed anymore
3 termguicolors = true, 3 termguicolors = true,
4 4
5 -- copy indent on a new line 5 -- copy indent on a new line
6 autoindent = true, 6 autoindent = true,
7 7
8 -- :h tabstop, 2. point 8 -- :h tabstop, 2. point
9 -- use appropriate number of spaces to insert a <Tab> 9 -- use appropriate number of spaces to insert a <Tab>
10 expandtab = true, 10 expandtab = true,
11 shiftwidth = 4, 11 shiftwidth = 4,
12 softtabstop = 4, 12 softtabstop = 4,
13 tabstop = 8, 13 tabstop = 8,
14 14
15 -- use english for spellchecking 15 -- use english for spellchecking
16 spelllang = "en_gb", 16 spelllang = "en_gb",
17 17
18 -- tab completion, zsh style 18 -- tab completion, zsh style
19 wildmode = "longest:full,full", 19 wildmode = "longest:full,full",
20 20
21 -- put one space for join (not two) 21 -- put one space for join (not two)
22 joinspaces = false, 22 joinspaces = false,
23 23
24 -- keep n lines above/below cursor while scrolling 24 -- keep n lines above/below cursor while scrolling
25 scrolloff = 4, 25 scrolloff = 4,
26 26
27 -- line numbers 27 -- line numbers
28 number = true, 28 number = true,
29 29
30 -- manual folding 30 -- manual folding
31 foldmethod = "marker", 31 foldcolumn = "0",
32 foldlevel = 99,
33 foldlevelstart = 99,
34 foldenable = true,
32 35
33 -- set the terminal title 36 -- set the terminal title
34 title = true, 37 title = true,
35 38
36 -- wrap using 'breakat' character 39 -- wrap using 'breakat' character
37 linebreak = true, 40 linebreak = true,
38 41
39 -- new split panes will split to below and right 42 -- new split panes will split to below and right
40 splitbelow = true, 43 splitbelow = true,
41 splitright = true, 44 splitright = true,
42 45
43 -- use relative line numbers 46 -- use relative line numbers
44 relativenumber = true, 47 relativenumber = true,
45 48
46 -- we are already using a cursorline, don't clobber linter messages 49 -- we are already using a cursorline, don't clobber linter messages
47 showmode = false, 50 showmode = false,
48 51
49 -- jump to the matching bracket briefly 52 -- jump to the matching bracket briefly
50 showmatch = true, 53 showmatch = true,
51 54
52 -- persistent undo 55 -- persistent undo
53 undofile = true, 56 undofile = true,
54 57
55 -- lower case searches ignore case, upper case searches do not 58 -- lower case searches ignore case, upper case searches do not
56 ignorecase = true, 59 ignorecase = true,
57 smartcase = true, 60 smartcase = true,
58 61
59 -- https://stackoverflow.com/a/3445040/ 62 -- https://stackoverflow.com/a/3445040/
60 -- switch case labels 63 -- switch case labels
61 cinoptions = "l1", 64 cinoptions = "l1",
62 65
63} 66}
64 67
65for opt, val in pairs(opts) do 68for opt, val in pairs(opts) do
66 vim.o[opt] = val 69 vim.o[opt] = val
67end 70end
68 71
69-- set other options
70-- local colorscheme = require("helpers.colorscheme")
71-- vim.cmd.colorscheme(colorscheme)
72
73-- interact with system clipboard 72-- interact with system clipboard
74vim.opt.clipboard:append('unnamedplus') 73vim.opt.clipboard:append('unnamedplus')
75 74
@@ -90,7 +89,7 @@ vim.opt.diffopt = {
90 89
91-- menu: use a popup menu to show the possible completions 90-- menu: use a popup menu to show the possible completions
92-- preview: show extra information 91-- preview: show extra information
93vim.opt.completeopt = {"menu", "menuone", "noselect"} 92vim.opt.completeopt = { "menu", "menuone", "noselect" }
94 93
95if vim.fn.executable("rg") then 94if vim.fn.executable("rg") then
96 vim.o.grepprg = "rg --vimgrep --no-heading --smart-case" 95 vim.o.grepprg = "rg --vimgrep --no-heading --smart-case"