fix: nvim harpoon mappings + formatting

This commit is contained in:
Florian Schmitt 2025-05-18 22:21:11 +03:00
parent 709c7e23c5
commit c749c9098e
4 changed files with 56 additions and 52 deletions

View file

@ -1,8 +1,7 @@
# NixOS config entry point # NixOS config entry point
# import the hardware and configuration files specific to your machine # import the hardware and configuration files specific to your machine
{ {
imports = imports = [
[
./machines/MacBookPro12.1-hardware-configuration.nix ./machines/MacBookPro12.1-hardware-configuration.nix
./machines/MacBookPro12.1-configuration.nix ./machines/MacBookPro12.1-configuration.nix
]; ];

View file

@ -1,44 +1,46 @@
require "nvchad.mappings" require "nvchad.mappings"
local map = vim.keymap.set -- remove nvchad shell mappings
local nomap = vim.keymap.set vim.keymap.del("n", "<leader>h")
vim.keymap.del("n", "<leader>v")
local map = vim.keymap.set
nomap({ "i", "x", "n", "s" }, "<leader>h")
map("n", ";", ":", { desc = "CMD enter command mode" }) map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>") map("i", "jk", "<ESC>")
map({ "i", "x", "n", "s" }, "<f1>", function() -- map({ "i", "x", "n", "s" }, "<f1>", function()
require("harpoon"):list():select(1) -- require("harpoon"):list():select(1)
end, { desc = "Harpoon file 1" }) -- end, { desc = "Harpoon file 1" })
--
map({ "i", "x", "n", "s" }, "<f2>", function() -- map({ "i", "x", "n", "s" }, "<f2>", function()
require("harpoon"):list():select(2) -- require("harpoon"):list():select(2)
end, { desc = "Harpoon file 2" }) -- end, { desc = "Harpoon file 2" })
--
map({ "i", "x", "n", "s" }, "<f3>", function() -- map({ "i", "x", "n", "s" }, "<f3>", function()
require("harpoon"):list():select(3) -- require("harpoon"):list():select(3)
end, { desc = "Harpoon file 3" }) -- end, { desc = "Harpoon file 3" })
--
map({ "i", "x", "n", "s" }, "<f4>", function() -- map({ "i", "x", "n", "s" }, "<f4>", function()
require("harpoon"):list():select(4) -- require("harpoon"):list():select(4)
end, { desc = "Harpoon file 4" }) -- end, { desc = "Harpoon file 4" })
--
map({ "i", "x", "n", "s" }, "<f5>", function() -- map({ "i", "x", "n", "s" }, "<f5>", function()
require("harpoon"):list():select(5) -- require("harpoon"):list():select(5)
end, { desc = "Harpoon file 5" }) -- end, { desc = "Harpoon file 5" })
--
map({ "i", "x", "n", "s" }, "<f6>", function() -- map({ "i", "x", "n", "s" }, "<f6>", function()
require("harpoon"):list():select(6) -- require("harpoon"):list():select(6)
end, { desc = "Harpoon file 6" }) -- end, { desc = "Harpoon file 6" })
--
map({ "i", "x", "n", "s" }, "<f7>", function() -- map({ "i", "x", "n", "s" }, "<f7>", function()
require("harpoon"):list():select(7) -- require("harpoon"):list():select(7)
end, { desc = "Harpoon file 7" }) -- end, { desc = "Harpoon file 7" })
--
map({ "i", "x", "n", "s" }, "<f8>", function() -- map({ "i", "x", "n", "s" }, "<f8>", function()
require("harpoon"):list():select(8) -- require("harpoon"):list():select(8)
end, { desc = "Harpoon file 8" }) -- end, { desc = "Harpoon file 8" })
--
map({ "x", "n", "s" }, "<leader>/", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" }) map({ "x", "n", "s" }, "<leader>/", "<cmd>Telescope live_grep<CR>", { desc = "telescope live grep" })
map( map(
{ "x", "n", "s" }, { "x", "n", "s" },

View file

@ -11,7 +11,10 @@ return {
require "configs.lspconfig" require "configs.lspconfig"
end, end,
}, },
{
"NvChad/nvterm",
enabled = false
},
{ {
"kdheepak/lazygit.nvim", "kdheepak/lazygit.nvim",
lazy = true, lazy = true,

View file

@ -297,7 +297,7 @@
vim = "$HOME/.nix-profile/bin/nvim"; vim = "$HOME/.nix-profile/bin/nvim";
yeswiki-updater = "cd /home/mrflos/Code/yeswiki-installer/ && sudo php yeswiki-updater.php"; yeswiki-updater = "cd /home/mrflos/Code/yeswiki-installer/ && sudo php yeswiki-updater.php";
}; };
initExtra = '' initContent = ''
export BUN_INSTALL="$HOME/.bun" export BUN_INSTALL="$HOME/.bun"
export PHP_CS_FIXER_IGNORE_ENV=1 export PHP_CS_FIXER_IGNORE_ENV=1
export PATH="$HOME/.local/bin:$BUN_INSTALL/bin:$PATH" export PATH="$HOME/.local/bin:$BUN_INSTALL/bin:$PATH"