mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 16:39:42 -04:00
moar
This commit is contained in:
parent
4c8fadee55
commit
12b6749545
2 changed files with 16 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ return {
|
||||||
require("lualine").setup ({
|
require("lualine").setup ({
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'iceberg_dark',
|
theme = 'material',
|
||||||
component_separators = { left = '>', right = '|'},
|
component_separators = { left = '>', right = '|'},
|
||||||
section_separators = { left = '', right = ''},
|
section_separators = { left = '', right = ''},
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
|
local function git_root()
|
||||||
|
local git_dir = vim.fn.systemlist("git rev-parse --show-toplevel")[1]
|
||||||
|
if git_dir and git_dir ~= "" then
|
||||||
|
return git_dir
|
||||||
|
else
|
||||||
|
return vim.fn.getcwd() -- Fallback to current working directory if not in a Git repo
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
|
@ -11,7 +20,13 @@ return {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
-- Custom Telescope command to grep from Git root
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>lg', "<cmd>lua require('telescope.builtin').live_grep({ cwd = git_root() })<CR>", { noremap = true, silent = true })
|
||||||
require("which-key").add({
|
require("which-key").add({
|
||||||
|
{ "<leader>/", function()
|
||||||
|
require('telescope.builtin').live_grep({ cwd = git_root() })
|
||||||
|
end,
|
||||||
|
desc = "grep" },
|
||||||
{ "<leader>/", ":Telescope live_grep<CR>", desc = "grep" },
|
{ "<leader>/", ":Telescope live_grep<CR>", desc = "grep" },
|
||||||
{ "<leader>ff", ":Telescope fd<CR>", desc = "Search for Files" },
|
{ "<leader>ff", ":Telescope fd<CR>", desc = "Search for Files" },
|
||||||
{ "<leader>fp", ":Telescope oldfiles<CR>", desc = "Oldfiles" },
|
{ "<leader>fp", ":Telescope oldfiles<CR>", desc = "Oldfiles" },
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue