From d2d59eefa04ee0c28c55047683b908cbfcee9819 Mon Sep 17 00:00:00 2001 From: Sam Willcocks Date: Sat, 19 Nov 2022 22:35:30 +0000 Subject: [PATCH] vim: Tweak textwidth, fix python autoindent --- home/init.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/home/init.lua b/home/init.lua index 61a46a5..c68cc94 100644 --- a/home/init.lua +++ b/home/init.lua @@ -2,12 +2,13 @@ vim.o.number = true vim.o.relativenumber = true -- number + relativenumber == hybrid vim.o.mouse = "nvi" -- mouse mode in normal, visual and insert -vim.o.textwidth = 88 -- A vaguely sensible default textwidth -vim.o.colorcolumn = "+0" -- Mark the textwidth +vim.o.textwidth = 88 -- a vaguely sensible default textwidth +vim.o.formatoptions = "cqj" -- the default, but minus `t` which autowraps text. +vim.o.colorcolumn = "+0" -- mark the textwidth vim.o.shiftwidth = 4 vim.o.tabstop = 4 vim.o.softtabstop = 4 -vim.o.expandtab = true +vim.o.expandtab = true -- owo expands ur tab vim.o.list = true vim.o.listchars = "trail:ยท" -- show trailing spaces @@ -19,3 +20,6 @@ vim.o.termguicolors = true -- Keybinds vim.api.nvim_set_keymap('n','', ' FZF', { noremap=true }) +-- Language-specific +vim.g.pyindent_open_paren = "shiftwidth()" -- Don't double indent after ( you villain. +