1
Fork 0
satellite/dotfiles/neovim/lua/my/options.lua

49 lines
1.3 KiB
Lua
Raw Normal View History

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
2022-03-09 19:03:04 +01:00
-- Disable filetype.vim
vim.g.do_filetype_lua = true
vim.g.did_load_filetypes = false
2022-03-09 19:03:04 +01:00
-- Basic options
opt.joinspaces = false -- No double spaces with join
opt.list = true -- Show some invisible characters
opt.cmdheight = 0 -- Hide command line when it's not getting used
2022-03-09 19:03:04 +01:00
-- Line numbers
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
2022-03-09 19:03:04 +01:00
opt.ignorecase = true -- Ignore case
opt.smartcase = true -- Do not ignore case with capitals
2022-03-09 19:03:04 +01:00
opt.smartindent = true -- Insert indents automatically
2022-03-09 19:03:04 +01:00
opt.splitbelow = true -- Put new windows below current
opt.splitright = true -- Put new windows right of current
2022-03-09 19:03:04 +01:00
opt.wrap = false -- Disable line wrap (by default)
opt.wildmode = { 'list', 'longest' } -- Command-line completion mode
opt.completeopt = { "menu", "menuone", "noselect" }
-- Set leader
helpers.global("mapleader", " ")
2022-10-09 03:28:51 +02:00
-- Import other options
require("my.options.folding").setup()
2022-03-09 19:03:04 +01:00
end
return M