From 9a154c71ec9358be3f234ebc1d1fc7b12303acef Mon Sep 17 00:00:00 2001 From: coja Date: Fri, 10 Apr 2026 23:06:31 +0200 Subject: [PATCH] [Nvim] term --- .config/nvim/lua/chadrc.lua | 36 ++++++++++++++++++++++++----------- .config/nvim/lua/mappings.lua | 22 ++++++++------------- 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/.config/nvim/lua/chadrc.lua b/.config/nvim/lua/chadrc.lua index 82bb41e..3d52eff 100644 --- a/.config/nvim/lua/chadrc.lua +++ b/.config/nvim/lua/chadrc.lua @@ -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 diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua index 575da78..d473227 100644 --- a/.config/nvim/lua/mappings.lua +++ b/.config/nvim/lua/mappings.lua @@ -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", "ge", ":Gen") -map("n", "gl", "lua vim.lsp.buf.code_action()", { noremap = true, silent = true }) map("n", "dh", ":lua vim.diagnostic.open_float()", { desc = "Show diagnostics" }) map("n", "dj", ":lua vim.diagnostic.goto_next()", { desc = "Go to next" }) map("n", "dk", ":lua vim.diagnostic.goto_prev()", { desc = "Go to previous" }) @@ -20,15 +23,6 @@ map("n", "fd", ":Telescope diagnostics", { desc = "Diagnostics" }) map({ "n", "v" }, "ge", ":Gen", { desc = "Gen.nvim" }) -map({ "n", "t" }, "", 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}