From 1302056eddd9a69ea2d0ffdf8bedd8582fb5a907 Mon Sep 17 00:00:00 2001 From: cryxtalix Date: Fri, 8 May 2026 03:43:16 +0800 Subject: Update --- .config/nvim/ftplugin/cpp.lua | 12 ++++++++++++ .config/nvim/ftplugin/html.lua | 12 ++++++++++++ .config/nvim/ftplugin/htmldjango.lua | 12 ++++++++++++ .config/nvim/ftplugin/toml.lua | 12 ++++++++++++ 4 files changed, 48 insertions(+) create mode 100644 .config/nvim/ftplugin/cpp.lua create mode 100644 .config/nvim/ftplugin/html.lua create mode 100644 .config/nvim/ftplugin/htmldjango.lua create mode 100644 .config/nvim/ftplugin/toml.lua (limited to '.config/nvim/ftplugin') diff --git a/.config/nvim/ftplugin/cpp.lua b/.config/nvim/ftplugin/cpp.lua new file mode 100644 index 0000000..4514ab3 --- /dev/null +++ b/.config/nvim/ftplugin/cpp.lua @@ -0,0 +1,12 @@ +local indent_size = 8 +local use_tabs = false + +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end + +vim.cmd(settings) diff --git a/.config/nvim/ftplugin/html.lua b/.config/nvim/ftplugin/html.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim/ftplugin/html.lua @@ -0,0 +1,12 @@ +local indent_size = 4 +local use_tabs = false + +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end + +vim.cmd(settings) diff --git a/.config/nvim/ftplugin/htmldjango.lua b/.config/nvim/ftplugin/htmldjango.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim/ftplugin/htmldjango.lua @@ -0,0 +1,12 @@ +local indent_size = 4 +local use_tabs = false + +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end + +vim.cmd(settings) diff --git a/.config/nvim/ftplugin/toml.lua b/.config/nvim/ftplugin/toml.lua new file mode 100644 index 0000000..3fbcec4 --- /dev/null +++ b/.config/nvim/ftplugin/toml.lua @@ -0,0 +1,12 @@ +local indent_size = 4 +local use_tabs = false + +local settings = string.format("setlocal softtabstop=%s tabstop=%s shiftwidth=%s", indent_size, indent_size, indent_size) + +if use_tabs == true then + settings = settings .. " noexpandtab" +else + settings = settings .. " expandtab" +end + +vim.cmd(settings) -- cgit