added neo-tree, removed lazygit

This commit is contained in:
Peter 2024-11-24 14:20:39 -05:00
parent 2d0abf458c
commit 1e10919b8b
6 changed files with 90 additions and 109 deletions

View File

@ -1,36 +1,36 @@
return { return {
"goolord/alpha-nvim", 'goolord/alpha-nvim',
event = "VimEnter", event = 'VimEnter',
config = function() config = function()
local alpha = require("alpha") local alpha = require 'alpha'
local dashboard = require("alpha.themes.dashboard") local dashboard = require 'alpha.themes.dashboard'
-- Set header -- Set header
dashboard.section.header.val = { dashboard.section.header.val = {
" ", ' ',
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ", ' ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗ ',
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ", ' ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║████╗ ████║ ',
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ", ' ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║ ',
" ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ", ' ██║╚██╗██║██╔══╝ ██║ ██║╚██╗ ██╔╝██║██║╚██╔╝██║ ',
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ", ' ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║ ',
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ", ' ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ',
" ", ' ',
} }
-- Set menu -- Set menu
dashboard.section.buttons.val = { dashboard.section.buttons.val = {
dashboard.button("e", " > New File", "<cmd>ene<CR>"), dashboard.button('e', ' > New File', '<cmd>ene<CR>'),
dashboard.button("SPC ee", " > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"), dashboard.button('SPC e', ' > Toggle file explorer', '<cmd>NvimTreeToggle<CR>'),
dashboard.button("SPC ff", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"), dashboard.button('SPC ff', '󰱼 > Find File', '<cmd>Telescope find_files<CR>'),
dashboard.button("SPC fs", " > Find Word", "<cmd>Telescope live_grep<CR>"), dashboard.button('SPC fs', ' > Find Word', '<cmd>Telescope live_grep<CR>'),
dashboard.button("SPC wr", "󰁯 > Restore Session For Current Directory", "<cmd>SessionRestore<CR>"), dashboard.button('SPC wr', '󰁯 > Restore Session For Current Directory', '<cmd>SessionRestore<CR>'),
dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"), dashboard.button('q', ' > Quit NVIM', '<cmd>qa<CR>'),
} }
-- Send config to alpha -- Send config to alpha
alpha.setup(dashboard.opts) alpha.setup(dashboard.opts)
-- Disable folding on alpha buffer -- Disable folding on alpha buffer
vim.cmd([[autocmd FileType alpha setlocal nofoldenable]]) vim.cmd [[autocmd FileType alpha setlocal nofoldenable]]
end, end,
} }

View File

@ -1,19 +0,0 @@
return {
"kdheepak/lazygit.nvim",
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "Open lazy git" },
},
}

View File

@ -1,54 +1,54 @@
return { return {
"williamboman/mason.nvim", 'williamboman/mason.nvim',
dependencies = { dependencies = {
"williamboman/mason-lspconfig.nvim", 'williamboman/mason-lspconfig.nvim',
"WhoIsSethDaniel/mason-tool-installer.nvim", 'WhoIsSethDaniel/mason-tool-installer.nvim',
}, },
config = function() config = function()
-- import mason -- import mason
local mason = require("mason") local mason = require 'mason'
-- import mason-lspconfig -- import mason-lspconfig
local mason_lspconfig = require("mason-lspconfig") local mason_lspconfig = require 'mason-lspconfig'
local mason_tool_installer = require("mason-tool-installer") local mason_tool_installer = require 'mason-tool-installer'
-- enable mason and configure icons -- enable mason and configure icons
mason.setup({ mason.setup {
ui = { ui = {
icons = { icons = {
package_installed = "", package_installed = '',
package_pending = "", package_pending = '',
package_uninstalled = "", package_uninstalled = '',
}, },
}, },
}) }
mason_lspconfig.setup({ mason_lspconfig.setup {
-- list of servers for mason to install -- list of servers for mason to install
ensure_installed = { ensure_installed = {
"tsserver", 'ts_ls',
"html", 'html',
"cssls", 'cssls',
"tailwindcss", 'tailwindcss',
"svelte", 'svelte',
"lua_ls", 'lua_ls',
"graphql", 'graphql',
"emmet_ls", 'emmet_ls',
"prismals", 'prismals',
"pyright", 'pyright',
}, },
}) }
mason_tool_installer.setup({ mason_tool_installer.setup {
ensure_installed = { ensure_installed = {
"prettier", -- prettier formatter 'prettier', -- prettier formatter
"stylua", -- lua formatter 'stylua', -- lua formatter
"isort", -- python formatter 'isort', -- python formatter
"black", -- python formatter 'black', -- python formatter
"pylint", 'pylint',
"eslint_d", 'eslint_d',
}, },
}) }
end, end,
} }

View File

@ -1,14 +1,14 @@
return { return {
"nvim-tree/nvim-tree.lua", 'nvim-tree/nvim-tree.lua',
dependencies = "nvim-tree/nvim-web-devicons", dependencies = 'nvim-tree/nvim-web-devicons',
config = function() config = function()
local nvimtree = require("nvim-tree") local nvimtree = require 'nvim-tree'
-- recommended settings from nvim-tree documentation -- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1 vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1 vim.g.loaded_netrwPlugin = 1
nvimtree.setup({ nvimtree.setup {
view = { view = {
width = 35, width = 35,
relativenumber = true, relativenumber = true,
@ -21,8 +21,8 @@ return {
icons = { icons = {
glyphs = { glyphs = {
folder = { folder = {
arrow_closed = "", -- arrow when folder is closed arrow_closed = '', -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open arrow_open = '', -- arrow when folder is open
}, },
}, },
}, },
@ -38,19 +38,19 @@ return {
}, },
}, },
filters = { filters = {
custom = { ".DS_Store" }, custom = { '.DS_Store' },
}, },
git = { git = {
ignore = false, ignore = false,
}, },
}) }
-- set keymaps -- set keymaps
local keymap = vim.keymap -- for conciseness local keymap = vim.keymap -- for conciseness
keymap.set("n", "<leader>ee", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer keymap.set('n', '<leader>e', '<cmd>NvimTreeToggle<CR>', { desc = 'Toggle file explorer' }) -- toggle file explorer
keymap.set("n", "<leader>ef", "<cmd>NvimTreeFindFileToggle<CR>", { desc = "Toggle file explorer on current file" }) -- toggle file explorer on current file keymap.set('n', '<leader>ef', '<cmd>NvimTreeFindFileToggle<CR>', { desc = 'Toggle file explorer on current file' }) -- toggle file explorer on current file
keymap.set("n", "<leader>ec", "<cmd>NvimTreeCollapse<CR>", { desc = "Collapse file explorer" }) -- collapse file explorer keymap.set('n', '<leader>ec', '<cmd>NvimTreeCollapse<CR>', { desc = 'Collapse file explorer' }) -- collapse file explorer
keymap.set("n", "<leader>er", "<cmd>NvimTreeRefresh<CR>", { desc = "Refresh file explorer" }) -- refresh file explorer keymap.set('n', '<leader>er', '<cmd>NvimTreeRefresh<CR>', { desc = 'Refresh file explorer' }) -- refresh file explorer
end end,
} }

View File

@ -1,50 +1,50 @@
return { return {
"nvim-telescope/telescope.nvim", 'nvim-telescope/telescope.nvim',
branch = "0.1.x", branch = '0.1.x',
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", 'nvim-lua/plenary.nvim',
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
"nvim-tree/nvim-web-devicons", 'nvim-tree/nvim-web-devicons',
"folke/todo-comments.nvim", 'folke/todo-comments.nvim',
}, },
config = function() config = function()
local telescope = require("telescope") local telescope = require 'telescope'
local actions = require("telescope.actions") local actions = require 'telescope.actions'
local transform_mod = require("telescope.actions.mt").transform_mod local transform_mod = require('telescope.actions.mt').transform_mod
local trouble = require("trouble") local trouble = require 'trouble'
local trouble_telescope = require("trouble.sources.telescope") local trouble_telescope = require 'trouble.sources.telescope'
-- or create your custom action -- or create your custom action
local custom_actions = transform_mod({ local custom_actions = transform_mod {
open_trouble_qflist = function(prompt_bufnr) open_trouble_qflist = function(prompt_bufnr)
trouble.toggle("quickfix") trouble.toggle 'quickfix'
end, end,
}) }
telescope.setup({ telescope.setup {
defaults = { defaults = {
path_display = { "smart" }, path_display = { 'smart' },
mappings = { mappings = {
i = { i = {
["<C-k>"] = actions.move_selection_previous, -- move to prev result ['<C-k>'] = actions.move_selection_previous, -- move to prev result
["<C-j>"] = actions.move_selection_next, -- move to next result ['<C-j>'] = actions.move_selection_next, -- move to next result
["<C-q>"] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist, ['<C-q>'] = actions.send_selected_to_qflist + custom_actions.open_trouble_qflist,
["<C-t>"] = trouble_telescope.open, ['<C-t>'] = trouble_telescope.open,
}, },
}, },
}, },
}) }
telescope.load_extension("fzf") telescope.load_extension 'fzf'
-- set keymaps -- set keymaps
local keymap = vim.keymap -- for conciseness local keymap = vim.keymap -- for conciseness
keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Fuzzy find files in cwd" }) keymap.set('n', '<leader>f', '<cmd>Telescope find_files<cr>', { desc = 'Fuzzy find files in cwd' })
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" }) keymap.set('n', '<leader>fr', '<cmd>Telescope oldfiles<cr>', { desc = 'Fuzzy find recent files' })
keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" }) keymap.set('n', '<leader>g', '<cmd>Telescope live_grep<cr>', { desc = 'Find string in cwd' })
keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" }) keymap.set('n', '<leader>fc', '<cmd>Telescope grep_string<cr>', { desc = 'Find string under cursor in cwd' })
keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find todos" }) keymap.set('n', '<leader>ft', '<cmd>TodoTelescope<cr>', { desc = 'Find todos' })
end, end,
} }