rename with lsp

This commit is contained in:
Christoph J. Scherr 2024-01-20 19:06:50 +01:00
parent 59f952ce13
commit 4028fad327
Signed by: PlexSheep
GPG Key ID: 7CDD0B14851A08EF
3 changed files with 41 additions and 33 deletions

View File

@ -40,18 +40,6 @@ M.ui = {
" ",
" 🛠️ Sharp tools make good work 🖥️ ",
},
buttons = {
{ " Find File", ";ff", "Telescope find_files" },
{ "󰈚 Recent Files", ";fo", "Telescope oldfiles" },
{ "󰈭 Find Word", ";fw", "Telescope live_grep" },
{ " Bookmarks", ";fm", "Telescope marks" },
{ " Themes", ";th", "Telescope themes" },
{ " Mappings", "<space>ch", "NvCheatsheet" },
{ " Git", "<space>gg", "LazyGit" },
{ " Files", "<F5>", "NvimTreeToggle" },
{ " Terminal", "<A-i>", "ToggleTerm direction=float" },
},
},
}
@ -60,4 +48,27 @@ M.plugins = "custom.plugins"
-- check core.mappings for table structure
M.mappings = require "custom.mappings"
local get_info = function()
local buf = {
{ " Find File", ";ff", "Telescope find_files" },
{ "󰈚 Recent Files", ";fo", "Telescope oldfiles" },
{ "󰈭 Find Word", ";fw", "Telescope live_grep" },
{ " Bookmarks", ";fm", "Telescope marks" },
{ " Theme: " .. M.ui.theme, ";th", "Telescope themes" },
{
" toggle Theme: " .. M.ui.theme,
"<space>th",
function()
require("base46").toggle_theme()
end,
},
{ " Mappings", "<space>ch", "NvCheatsheet" },
{ " Git", "<space>gg", "LazyGit" },
{ " Files", "<F5>", "NvimTreeToggle" },
{ " Terminal", "<A-i>", "ToggleTerm direction=float" },
}
return buf
end
M.ui.nvdash.buttons = get_info()
return M

View File

@ -171,6 +171,12 @@ M.lspconfig = {
end,
"Goto next",
},
["<leader>cr"] = {
function()
require("nvchad.renamer").open()
end,
"LSP rename",
},
},
}
@ -407,6 +413,18 @@ M.ui = {
end,
"toggle inlay hints",
},
["<leader>th"] = {
function()
require("base46").toggle_theme()
end,
"toggle theme",
},
["<leader>te"] = {
function()
require("base46").toggle_transparency()
end,
"toggle transparency",
},
-- open windows
['<leader>"'] = { "<cmd>vsplit<cr>", "open a new window to the side" },

View File

@ -1,21 +1,4 @@
local overrides = require "custom.configs.overrides"
local utils = require "core.utils"
local function get_header()
-- see https://github.com/MaximilianLloyd/ascii.nvim
return {
-- The following is a customized version!
[[ ]],
[[ ]],
[[ █ ████████ █████ ███████ ████ ]],
[[ ███ ██████ █████ █████████ ██████ ]],
[[ █████ ██████████████████████ ████ ███████████████ ]],
[[ ██ ██ █████ █████████████ ████ ████████████████ ]],
[[ ████ ███████████████ █████████ ████ █████ ██████ ████ ]],
[[ ██████ ██████ ███ █████████ ████ █████ █████ ████ ]],
[[ ████████ ███████████████████ ████ ████ █████ ████ ████ ]],
[[ ]],
}
end
---@type NvPluginSpec[]
local plugins = {
@ -363,10 +346,6 @@ local plugins = {
local dash = require "alpha.themes.dashboard"
require("alpha").setup(dash.config)
end,
opts = {
header = get_header(),
},
},
{
"stevearc/dressing.nvim",