2022-07-23 11:52:42 +02:00
|
|
|
|
vim.cmd([[set undofile]])
|
|
|
|
|
vim.cmd([[set completeopt-=preview]])
|
|
|
|
|
vim.cmd([[set viewoptions-=options]])
|
|
|
|
|
vim.g.mapleader = ","
|
2021-04-18 18:51:03 +02:00
|
|
|
|
vim.o.hidden = true
|
2022-07-23 11:52:42 +02:00
|
|
|
|
vim.o.mouse = "a"
|
2021-04-18 18:51:03 +02:00
|
|
|
|
vim.o.splitbelow = true
|
|
|
|
|
vim.o.splitright = true
|
|
|
|
|
vim.o.ttimeout = true
|
|
|
|
|
vim.o.ttimeoutlen = 50
|
|
|
|
|
vim.o.updatetime = 100
|
|
|
|
|
vim.o.autochdir = true
|
2021-06-17 11:29:04 +02:00
|
|
|
|
vim.o.backupdir = "/home/dln/.local/share/nvim/backup/"
|
|
|
|
|
vim.o.backup = true
|
2022-03-04 12:11:26 +01:00
|
|
|
|
vim.g.netrw_dirhistmax = 0
|
|
|
|
|
vim.o.clipboard = "unnamedplus"
|
2022-09-10 12:04:50 +02:00
|
|
|
|
vim.g.do_filetype_lua = 1
|
2022-11-30 12:59:30 +01:00
|
|
|
|
vim.o.spell = true
|
|
|
|
|
vim.o.spelllang = "en_us"
|
2021-04-20 18:10:56 +02:00
|
|
|
|
|
2021-04-18 18:51:03 +02:00
|
|
|
|
--- Indent
|
2022-01-12 15:58:29 +01:00
|
|
|
|
vim.o.autoindent = true
|
2021-04-20 18:10:56 +02:00
|
|
|
|
vim.o.breakindent = true
|
2022-01-12 15:58:29 +01:00
|
|
|
|
vim.o.expandtab = true
|
|
|
|
|
vim.o.smartindent = true
|
2021-04-18 18:51:03 +02:00
|
|
|
|
vim.o.joinspaces = false
|
2022-07-23 11:52:42 +02:00
|
|
|
|
vim.o.listchars = "extends:›,precedes:‹,nbsp:·,tab:→ ,trail:·"
|
2021-04-18 18:51:03 +02:00
|
|
|
|
vim.wo.foldlevel = 99
|
|
|
|
|
vim.wo.linebreak = true
|
|
|
|
|
vim.wo.list = true
|
2021-06-17 11:29:04 +02:00
|
|
|
|
vim.o.shiftwidth = 2
|
|
|
|
|
vim.o.tabstop = 2
|
|
|
|
|
vim.o.softtabstop = 2
|
2021-04-18 18:51:03 +02:00
|
|
|
|
|
|
|
|
|
--- Search
|
2022-07-23 11:52:42 +02:00
|
|
|
|
vim.cmd("set path+=**")
|
2022-11-07 16:22:21 +01:00
|
|
|
|
vim.cmd("set wildignore+=/var/*,*.so,*.swp,*.zip,*.tar,*.pyc")
|
2021-04-18 18:51:03 +02:00
|
|
|
|
vim.o.ignorecase = true
|
|
|
|
|
vim.o.smartcase = true
|
2022-07-23 11:52:42 +02:00
|
|
|
|
vim.o.wildmode = "longest:full,full"
|
2021-04-18 18:51:03 +02:00
|
|
|
|
|
2022-07-23 11:52:42 +02:00
|
|
|
|
if vim.fn.executable("rg") then
|
|
|
|
|
vim.o.grepprg = "rg --vimgrep --no-heading --smart-case"
|
2021-04-18 18:51:03 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--- Completion
|
2022-07-23 11:52:42 +02:00
|
|
|
|
vim.cmd("set shortmess+=c")
|
|
|
|
|
vim.o.completeopt = "menuone,noinsert,noselect"
|
2021-04-18 18:51:03 +02:00
|
|
|
|
|
|
|
|
|
--- Appearance
|
2022-07-23 11:52:42 +02:00
|
|
|
|
vim.o.background = "light"
|
2022-09-10 12:04:50 +02:00
|
|
|
|
vim.o.scrolloff = 7
|
2021-04-18 18:51:03 +02:00
|
|
|
|
vim.o.showmode = false
|
|
|
|
|
vim.o.sidescrolloff = 5
|
|
|
|
|
vim.o.termguicolors = true
|
|
|
|
|
vim.wo.cursorline = true
|
|
|
|
|
vim.wo.number = true
|
2021-04-20 18:10:56 +02:00
|
|
|
|
vim.wo.signcolumn = "yes"
|
2022-09-10 12:04:50 +02:00
|
|
|
|
vim.o.laststatus = 3
|
2022-11-07 16:22:21 +01:00
|
|
|
|
vim.o.cmdheight = 1
|
2022-09-10 12:04:50 +02:00
|
|
|
|
-- vim.o.statusline = "═"
|
|
|
|
|
-- vim.o.title = true
|
|
|
|
|
-- vim.o.titlestring = "%F%m %r %y"
|
2022-11-22 09:56:09 +01:00
|
|
|
|
vim.o.fillchars = "stl: ,stlnc: "
|
2022-03-04 12:11:26 +01:00
|
|
|
|
vim.wo.foldmethod = "expr"
|
|
|
|
|
vim.wo.foldexpr = "nvim_treesitter#foldexpr()"
|
2021-04-18 18:51:03 +02:00
|
|
|
|
vim.g.netrw_dirhistmax = 0
|
|
|
|
|
|
2022-09-10 12:17:35 +02:00
|
|
|
|
--- Key mappings
|
|
|
|
|
vim.keymap.set("n", "<C-l>", ':let @/=""<CR>') -- clear search
|
|
|
|
|
vim.keymap.set("n", ",L", ":luafile %<CR>") -- Reload lua file
|