From 511efe89ed084bc922ae142d32e08427859198f4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 10 Jun 2024 23:07:28 +0200 Subject: nvim: Completely rewrite my configuration --- .config/nvim/after/ftplugin/c.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to '.config/nvim/after/ftplugin/c.lua') 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', '=', ":'<'>!clang-format -style=file -", { + desc = 'Format the current selection with Clang Format', +}) + +vim.keymap.set('n', 'K', function() + vim.cmd [[ + execute "silent !man -Tpdf '" . expand('') . "' | zathura - &" + ]] +end, { + buffer = 0, + desc = 'View the manual page for the word under the cursor', +}) -- cgit v1.2.3