feat: Add nvchad module and enable nvchad instead of nixvim

This commit is contained in:
ulic-youthlic 2025-10-18 23:10:53 +08:00
parent 66196be557
commit 65a72ab802
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
16 changed files with 460 additions and 4 deletions

29
nvchad/lua/mappings.lua Normal file
View file

@ -0,0 +1,29 @@
require "nvchad.mappings"
local map = vim.keymap.set
map("n", "<M-x>", ":", { desc = "CMD enter command mode" })
map("n", "<leader>ti", function()
local is_enabled = vim.lsp.inlay_hint.is_enabled()
if is_enabled then
vim.lsp.inlay_hint.enable(false)
else
vim.lsp.inlay_hint.enable(true)
end
end, { desc = "Toggle lsp inlay hint" })
map({ "n", "v" }, "j", "gj")
map({ "n", "v" }, "k", "gk")
map({ "n", "v" }, "gj", "j")
map({ "n", "v" }, "gk", "k")
map({ "n", "v" }, "<C-h>", "<cmd>Telescope help_tags<CR>", { desc = "telescope help page" })
map("i", "<C-d>", "<BS>", { desc = "backspace" })
map({ "n", "v" }, "<leader>tm", function()
local image_api = require("image")
local is_enabled = image_api.is_enabled()
if is_enabled then
image_api.disable()
else
image_api.enable()
end
end, { desc = "Toggle image.nvim" })