From 62a3a13e0a3dc5fdb3f85b4b7ddb8ab0b97c8b52 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Tue, 8 Sep 2026 15:07:39 +0200 Subject: Einfacheres JSON(c)-Handling --- nvim/ftplugin/json.lua | 8 +++++--- nvim/ftplugin/jsonc.lua | 8 +++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'nvim/ftplugin') diff --git a/nvim/ftplugin/json.lua b/nvim/ftplugin/json.lua index 341b728..a6321ff 100644 --- a/nvim/ftplugin/json.lua +++ b/nvim/ftplugin/json.lua @@ -1,3 +1,5 @@ --- 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") +local opt = vim.opt_local + +opt.expandtab = true +opt.shiftwidth = 2 +opt.tabstop = 2 diff --git a/nvim/ftplugin/jsonc.lua b/nvim/ftplugin/jsonc.lua index a6321ff..4c9fd66 100644 --- a/nvim/ftplugin/jsonc.lua +++ b/nvim/ftplugin/jsonc.lua @@ -1,5 +1,3 @@ -local opt = vim.opt_local - -opt.expandtab = true -opt.shiftwidth = 2 -opt.tabstop = 2 +-- jsonc entsteht nicht durch Dateityp-Erkennung, sondern nur wenn es explizit +-- gesetzt wird (z.B. per Modeline). Die Einstellungen sind dieselben wie fuer json. +vim.cmd.runtime("ftplugin/json.lua") -- cgit v1.3