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,9 +1,8 @@
# 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

@ -9,8 +9,8 @@
atuin atuin
bat bat
btop btop
# bruno # bruno
# bruno-cli # bruno-cli
cargo cargo
catnip catnip
cmatrix cmatrix
@ -45,7 +45,7 @@
neovim neovim
ollama ollama
pandoc pandoc
# pass # pass
pciutils pciutils
pinentry-all pinentry-all
presenterm presenterm
@ -71,7 +71,7 @@
# dev tools # dev tools
dart-sass dart-sass
# dbeaver-bin # dbeaver-bin
docker-compose docker-compose
eris-go eris-go
gcc gcc
@ -87,15 +87,15 @@
nodePackages.prettier nodePackages.prettier
php84 php84
php84Packages.composer php84Packages.composer
# php84Packages.php-cs-fixer # php84Packages.php-cs-fixer
python3 python3
python311Packages.virtualenv python311Packages.virtualenv
# rpi-imager # rpi-imager
# ruff-lsp # ruff-lsp
stylelint stylelint
symfony-cli symfony-cli
# tcl-9_0 # tcl-9_0
# tk-9_0 # tk-9_0
tree-sitter tree-sitter
virt-manager virt-manager
wireguard-tools wireguard-tools
@ -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"