summaryrefslogtreecommitdiff
path: root/.config/nvim/after/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/after/ftplugin')
-rw-r--r--.config/nvim/after/ftplugin/c.lua15
-rw-r--r--.config/nvim/after/ftplugin/css.lua3
-rw-r--r--.config/nvim/after/ftplugin/ebnf.lua3
-rw-r--r--.config/nvim/after/ftplugin/gitcommit.lua2
-rw-r--r--.config/nvim/after/ftplugin/gitrebase.lua6
-rw-r--r--.config/nvim/after/ftplugin/go.lua3
-rw-r--r--.config/nvim/after/ftplugin/gsp.lua3
-rw-r--r--.config/nvim/after/ftplugin/help.lua8
-rw-r--r--.config/nvim/after/ftplugin/html.lua3
l---------.config/nvim/after/ftplugin/htmldjango.lua1
-rw-r--r--.config/nvim/after/ftplugin/lex.lua3
-rw-r--r--.config/nvim/after/ftplugin/lua.lua3
-rw-r--r--.config/nvim/after/ftplugin/mail.lua7
-rw-r--r--.config/nvim/after/ftplugin/make.lua3
-rw-r--r--.config/nvim/after/ftplugin/markdown.lua4
-rw-r--r--.config/nvim/after/ftplugin/nroff.lua2
-rw-r--r--.config/nvim/after/ftplugin/python.lua3
-rw-r--r--.config/nvim/after/ftplugin/query.lua2
-rw-r--r--.config/nvim/after/ftplugin/rust.lua2
19 files changed, 33 insertions, 43 deletions
diff --git a/.config/nvim/after/ftplugin/c.lua b/.config/nvim/after/ftplugin/c.lua
index 7f8d336..6058e31 100644
--- a/.config/nvim/after/ftplugin/c.lua
+++ b/.config/nvim/after/ftplugin/c.lua
@@ -1,3 +1,14 @@
-local lib = require('mango.lib')
+vim.bo.commentstring = '/* %s */'
-lib.set_tab_width(4, true)
+vim.keymap.set('v', '<localleader>=', ":'<'>!clang-format -style=file -<CR>", {
+ desc = 'Format the current selection with Clang Format',
+})
+
+vim.keymap.set('n', 'K', function()
+ vim.cmd [[
+ execute "silent !man -Tpdf '" . expand('<cword>') . "' | zathura - &"
+ ]]
+end, {
+ buffer = 0,
+ desc = 'View the manual page for the word under the cursor',
+})
diff --git a/.config/nvim/after/ftplugin/css.lua b/.config/nvim/after/ftplugin/css.lua
deleted file mode 100644
index 01efc8f..0000000
--- a/.config/nvim/after/ftplugin/css.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(8, true)
diff --git a/.config/nvim/after/ftplugin/ebnf.lua b/.config/nvim/after/ftplugin/ebnf.lua
index b1bb817..264b539 100644
--- a/.config/nvim/after/ftplugin/ebnf.lua
+++ b/.config/nvim/after/ftplugin/ebnf.lua
@@ -1,2 +1 @@
-require('Comment.ft').ebnf = { '(*%s*)', '(*%s*)' }
-vim.bo.commentstring = '(*%s*)'
+vim.bo.commentstring = '(* %s *)'
diff --git a/.config/nvim/after/ftplugin/gitcommit.lua b/.config/nvim/after/ftplugin/gitcommit.lua
index 9aa3038..21934e4 100644
--- a/.config/nvim/after/ftplugin/gitcommit.lua
+++ b/.config/nvim/after/ftplugin/gitcommit.lua
@@ -1 +1 @@
-vim.opt_local.expandtab = true
+vim.bo.expandtab = true
diff --git a/.config/nvim/after/ftplugin/gitrebase.lua b/.config/nvim/after/ftplugin/gitrebase.lua
index 948ee30..00ee21a 100644
--- a/.config/nvim/after/ftplugin/gitrebase.lua
+++ b/.config/nvim/after/ftplugin/gitrebase.lua
@@ -1,6 +1,5 @@
-local ts_utils = require('nvim-treesitter.ts_utils')
-
local function map(lhs, rhs)
+ local ts_utils = require('nvim-treesitter.ts_utils')
vim.keymap.set('n', lhs, function()
local node = ts_utils.get_node_at_cursor()
if node == nil then
@@ -22,7 +21,8 @@ local function map(lhs, rhs)
})
end
+map('d', 'drop')
+map('f', 'fixup')
map('p', 'pick')
map('r', 'reword')
map('s', 'squash')
-map('f', 'fixup')
diff --git a/.config/nvim/after/ftplugin/go.lua b/.config/nvim/after/ftplugin/go.lua
deleted file mode 100644
index 7f8d336..0000000
--- a/.config/nvim/after/ftplugin/go.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(4, true)
diff --git a/.config/nvim/after/ftplugin/gsp.lua b/.config/nvim/after/ftplugin/gsp.lua
deleted file mode 100644
index 50a85a4..0000000
--- a/.config/nvim/after/ftplugin/gsp.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(2, true)
diff --git a/.config/nvim/after/ftplugin/help.lua b/.config/nvim/after/ftplugin/help.lua
new file mode 100644
index 0000000..0b15270
--- /dev/null
+++ b/.config/nvim/after/ftplugin/help.lua
@@ -0,0 +1,8 @@
+vim.api.nvim_create_autocmd('BufWinEnter', {
+ desc = 'Open (neo)vim help pages in a vertical split',
+ group = vim.api.nvim_create_augroup('mango-vert-help', { clear = true }),
+ buffer = 0,
+ callback = function()
+ vim.cmd.wincmd 'L'
+ end,
+})
diff --git a/.config/nvim/after/ftplugin/html.lua b/.config/nvim/after/ftplugin/html.lua
deleted file mode 100644
index 50a85a4..0000000
--- a/.config/nvim/after/ftplugin/html.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(2, true)
diff --git a/.config/nvim/after/ftplugin/htmldjango.lua b/.config/nvim/after/ftplugin/htmldjango.lua
deleted file mode 120000
index d805bec..0000000
--- a/.config/nvim/after/ftplugin/htmldjango.lua
+++ /dev/null
@@ -1 +0,0 @@
-html.lua \ No newline at end of file
diff --git a/.config/nvim/after/ftplugin/lex.lua b/.config/nvim/after/ftplugin/lex.lua
deleted file mode 100644
index 7f8d336..0000000
--- a/.config/nvim/after/ftplugin/lex.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(4, true)
diff --git a/.config/nvim/after/ftplugin/lua.lua b/.config/nvim/after/ftplugin/lua.lua
deleted file mode 100644
index 7f8d336..0000000
--- a/.config/nvim/after/ftplugin/lua.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(4, true)
diff --git a/.config/nvim/after/ftplugin/mail.lua b/.config/nvim/after/ftplugin/mail.lua
index 599950a..72f99e9 100644
--- a/.config/nvim/after/ftplugin/mail.lua
+++ b/.config/nvim/after/ftplugin/mail.lua
@@ -1,5 +1,2 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(2, true)
-vim.opt_local.expandtab = true
-vim.opt_local.textwidth = 73
+vim.bo.expandtab = true
+vim.bo.textwidth = 73
diff --git a/.config/nvim/after/ftplugin/make.lua b/.config/nvim/after/ftplugin/make.lua
deleted file mode 100644
index 01efc8f..0000000
--- a/.config/nvim/after/ftplugin/make.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-local lib = require('mango.lib')
-
-lib.set_tab_width(8, true)
diff --git a/.config/nvim/after/ftplugin/markdown.lua b/.config/nvim/after/ftplugin/markdown.lua
index 1b0dfd2..3469231 100644
--- a/.config/nvim/after/ftplugin/markdown.lua
+++ b/.config/nvim/after/ftplugin/markdown.lua
@@ -1,2 +1,2 @@
-vim.opt_local.textwidth = 80
-vim.opt_local.expandtab = true
+vim.bo.expandtab = true
+vim.bo.textwidth = 80
diff --git a/.config/nvim/after/ftplugin/nroff.lua b/.config/nvim/after/ftplugin/nroff.lua
index 484a35d..1532c29 100644
--- a/.config/nvim/after/ftplugin/nroff.lua
+++ b/.config/nvim/after/ftplugin/nroff.lua
@@ -1 +1 @@
-vim.opt_local.textwidth = 73
+vim.bo.textwidth = 73
diff --git a/.config/nvim/after/ftplugin/python.lua b/.config/nvim/after/ftplugin/python.lua
index a97fe2e..c37615b 100644
--- a/.config/nvim/after/ftplugin/python.lua
+++ b/.config/nvim/after/ftplugin/python.lua
@@ -1,2 +1 @@
-vim.opt_local.textwidth = 100
-vim.opt_local.expandtab = false
+vim.bo.expandtab = false
diff --git a/.config/nvim/after/ftplugin/query.lua b/.config/nvim/after/ftplugin/query.lua
index 9aa3038..21934e4 100644
--- a/.config/nvim/after/ftplugin/query.lua
+++ b/.config/nvim/after/ftplugin/query.lua
@@ -1 +1 @@
-vim.opt_local.expandtab = true
+vim.bo.expandtab = true
diff --git a/.config/nvim/after/ftplugin/rust.lua b/.config/nvim/after/ftplugin/rust.lua
deleted file mode 100644
index a97fe2e..0000000
--- a/.config/nvim/after/ftplugin/rust.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-vim.opt_local.textwidth = 100
-vim.opt_local.expandtab = false