From d115673d36b6bf73b20d5f914d5335d4d947d90b Mon Sep 17 00:00:00 2001 From: Tilo Klarenbeek Date: Mon, 19 Jun 2023 18:06:52 +0200 Subject: [PATCH] Changed autoformat and tabs --- init.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 37e66a9..e808c83 100644 --- a/init.lua +++ b/init.lua @@ -501,7 +501,6 @@ vim.cmd([[ vim.g.rustfmt_autosave = 1 -vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]] vim.api.nvim_set_keymap('i', '', 'lua require("renamer").rename()', { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', 'rn', 'lua require("renamer").rename()', { noremap = true, silent = true }) @@ -591,3 +590,14 @@ vim.api.nvim_set_keymap('n', 'm', 'lua require("harpoon.mark").add_ { noremap = true, silent = true }) vim.api.nvim_set_keymap('n', '', 'lua require("harpoon.ui").toggle_quick_menu()', { noremap = true, silent = true }) + +vim.opt.tabstop = 4 -- The width of a TAB is set to 4. +-- Still it is a \t. It is just that +-- Neovim will interpret it to be having +-- a width of 4. + +vim.opt.shiftwidth = 4 -- Indents will have a width of 4 + +vim.opt.softtabstop = 4 -- Sets the number of columns for a TAB + +vim.opt.expandtab = true -- Expand TABs to spaces