From 43d6f16f3111fd2a76db0a2f70c4b5527ce874af Mon Sep 17 00:00:00 2001 From: Ibrahim Muftee Date: Sat, 10 Aug 2024 23:42:58 -0500 Subject: feat(nvim): make column 80 default for everything but python --- dot_config/nvim/after/ftplugin/python.lua | 4 ++++ dot_config/nvim/lua/ibrahim/set.lua.tmpl | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 dot_config/nvim/after/ftplugin/python.lua (limited to 'dot_config/nvim') diff --git a/dot_config/nvim/after/ftplugin/python.lua b/dot_config/nvim/after/ftplugin/python.lua new file mode 100644 index 0000000..b06591a --- /dev/null +++ b/dot_config/nvim/after/ftplugin/python.lua @@ -0,0 +1,4 @@ +-- Colored columns at 72 and 88 are for line lengths, and are based on +-- Python conventions. Docstrings in Python should terminate at 72 +-- characters, and 88 is the max line length for the Black formatter. +vim.opt_local.colorcolumn = { 72, 88 } diff --git a/dot_config/nvim/lua/ibrahim/set.lua.tmpl b/dot_config/nvim/lua/ibrahim/set.lua.tmpl index f8f67ba..019fa4f 100644 --- a/dot_config/nvim/lua/ibrahim/set.lua.tmpl +++ b/dot_config/nvim/lua/ibrahim/set.lua.tmpl @@ -71,10 +71,8 @@ opt.updatetime = 250 -- Enable signcolumn (used for diagnostics and gitsigns) opt.signcolumn = "yes" --- Colored columns at 72 and 88 are for line lengths, and are based on --- Python conventions. Docstrings in Python should terminate at 72 --- characters, and 88 is the max line length for the Black formatter. -opt.colorcolumn = { 72, 88 } +-- Column at line 80 +opt.colorcolumn = "80" -- Set completeopt to have a better completion experience opt.completeopt = "menuone,noselect" -- cgit v1.2.3