aboutsummaryrefslogtreecommitdiff
path: root/user/nvim/after/ftplugin
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2026-10-10 12:25:43 +0200
committerMartin Fischer <martin@push-f.com>2026-10-10 19:54:55 +0200
commitb657343b58adb1d4a8ab7f648c9683c4b1d67128 (patch)
treed090705d544c619ba015058b1535d38bc15787ae /user/nvim/after/ftplugin
parentd51c60c30e7f67e644db0bc5eadea9f0392481ca (diff)
tweak(workstation): use neovim instead of vim
Diffstat (limited to 'user/nvim/after/ftplugin')
-rw-r--r--user/nvim/after/ftplugin/markdown.lua5
-rw-r--r--user/nvim/after/ftplugin/nix.lua7
-rw-r--r--user/nvim/after/ftplugin/svelte.lua7
-rw-r--r--user/nvim/after/ftplugin/typescript.lua7
4 files changed, 26 insertions, 0 deletions
diff --git a/user/nvim/after/ftplugin/markdown.lua b/user/nvim/after/ftplugin/markdown.lua
new file mode 100644
index 0000000..9909541
--- /dev/null
+++ b/user/nvim/after/ftplugin/markdown.lua
@@ -0,0 +1,5 @@
+-- Shortcut for Hugo TOML frontmatter.
+vim.keymap.set('n', '<C-f>', 'i+++<CR>title = ""<CR>+++<CR><Esc>kk$i', {
+ buffer = true,
+ desc = 'Insert Hugo TOML frontmatter',
+})
diff --git a/user/nvim/after/ftplugin/nix.lua b/user/nvim/after/ftplugin/nix.lua
new file mode 100644
index 0000000..af99d8d
--- /dev/null
+++ b/user/nvim/after/ftplugin/nix.lua
@@ -0,0 +1,7 @@
+vim.opt_local.expandtab = true
+vim.opt_local.shiftwidth = 2
+vim.opt_local.softtabstop = 2
+vim.opt_local.tabstop = 2
+
+vim.treesitter.start()
+vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
diff --git a/user/nvim/after/ftplugin/svelte.lua b/user/nvim/after/ftplugin/svelte.lua
new file mode 100644
index 0000000..af99d8d
--- /dev/null
+++ b/user/nvim/after/ftplugin/svelte.lua
@@ -0,0 +1,7 @@
+vim.opt_local.expandtab = true
+vim.opt_local.shiftwidth = 2
+vim.opt_local.softtabstop = 2
+vim.opt_local.tabstop = 2
+
+vim.treesitter.start()
+vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
diff --git a/user/nvim/after/ftplugin/typescript.lua b/user/nvim/after/ftplugin/typescript.lua
new file mode 100644
index 0000000..af99d8d
--- /dev/null
+++ b/user/nvim/after/ftplugin/typescript.lua
@@ -0,0 +1,7 @@
+vim.opt_local.expandtab = true
+vim.opt_local.shiftwidth = 2
+vim.opt_local.softtabstop = 2
+vim.opt_local.tabstop = 2
+
+vim.treesitter.start()
+vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"