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 🖥️ ", " 🛠️ 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 -- check core.mappings for table structure
M.mappings = require "custom.mappings" 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 return M

View File

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

View File

@ -1,21 +1,4 @@
local overrides = require "custom.configs.overrides" 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[] ---@type NvPluginSpec[]
local plugins = { local plugins = {
@ -363,10 +346,6 @@ local plugins = {
local dash = require "alpha.themes.dashboard" local dash = require "alpha.themes.dashboard"
require("alpha").setup(dash.config) require("alpha").setup(dash.config)
end, end,
opts = {
header = get_header(),
},
}, },
{ {
"stevearc/dressing.nvim", "stevearc/dressing.nvim",