summaryrefslogtreecommitdiffstats
path: root/dotfiles/vim/ftplugin
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2023-01-18 13:39:42 +0100
committerMinijackson <minijackson@riseup.net>2023-01-18 13:39:42 +0100
commitcfdb14cf768f2971f6efe2e333c620571f30fad1 (patch)
tree7cf802c821abd12bf47a336784d444791ced6f83 /dotfiles/vim/ftplugin
parent087b8756a6113c78ae20ee00c96c38f5922287a0 (diff)
downloadnixos-config-reborn-cfdb14cf768f2971f6efe2e333c620571f30fad1.tar.gz
nixos-config-reborn-cfdb14cf768f2971f6efe2e333c620571f30fad1.zip
vim: refactor, allowing different files like ftplugin
Diffstat (limited to 'dotfiles/vim/ftplugin')
-rw-r--r--dotfiles/vim/ftplugin/nix.lua6
-rw-r--r--dotfiles/vim/ftplugin/rust.lua18
2 files changed, 24 insertions, 0 deletions
diff --git a/dotfiles/vim/ftplugin/nix.lua b/dotfiles/vim/ftplugin/nix.lua
new file mode 100644
index 0000000..7401054
--- /dev/null
+++ b/dotfiles/vim/ftplugin/nix.lua
@@ -0,0 +1,6 @@
1vim.bo.expandtab = true
2vim.bo.shiftwidth = 2
3vim.bo.softtabstop = 2
4
5vim.opt_local.comments = { ":#", "s1:/*", "ex:*/", }
6vim.bo.commentstring = "# %s"
diff --git a/dotfiles/vim/ftplugin/rust.lua b/dotfiles/vim/ftplugin/rust.lua
new file mode 100644
index 0000000..23a46f1
--- /dev/null
+++ b/dotfiles/vim/ftplugin/rust.lua
@@ -0,0 +1,18 @@
1-- TODO: suffixes, includes
2
3vim.bo.expandtab = true
4vim.bo.shiftwidth = 4
5vim.bo.softtabstop = 4
6vim.bo.textwidth = 99
7
8vim.opt_local.comments = {
9 "s0:/*!",
10 "ex:*/",
11 "s1:/*",
12 "mb:*",
13 "ex:*/",
14 ":///",
15 "://!",
16 "://",
17}
18vim.bo.commentstring = "// %s"