From f63403e394c3fb52827b9362cd31a0a3bdbf08ec Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Mon, 7 Sep 2026 11:31:58 +0200 Subject: Unterstützung für jsonc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/ftplugin/json.lua | 8 +++----- nvim/ftplugin/jsonc.lua | 5 +++++ 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 nvim/ftplugin/jsonc.lua (limited to 'nvim/ftplugin') diff --git a/nvim/ftplugin/json.lua b/nvim/ftplugin/json.lua index a6321ff..73b5935 100644 --- a/nvim/ftplugin/json.lua +++ b/nvim/ftplugin/json.lua @@ -1,5 +1,3 @@ -local opt = vim.opt_local - -opt.expandtab = true -opt.shiftwidth = 2 -opt.tabstop = 2 +-- Standard-Dateityp für .json-Dateien ist "jsonc" (siehe lua/config/filetypes.lua). +-- Buffer, deren Dateityp explizit "json" ist, erben dieselben Einstellungen. +vim.cmd("runtime! ftplugin/jsonc.lua") diff --git a/nvim/ftplugin/jsonc.lua b/nvim/ftplugin/jsonc.lua new file mode 100644 index 0000000..a6321ff --- /dev/null +++ b/nvim/ftplugin/jsonc.lua @@ -0,0 +1,5 @@ +local opt = vim.opt_local + +opt.expandtab = true +opt.shiftwidth = 2 +opt.tabstop = 2 -- cgit v1.3