[Nvim] term

This commit is contained in:
2026-04-10 23:06:31 +02:00
parent d8a08b8b14
commit 9a154c71ec
2 changed files with 33 additions and 25 deletions

View File

@@ -27,17 +27,31 @@ local M = {
-- },
},
-- ui = {
-- -- lazyload it when there are 1+ buffers
-- tabufline = {
-- enabled = true,
-- lazyload = true,
-- order = { "treeOffset", "buffers", "tabs", "btns" },
-- modules = nil,
-- bufwidth = 21,
-- transparency = true,
-- },
-- },
ui = {
-- lazyload it when there are 1+ buffers
tabufline = {
enabled = true,
lazyload = true,
order = { "treeOffset", "buffers", "tabs", "btns" },
modules = nil,
bufwidth = 21,
transparency = true,
},
},
term = {
base46_colors = true,
winopts = { number = false },
sizes = { sp = 0.5, vsp = 0.2, ["bo sp"] = 0.3, ["bo vsp"] = 0.2 },
float = {
relative = "editor",
row = 0.05,
col = 0.05,
width = 0.9,
height = 0.8,
border = "single",
},
},
}
return M

View File

@@ -1,13 +1,16 @@
require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set
-- map("n", ";", ":", { desc = "cmd enter command mode" })
local builtin = require "telescope.builtin"
map("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" })
map("n", "gD", builtin.lsp_definitions, { desc = "Go to Definitions" })
map("n", "grr", builtin.lsp_references, { desc = "Go to references" })
map("n", "<leader>ge", ":Gen<CR>")
map("n", "<leader>gl", "<cmd>lua vim.lsp.buf.code_action()<CR>", { noremap = true, silent = true })
map("n", "<leader>dh", ":lua vim.diagnostic.open_float()<cr>", { desc = "Show diagnostics" })
map("n", "<leader>dj", ":lua vim.diagnostic.goto_next()<cr>", { desc = "Go to next" })
map("n", "<leader>dk", ":lua vim.diagnostic.goto_prev()<cr>", { desc = "Go to previous" })
@@ -20,15 +23,6 @@ map("n", "<leader>fd", ":Telescope diagnostics<CR>", { desc = "Diagnostics" })
map({ "n", "v" }, "<leader>ge", "<cmd>:Gen<cr>", { desc = "Gen.nvim" })
map({ "n", "t" }, "<A-i>", function()
require("nvchad.term").toggle {
pos = "float",
id = "floatTerm",
float_opts = {
row = 0.1,
col = 0.1,
width = 0.8,
height = 0.8,
},
}
end, { desc = "terminal toggle floating term" })
-- P paste with
-- global marks
-- "{register}