From 4b79b603d3521dd4aa07a8421f92285ce23160aa Mon Sep 17 00:00:00 2001 From: Jasper Bok Date: Tue, 27 Feb 2024 18:09:33 +0100 Subject: [PATCH] Add JSON augroup to neovim config --- private_dot_config/nvim/init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/private_dot_config/nvim/init.lua b/private_dot_config/nvim/init.lua index 7325f1d..4429fd6 100644 --- a/private_dot_config/nvim/init.lua +++ b/private_dot_config/nvim/init.lua @@ -78,6 +78,13 @@ vim.api.nvim_create_autocmd('FileType', { command = 'setlocal tabstop=3|setlocal shiftwidth=3|setlocal softtabstop=3|setlocal tw=72' }) +local json_augroup = vim.api.nvim_create_augroup('filetype_json', {clear = true}) +vim.api.nvim_create_autocmd('FileType', { + pattern = 'json', + group = json_augroup, + command = 'setlocal tabstop=2|setlocal shiftwidth=2|setlocal softtabstop=2' +}) + -- ---------------------------------- -- Plugins -- ----------------------------------