summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2026-04-29 08:12:39 +0200
committerxengineering <me@xengineering.eu>2026-07-09 09:47:23 +0200
commit115ed0ef2dcfe49c67b594514a90e1cc25188125 (patch)
tree64663dc37ff028609e69828885174a93952af6f3
parentf37fcc07c8307286f7cf05586ee4ee75df7d68cb (diff)
downloaddotfiles-115ed0ef2dcfe49c67b594514a90e1cc25188125.tar
dotfiles-115ed0ef2dcfe49c67b594514a90e1cc25188125.tar.zst
dotfiles-115ed0ef2dcfe49c67b594514a90e1cc25188125.zip
nvim: Use colorcolumn per file type
This removes the global colorcolumn and adds one for Python and C. This allows to have a distraction free experience on all other file types and ones adapted to code guidelines for Python and C.
-rw-r--r--nvim/ftplugin/c.lua1
-rw-r--r--nvim/ftplugin/python.lua1
-rw-r--r--nvim/init.lua1
3 files changed, 2 insertions, 1 deletions
diff --git a/nvim/ftplugin/c.lua b/nvim/ftplugin/c.lua
new file mode 100644
index 0000000..ab34114
--- /dev/null
+++ b/nvim/ftplugin/c.lua
@@ -0,0 +1 @@
+vim.opt.colorcolumn = {81}
diff --git a/nvim/ftplugin/python.lua b/nvim/ftplugin/python.lua
new file mode 100644
index 0000000..ac91ce3
--- /dev/null
+++ b/nvim/ftplugin/python.lua
@@ -0,0 +1 @@
+vim.opt.colorcolumn = {89}
diff --git a/nvim/init.lua b/nvim/init.lua
index f29938d..93b12e3 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -25,7 +25,6 @@ vim.opt.number = true
vim.opt.shiftwidth = 4
vim.opt.autoindent = true
vim.opt.spelllang = {'en_gb', 'de_de'}
-vim.opt.colorcolumn = {81}
vim.opt.encoding = 'utf-8'
vim.opt.fileencodings = {'utf-8'}
vim.opt.list = true