summaryrefslogtreecommitdiff
path: root/.config/nvim/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/ftplugin')
-rw-r--r--.config/nvim/ftplugin/cpp.lua12
-rw-r--r--.config/nvim/ftplugin/html.lua12
-rw-r--r--.config/nvim/ftplugin/htmldjango.lua12
-rw-r--r--.config/nvim/ftplugin/toml.lua12
4 files changed, 48 insertions, 0 deletions
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)