summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dot_config/nvim/after/ftplugin/python.lua4
-rw-r--r--dot_config/nvim/lua/ibrahim/set.lua.tmpl6
2 files changed, 6 insertions, 4 deletions
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"