This commit is enough to make nvim start and bootstrap lazy to actually use this commit as a base for your own config - Add the directory 'lua/plugins/spec' - Place plugin specs there - Edit configuration as needed
97 lines
2.7 KiB
Lua
97 lines
2.7 KiB
Lua
-- Default options for all file types
|
|
|
|
local opt = vim.opt -- lazy shortcut to save on typing
|
|
|
|
vim.g.mapleader = "\\"
|
|
vim.g.maplocalleader = ","
|
|
|
|
-- Show line number for current line
|
|
-- And the relative line for all others
|
|
opt.relativenumber = true
|
|
opt.number = true
|
|
|
|
-- Make searching easier
|
|
opt.ignorecase = true -- Searching should not care about case
|
|
opt.smartcase = true -- except from when you specify it in the search
|
|
opt.hlsearch = true -- highlights all searches (this is now a Nvim DEFAULT)
|
|
opt.incsearch = ture -- begins searching as you type (also a DEFAULT)
|
|
|
|
-- Split in a more sensible manner
|
|
-- Splits go to the right or bottom keeping the original in the top left
|
|
-- This is similar to the dwm/dwl attachtop patch
|
|
opt.splitright = true
|
|
opt.splitbelow = true
|
|
|
|
-- Setting timeout allows whichkey to appear much faster
|
|
-- In this case immediately
|
|
opt.timeout = true
|
|
opt.timeoutlen = 0
|
|
|
|
-- Keep more context on screen where possible
|
|
opt.scrolloff = 15
|
|
opt.sidescroll = 6
|
|
|
|
-- Force full 24 colour support
|
|
-- Nvim should detect this but it doesn't always
|
|
opt.termguicolors = true
|
|
|
|
-- let Nvim set terminal title
|
|
opt.title = true
|
|
|
|
-- Set default spell language (correctly this time)
|
|
opt.spelllang = "en_gb"
|
|
|
|
-- Ignore some files (compiled) when expanding or globbing
|
|
opt.wildignore = {
|
|
"*pycache*",
|
|
"*.o",
|
|
"*~",
|
|
"*.pyc",
|
|
"*.pdf",
|
|
}
|
|
|
|
-- configure folding
|
|
opt.foldmethod = "expr" -- use an expression for folding
|
|
opt.foldexpr = "nvim_treesitter#foldexpr()" -- Use treesitter to fold
|
|
opt.foldminlines = 5 -- don't fold small items
|
|
opt.foldclose = "all" -- close any out of focus fold
|
|
opt.foldlevelstart = 1 -- always show top level
|
|
|
|
-- configure sign column (this is used by some plugins)
|
|
opt.signcolumn = "auto:2-5" -- auto-size from 2 to 5 cells
|
|
|
|
-- highlight the line the cursor is on
|
|
opt.cursorline = true
|
|
|
|
-- UI
|
|
opt.showmode = false -- do not show current mode (this is done by my statusline plugin)
|
|
opt.showcmd = true
|
|
opt.cmdheight = 1
|
|
opt.background = "dark"
|
|
opt.laststatus = 0
|
|
|
|
-- indentation & wrapping
|
|
opt.autoindent = true -- inherit indenting when adding new lines
|
|
opt.cindent = true
|
|
opt.wrap = true -- long lines will wrap
|
|
|
|
opt.tabstop = 4 -- medium tabs
|
|
opt.shiftwidth = 4
|
|
opt.softtabstop = 4
|
|
opt.expandtab = false -- Tabs > Spaces Tab Supremacy!!
|
|
|
|
opt.breakindent = true -- make it easier to see where line wrapping occured
|
|
opt.showbreak = ""
|
|
opt.linebreak = true
|
|
|
|
-- MISC
|
|
opt.belloff = "all" -- no window flashing or beeping
|
|
opt.clipboard = "unnamedplus" -- clipboard links to system clipboard (providing appropriate tools are installed)
|
|
opt.mouse = "a" -- use mouse in all modes
|
|
|
|
opt.shortmess = ""
|
|
.. "s" -- don't give search messages
|
|
.. "W" -- don't give file written messages
|
|
.. "I" -- don't give intro message
|
|
.. "F" -- don't give file info when editing
|