aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/home/.config/nvim/after/ftplugin
diff options
context:
space:
mode:
authorLibravatar Arnold Sommerfeld <sommerfeld@strisemarx.com>2023-05-17 18:44:48 +0100
committerLibravatar Arnold Sommerfeld <sommerfeld@strisemarx.com>2023-10-18 11:16:43 +0100
commitb487984ecc61c6229cf92550030745c192fd3d0b (patch)
tree937e598c941fc1172467aeeed8ef51cbfceaca62 /home/.config/nvim/after/ftplugin
downloaddotfiles-b487984ecc61c6229cf92550030745c192fd3d0b.tar.gz
dotfiles-b487984ecc61c6229cf92550030745c192fd3d0b.tar.bz2
dotfiles-b487984ecc61c6229cf92550030745c192fd3d0b.zip
first commit
Diffstat (limited to 'home/.config/nvim/after/ftplugin')
l---------home/.config/nvim/after/ftplugin/c.lua1
-rw-r--r--home/.config/nvim/after/ftplugin/cfg.lua3
-rw-r--r--home/.config/nvim/after/ftplugin/cpp.lua2
-rw-r--r--home/.config/nvim/after/ftplugin/dosini.lua3
-rw-r--r--home/.config/nvim/after/ftplugin/gitcommit.lua5
-rw-r--r--home/.config/nvim/after/ftplugin/gitrebase.lua20
-rw-r--r--home/.config/nvim/after/ftplugin/help.lua3
-rw-r--r--home/.config/nvim/after/ftplugin/json.lua1
-rw-r--r--home/.config/nvim/after/ftplugin/mail.lua2
-rw-r--r--home/.config/nvim/after/ftplugin/markdown.lua2
-rw-r--r--home/.config/nvim/after/ftplugin/tex.lua4
-rw-r--r--home/.config/nvim/after/ftplugin/text.lua5
-rw-r--r--home/.config/nvim/after/ftplugin/tmux.lua1
-rw-r--r--home/.config/nvim/after/ftplugin/xdefaults.lua9
-rw-r--r--home/.config/nvim/after/ftplugin/xmodmap.lua4
15 files changed, 65 insertions, 0 deletions
diff --git a/home/.config/nvim/after/ftplugin/c.lua b/home/.config/nvim/after/ftplugin/c.lua
new file mode 120000
index 0000000..48a225a
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/c.lua
@@ -0,0 +1 @@
+cpp.lua \ No newline at end of file
diff --git a/home/.config/nvim/after/ftplugin/cfg.lua b/home/.config/nvim/after/ftplugin/cfg.lua
new file mode 100644
index 0000000..3e79acd
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/cfg.lua
@@ -0,0 +1,3 @@
+vim.bo.commentstring = "// %s"
+
+vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "| setlocal commentstring<"
diff --git a/home/.config/nvim/after/ftplugin/cpp.lua b/home/.config/nvim/after/ftplugin/cpp.lua
new file mode 100644
index 0000000..e3d3a8c
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/cpp.lua
@@ -0,0 +1,2 @@
+vim.bo.commentstring = "// %s"
+vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "| setlocal commentstring<"
diff --git a/home/.config/nvim/after/ftplugin/dosini.lua b/home/.config/nvim/after/ftplugin/dosini.lua
new file mode 100644
index 0000000..f6d7437
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/dosini.lua
@@ -0,0 +1,3 @@
+vim.bo.commentstring = "# %s"
+vim.b.undo_ftplugin = vim.b.undo_ftplugin
+ .. "|setlocal commentstring"
diff --git a/home/.config/nvim/after/ftplugin/gitcommit.lua b/home/.config/nvim/after/ftplugin/gitcommit.lua
new file mode 100644
index 0000000..8525714
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/gitcommit.lua
@@ -0,0 +1,5 @@
+vim.wo.spell = true
+vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "|setlocal spell<"
+vim.cmd([[match ErrorMsg /\%1l.\%>50v/]])
+local bufnr = vim.api.nvim_buf_get_number(0)
+require("mapper").ncmd("gd", "DiffGitCached", nil, bufnr)
diff --git a/home/.config/nvim/after/ftplugin/gitrebase.lua b/home/.config/nvim/after/ftplugin/gitrebase.lua
new file mode 100644
index 0000000..98fd264
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/gitrebase.lua
@@ -0,0 +1,20 @@
+local map = require("mapper")
+local ncmd = map.ncmd
+local vcmd = map.vcmd
+local bufnr = vim.api.nvim_buf_get_number(0)
+
+ncmd("gc", "Cycle", nil, bufnr)
+ncmd("gp", "Pick", nil, bufnr)
+ncmd("ge", "Edit", nil, bufnr)
+ncmd("gf", "Fixup", nil, bufnr)
+ncmd("gd", "Drop", nil, bufnr)
+ncmd("gs", "Squash", nil, bufnr)
+ncmd("gr", "Reword", nil, bufnr)
+
+vcmd("gc", "Cycle", nil, bufnr)
+vcmd("gp", "Pick", nil, bufnr)
+vcmd("ge", "Edit", nil, bufnr)
+vcmd("gf", "Fixup", nil, bufnr)
+vcmd("gd", "Drop", nil, bufnr)
+vcmd("gs", "Squash", nil, bufnr)
+vcmd("gr", "Reword", nil, bufnr)
diff --git a/home/.config/nvim/after/ftplugin/help.lua b/home/.config/nvim/after/ftplugin/help.lua
new file mode 100644
index 0000000..63147a6
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/help.lua
@@ -0,0 +1,3 @@
+vim.keymap.set("n", "q", function()
+ vim.api.nvim_win_close(0, false)
+end, { buffer = true })
diff --git a/home/.config/nvim/after/ftplugin/json.lua b/home/.config/nvim/after/ftplugin/json.lua
new file mode 100644
index 0000000..726acd0
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/json.lua
@@ -0,0 +1 @@
+vim.cmd([[syntax match Comment +\/\/.\+$+]])
diff --git a/home/.config/nvim/after/ftplugin/mail.lua b/home/.config/nvim/after/ftplugin/mail.lua
new file mode 100644
index 0000000..538c10b
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/mail.lua
@@ -0,0 +1,2 @@
+vim.wo.spell = true
+vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "|setlocal spell<"
diff --git a/home/.config/nvim/after/ftplugin/markdown.lua b/home/.config/nvim/after/ftplugin/markdown.lua
new file mode 100644
index 0000000..538c10b
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/markdown.lua
@@ -0,0 +1,2 @@
+vim.wo.spell = true
+vim.b.undo_ftplugin = vim.b.undo_ftplugin .. "|setlocal spell<"
diff --git a/home/.config/nvim/after/ftplugin/tex.lua b/home/.config/nvim/after/ftplugin/tex.lua
new file mode 100644
index 0000000..b1dbce0
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/tex.lua
@@ -0,0 +1,4 @@
+vim.wo.spell = true
+vim.bo.formatoptions = vim.bo.formatoptions .. "t"
+vim.b.undo_ftplugin = vim.b.undo_ftplugin
+ .. "|setlocal spell< |setlocal formatoptions<"
diff --git a/home/.config/nvim/after/ftplugin/text.lua b/home/.config/nvim/after/ftplugin/text.lua
new file mode 100644
index 0000000..8c72f6f
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/text.lua
@@ -0,0 +1,5 @@
+vim.wo.spell = true
+vim.bo.formatoptions = vim.bo.formatoptions .. "t"
+vim.bo.commentstring = "# %s"
+vim.b.undo_ftplugin = vim.b.undo_ftplugin
+ .. "|setlocal spell< |setlocal formatoptions< |setlocal commentstring"
diff --git a/home/.config/nvim/after/ftplugin/tmux.lua b/home/.config/nvim/after/ftplugin/tmux.lua
new file mode 100644
index 0000000..590a12e
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/tmux.lua
@@ -0,0 +1 @@
+vim.api.nvim_create_autocmd("BufWritePost", { buffer = 0, command = "make" })
diff --git a/home/.config/nvim/after/ftplugin/xdefaults.lua b/home/.config/nvim/after/ftplugin/xdefaults.lua
new file mode 100644
index 0000000..0f4ec99
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/xdefaults.lua
@@ -0,0 +1,9 @@
+vim.bo.commentstring = "! %s"
+vim.api.nvim_create_augroup("xdefaults", {})
+vim.api.nvim_create_autocmd(
+ "BufWritePost",
+ { group = "xdefaults", buffer = 0, command = "!xrdb %" }
+)
+
+vim.b.undo_ftplugin = vim.b.undo_ftplugin
+ .. "| setlocal commentstring<
diff --git a/home/.config/nvim/after/ftplugin/xmodmap.lua b/home/.config/nvim/after/ftplugin/xmodmap.lua
new file mode 100644
index 0000000..75c9f8a
--- /dev/null
+++ b/home/.config/nvim/after/ftplugin/xmodmap.lua
@@ -0,0 +1,4 @@
+vim.api.nvim_create_autocmd(
+ "BufWritePost",
+ { buffer = 0, command = "!xmodmap %" }
+)