Revert "feat: Move nvchad config to ulic-youthlic/nvchad-starter"

This reverts commit 9c59296b24.
This commit is contained in:
ulic-youthlic 2025-11-08 03:53:33 +08:00
parent 8fd58722da
commit 55c578d3db
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
12 changed files with 356 additions and 11 deletions

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

@ -0,0 +1,32 @@
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" })
map("n", "gh", "0")
map("n", "gl", "$")
map("n", "gs", "^")