1
0

From the ground up!

Basic options for neovim
Simple install script to pull changes from the system
This commit is contained in:
2025-09-24 16:42:00 +01:00
commit 1f4f7dc0dc
2 changed files with 65 additions and 0 deletions

41
config/nvim/init.lua Normal file
View File

@@ -0,0 +1,41 @@
-- Basic options
vim.o.tabstop = 2
vim.o.shiftwidth = 0
vim.o.expandtab = false
vim.o.list = true
vim.o.clipboard = "unnamedplus"
vim.o.ff = "unix"
vim.o.ffs = "unix,dos"
vim.o.switchbuf = "useopen,uselast"
vim.o.textwidth = 95
vim.o.wrapmargin = 5
vim.o.number = true
vim.o.relativenumber = true
vim.o.splitbelow = true
vim.o.splitright = true
vim.o.autoread = true
vim.o.lazyredraw = true
vim.o.cursorline = true
vim.o.ignorecase = true
vim.o.wrap = false
vim.o.wildmenu = false
vim.o.termguicolors = true
vim.o.cindent = true
vim.o.timeoutlen = 1500
vim.o.completeopt = "preview"
vim.o.wildmode = "full"
vim.o.cinoptions = "l1,b-s"
vim.o.statusline = "%#LineNr# [%n] %#Default# %f%m%r %= %#StatusLineNC# %w[%{&ft == '' ? 'None' : ''}%Y] %#LineNr# Line: %l Column: %c "
vim.opt.errorformat = {
"%f:%l:%c: fatal %trror: %m", -- gcc/clang fatal error
"%f:%l:%c: %trror: %m", -- gcc/clang error
"%f:%l:%c: %tarning: %m", -- gcc/clang warning
"%-G%m" -- Ignore anything else
}
vim.opt.formatoptions:append("/")
vim.opt.cinkeys:append("0=break")
vim.opt.listchars:append({ lead = "." })

24
install Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
set -e
Pull() {
# Allows system changes to be pulled into the repository to be committed
#
echo "[Info] :: Pulling dotfile changes from $1"
cp -r "$1/.config/nvim" "config/"
}
INSTALL_DIR=${2:-$HOME}
ACTION=${1:-push}
[[ -z $INSTALL_DIR ]] && echo "[Error] :: Installation directory not set" && exit 1
case $ACTION in
pull)
Pull $INSTALL_DIR
;;
*)
echo "usage: $0 <push|pull|diff> [dir]"
;;
esac