A very fast neovim config :D
1-- Appearance and Display
2vim.opt.number = true
3vim.opt.relativenumber = true
4vim.opt.signcolumn = "yes"
5vim.opt.showmode = false
6vim.opt.list = true
7vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
8vim.opt.termguicolors = true
9vim.opt.colorcolumn = "0"
10-- vim.opt.cursorline = true -- personally i don't use cursorline :(
11
12-- Indentation and Formatting
13vim.opt.smartindent = true
14vim.opt.autoindent = true
15vim.opt.expandtab = true
16vim.opt.shiftwidth = 4
17vim.opt.tabstop = 4
18vim.opt.breakindent = true
19vim.opt.wrap = false
20
21-- File Handling and Sessions
22vim.opt.undofile = true
23vim.opt.swapfile = false
24vim.opt.writebackup = false
25vim.opt.sessionoptions = "buffers,curdir,folds,help,tabpages,terminal,globals"
26vim.opt.backup = false
27vim.opt.undodir = os.getenv("HOME") .. "/.local/share/nvim/undodir"
28-- vim.opt.clipboard = "unnamedplus"
29
30-- Completion and UI
31vim.opt.pumheight = 10
32vim.opt.completeopt = { "menu", "menuone", "noselect" }
33vim.opt.cmdheight = 0 -- set to 1 or higher when debugging
34
35-- Folding and Syntax
36vim.opt.foldenable = true
37vim.opt.foldlevel = 99
38vim.opt.foldmethod = "manual" -- NOTE: other foldmethod doesn't work :)
39-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
40
41-- Search and Navigation
42vim.opt.hlsearch = true
43vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<CR>")
44vim.opt.jumpoptions = "view"
45vim.opt.scrolloff = 10
46vim.opt.incsearch = true
47
48-- Miscellaneous
49vim.opt.ignorecase = true
50vim.opt.smartcase = true
51vim.opt.sidescrolloff = 5
52vim.opt.updatetime = 100
53vim.opt.fillchars = {
54 foldopen = "",
55 foldclose = "",
56 fold = " ",
57 foldsep = " ",
58 diff = "/",
59 eob = " ",
60}
61vim.opt.syntax = "on"
62vim.opt.spelloptions = "camel,noplainbuffer"
63vim.opt.wildmode = "longest:full:full"
64vim.opt.wildignore = "*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx,*DS_STORE,*.db"
65vim.opt.isfname:append("@-@")
66vim.g.have_nerd_font = true
67-- vim.opt.guicursor = "" -- keeps the cursor same in insert mode
68vim.opt.exrc = true -- enable .nvimrc support
69
70vim.g.zig_fmt_autosave = 0 -- disable annoying zig auto formatting on write
71vim.g.zig_fmt_parse_errors = 0 -- disable error on new pane zig