diff --git a/lua/config/keymaping.lua b/lua/config/keymaping.lua index d4c0be1..4f1ec5f 100644 --- a/lua/config/keymaping.lua +++ b/lua/config/keymaping.lua @@ -8,38 +8,41 @@ map("n", "", "", { desc = "LSP Forward" }) map("v", "", '"+y', { desc = "Copy selected" }) map({ "i", "n" }, "", '"+p', { desc = "Past" }) -map({ "n", "v", "i" }, "", ":w", { desc = "Save file" }) +map({ "n", "v", "i" }, "", "w", { desc = "Save file" }) map("n", "", "h", { desc = "switch window left" }) map("n", "", "l", { desc = "switch window right" }) map("n", "", "j", { desc = "switch window down" }) map("n", "", "k", { desc = "switch window up" }) -map("n", "", ":q", { desc = "close window" }) - map("n", "", "gcc", { desc = "toggle comment", remap = true }) map("v", "", "gc", { desc = "toggle comment", remap = true }) -- neo-tree -map({ "n", "v" }, "e", ":Neotree", { desc = "nvimtree focus window" }) -map({ "n", "v" }, "g", ":Neotree git_status float", { desc = "open gis status" }) +map({ "n", "v" }, "e", "Neotree", { desc = "nvimtree focus window" }) +map({ "n", "v" }, "g", "Neotree git_status float", { desc = "open gis status" }) +map({ "n", "v" }, "", "BufferClose", { desc = "close window" }) -- telescope -map("n", "ff", ":Telescope live_grep", { desc = "telescope live grep" }) -map("n", "r", ":Telescope lsp_references", { desc = "telescope lsp references" }) +map("n", "f", "Telescope live_grep", { desc = "telescope live grep" }) +map("n", "r", "Telescope lsp_references", { desc = "telescope lsp references" }) +map("n", "d", "Telescope lsp_definitions", { desc = "telescope lsp definitions" }) -- barbar -map("n", "", ":BufferNext", { desc = "Next tab" }) -map("n", "", ":BufferPrevious", { desc = "Previous tab" }) +map("n", "", "BufferNext", { desc = "Next tab" }) +map("n", "", "BufferPrevious", { desc = "Previous tab" }) -- dap map("n", "bb", dap.toggle_breakpoint, { desc = "Toggle breakpoint" }) -- nvterm -map("n", "", function() +map("n", "t", function() term.toggle("horizontal") end, { desc = "Open terminal" }) +-- searchbox +map({ "n", "v", "i" }, "", "SearchBoxIncSearch", { desc = "Search in file" }) + -- menu local menu = require("menu") diff --git a/lua/config/options.lua b/lua/config/options.lua index dfc53ee..0f1d4ba 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -3,7 +3,9 @@ local o = vim.o local g = vim.g local wo = vim.wo -opt.fillchars = { eob = " " } +-- vim.api.nvim_set_hl(0, "NeoTreeFloatBorder", { ctermfg = 253 }) + +opt.fillchars = { eob = " ", vert = "│" } opt.whichwrap:append("<>[]") diff --git a/lua/plugins/neo-tree.lua b/lua/plugins/neo-tree.lua index 63c0002..97dfa6e 100644 --- a/lua/plugins/neo-tree.lua +++ b/lua/plugins/neo-tree.lua @@ -13,9 +13,10 @@ return { fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" }) fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" }) fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" }) - fn.sign_define("DiagnosticSignHint", { text = " ", texthl = "DiagnosticSignHint" }) + fn.sign_define("DiagnosticSignHint", { text = " ", texthl = "DiagnosticSignHint" }) require("neo-tree").setup({ + -- popup_border_style = "rounded", default_component_configs = { modified = { symbol = "", diff --git a/lua/plugins/searchbox.lua b/lua/plugins/searchbox.lua new file mode 100644 index 0000000..779875f --- /dev/null +++ b/lua/plugins/searchbox.lua @@ -0,0 +1,15 @@ +return { + "VonHeikemen/searchbox.nvim", + dependencies = { + "MunifTanjim/nui.nvim", + }, + config = function() + require("searchbox").setup({ + popup = { + win_options = { + winhighlight = "Normal:Normal,FloatBorder:BorderBG,CursorLine:PmenuSel,Search:None", + }, + }, + }) + end, +}