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

47 lines
1.4 KiB
Lua
Raw Normal View History

2022-03-09 19:03:04 +01:00
local helpers = require("my.helpers")
local M = {}
function M.setup()
-- 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
2022-12-26 20:07:10 +01:00
vim.opt.joinspaces = false -- No double spaces with join
vim.opt.list = true -- Show some invisible characters
vim.opt.cmdheight = 0 -- Hide command line when it's not getting used
2022-03-09 19:03:04 +01:00
-- Line numbers
2022-12-26 20:07:10 +01:00
vim.opt.number = true -- Show line numbers
vim.opt.relativenumber = true -- Relative line numbers
2022-06-18 23:09:21 +02:00
-- TODO: only do this for specific filestypes
2022-12-26 20:07:10 +01:00
vim.opt.expandtab = true -- Use spaces for the tab char
2022-03-09 19:03:04 +01:00
2022-12-26 20:07:10 +01:00
vim.opt.scrolloff = 4 -- Lines of context
vim.opt.shiftround = true -- Round indent
vim.opt.shiftwidth = 2 -- Size of an indent
vim.opt.termguicolors = true -- True color support
2022-03-09 19:03:04 +01:00
2022-12-26 20:07:10 +01:00
vim.opt.ignorecase = true -- Ignore case
vim.opt.smartcase = true -- Do not ignore case with capitals
2022-03-09 19:03:04 +01:00
2022-12-26 20:07:10 +01:00
vim.opt.smartindent = true -- Insert indents automatically
2022-03-09 19:03:04 +01:00
2022-12-26 20:07:10 +01:00
vim.opt.splitbelow = true -- Put new windows below current
vim.opt.splitright = true -- Put new windows right of current
2022-03-09 19:03:04 +01:00
2022-12-26 20:07:10 +01:00
vim.opt.wrap = false -- Disable line wrap (by default)
vim.opt.wildmode = { 'list', 'longest' } -- Command-line completion mode
vim.opt.completeopt = { "menu", "menuone", "noselect" }
-- Set leader
2022-12-26 20:07:10 +01:00
vim.g.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