From cc309b001c1be90799994c03b79cf569c38a9d7d Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Tue, 3 Feb 2026 08:34:43 +0100 Subject: Neovim: Benutze 'ftplugin' für dateityp-abhängige Einstellungen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nvim/ftplugin/taskedit.lua | 1 + nvim/ftplugin/taskwarrior.lua | 5 +++++ nvim/lua/config/autocmds.lua | 11 ----------- 3 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 nvim/ftplugin/taskedit.lua create mode 100644 nvim/ftplugin/taskwarrior.lua diff --git a/nvim/ftplugin/taskedit.lua b/nvim/ftplugin/taskedit.lua new file mode 100644 index 0000000..a905acb --- /dev/null +++ b/nvim/ftplugin/taskedit.lua @@ -0,0 +1 @@ +vim.cmd.runtime("ftplugin/taskwarrior.lua") diff --git a/nvim/ftplugin/taskwarrior.lua b/nvim/ftplugin/taskwarrior.lua new file mode 100644 index 0000000..833a35c --- /dev/null +++ b/nvim/ftplugin/taskwarrior.lua @@ -0,0 +1,5 @@ +vim.opt_local.smartindent = false +vim.opt_local.cindent = false +vim.opt_local.autoindent = false +vim.opt_local.indentexpr = "" +vim.opt_local.indentkeys = "" diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index 6627c74..1452546 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua @@ -20,17 +20,6 @@ vim.api.nvim_create_autocmd("FileType", { end, }) -vim.api.nvim_create_autocmd("FileType", { - pattern = { "taskedit", "taskwarrior" }, - callback = function() - vim.opt_local.smartindent = false - vim.opt_local.cindent = false - vim.opt_local.autoindent = false - vim.opt_local.indentexpr = "" - vim.opt_local.indentkeys = "" - end, -}) - -- https://github.com/nvim-tree/nvim-tree.lua/wiki/Open-At-Startup vim.api.nvim_create_autocmd("VimEnter", { callback = function(data) -- cgit v1.3