2022-03-09 19:03:04 +01:00
|
|
|
local helpers = require("my.helpers")
|
|
|
|
|
|
|
|
local M = {}
|
|
|
|
|
|
|
|
function M.setup()
|
|
|
|
local opt = vim.opt -- to set options
|
|
|
|
|
|
|
|
-- Basic options
|
|
|
|
opt.joinspaces = false -- No double spaces with join
|
|
|
|
opt.list = true -- Show some invisible characters
|
|
|
|
|
|
|
|
opt.number = true -- Show line numbers
|
|
|
|
opt.relativenumber = true -- Relative line numbers
|
|
|
|
|
2022-06-18 23:09:21 +02:00
|
|
|
-- TODO: only do this for specific filestypes
|
|
|
|
opt.expandtab = true -- Use spaces for the tab char
|
|
|
|
|
2022-03-09 19:03:04 +01:00
|
|
|
opt.scrolloff = 4 -- Lines of context
|
|
|
|
opt.shiftround = true -- Round indent
|
|
|
|
opt.shiftwidth = 2 -- Size of an indent
|
|
|
|
opt.termguicolors = true -- True color support
|
|
|
|
|
|
|
|
opt.ignorecase = true -- Ignore case
|
|
|
|
opt.smartcase = true -- Do not ignore case with capitals
|
|
|
|
|
|
|
|
opt.smartindent = true -- Insert indents automatically
|
|
|
|
|
|
|
|
opt.splitbelow = true -- Put new windows below current
|
|
|
|
opt.splitright = true -- Put new windows right of current
|
|
|
|
|
|
|
|
opt.wrap = false -- Disable line wrap
|
|
|
|
opt.wildmode = {'list', 'longest'} -- Command-line completion mode
|
|
|
|
opt.completeopt = {"menu", "menuone", "noselect"}
|
|
|
|
|
|
|
|
-- Set leader
|
2022-04-04 09:01:13 +02:00
|
|
|
helpers.global("mapleader", " ")
|
2022-03-13 15:16:19 +01:00
|
|
|
|
|
|
|
-- Import other options
|
|
|
|
require("my.options.folding").setup()
|
2022-03-09 19:03:04 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
return M
|