From eed68ee2657e3504e87bf1db76bc65e22e7ccad3 Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 20 Sep 2023 03:50:27 +0200 Subject: [PATCH] nvim: specified standard tab settings and made everything lua --- .config/nvim/after/ftplugin/c.lua | 4 +--- .config/nvim/after/ftplugin/java.lua | 1 - .config/nvim/after/ftplugin/javascript.lua | 1 - .config/nvim/after/ftplugin/lua.lua | 1 - .config/nvim/after/ftplugin/markdown.lua | 1 - .config/nvim/after/ftplugin/nim.lua | 4 ---- .config/nvim/after/ftplugin/python.lua | 4 ---- .config/nvim/after/ftplugin/tex.lua | 4 +--- .config/nvim/init.lua | 6 ++++++ 9 files changed, 8 insertions(+), 18 deletions(-) delete mode 100644 .config/nvim/after/ftplugin/nim.lua delete mode 100644 .config/nvim/after/ftplugin/python.lua diff --git a/.config/nvim/after/ftplugin/c.lua b/.config/nvim/after/ftplugin/c.lua index cb03fe4..62df926 100644 --- a/.config/nvim/after/ftplugin/c.lua +++ b/.config/nvim/after/ftplugin/c.lua @@ -1,9 +1,7 @@ vim.api.nvim_create_autocmd({ 'VimLeave' }, { - command = '!cclear' + callback = function() os.execute('cclear') end }) vim.o.shiftwidth = 2 vim.o.softtabstop = 2 -vim.o.textwidth = 80 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/after/ftplugin/java.lua b/.config/nvim/after/ftplugin/java.lua index a3b127f..3c53a56 100644 --- a/.config/nvim/after/ftplugin/java.lua +++ b/.config/nvim/after/ftplugin/java.lua @@ -1,4 +1,3 @@ vim.o.shiftwidth = 2 vim.o.softtabstop = 2 vim.o.textwidth = 100 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/after/ftplugin/javascript.lua b/.config/nvim/after/ftplugin/javascript.lua index a3b127f..3c53a56 100644 --- a/.config/nvim/after/ftplugin/javascript.lua +++ b/.config/nvim/after/ftplugin/javascript.lua @@ -1,4 +1,3 @@ vim.o.shiftwidth = 2 vim.o.softtabstop = 2 vim.o.textwidth = 100 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/after/ftplugin/lua.lua b/.config/nvim/after/ftplugin/lua.lua index a3b127f..3c53a56 100644 --- a/.config/nvim/after/ftplugin/lua.lua +++ b/.config/nvim/after/ftplugin/lua.lua @@ -1,4 +1,3 @@ vim.o.shiftwidth = 2 vim.o.softtabstop = 2 vim.o.textwidth = 100 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua index 265c4f9..6b8207d 100644 --- a/.config/nvim/after/ftplugin/markdown.lua +++ b/.config/nvim/after/ftplugin/markdown.lua @@ -6,4 +6,3 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'FileType' }, vim.o.shiftwidth = 2 vim.o.softtabstop = 2 vim.o.textwidth = 100 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/after/ftplugin/nim.lua b/.config/nvim/after/ftplugin/nim.lua deleted file mode 100644 index dda63ad..0000000 --- a/.config/nvim/after/ftplugin/nim.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.o.shiftwidth = 2 -vim.o.softtabstop = 2 -vim.o.textwidth = 80 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/after/ftplugin/python.lua b/.config/nvim/after/ftplugin/python.lua deleted file mode 100644 index dda63ad..0000000 --- a/.config/nvim/after/ftplugin/python.lua +++ /dev/null @@ -1,4 +0,0 @@ -vim.o.shiftwidth = 2 -vim.o.softtabstop = 2 -vim.o.textwidth = 80 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/after/ftplugin/tex.lua b/.config/nvim/after/ftplugin/tex.lua index 8b74cda..9af9625 100644 --- a/.config/nvim/after/ftplugin/tex.lua +++ b/.config/nvim/after/ftplugin/tex.lua @@ -1,9 +1,7 @@ vim.api.nvim_create_autocmd({ 'VimLeave' }, { - command = '!texclear %' + callback = function() os.execute('texclear ' .. vim.fn.expand('%')) end }) vim.o.shiftwidth = 2 vim.o.softtabstop = 2 -vim.o.textwidth = 80 -vim.o.colorcolumn = "-0" diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 89f756f..3636337 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -73,6 +73,12 @@ vim.o.foldenable = true vim.o.conceallevel = 0 vim.g.markdown_folding = 1 +-- standard settings for colorcolumn and tabbing +vim.o.shiftwidth = 4 +vim.o.softtabstop = 4 +vim.o.textwidth = 80 +vim.o.colorcolumn = "-0" + -- read files correctly vim.filetype.add({ extension = {