Add alpha
Update catppuccin integrations Fix lsp hover from noice filter Fix broken treesitter config
This commit is contained in:
parent
f43ff1c472
commit
621ed60516
57
home/tui/config/nvim/lua/plugins/alpha.lua
Normal file
57
home/tui/config/nvim/lua/plugins/alpha.lua
Normal file
|
@ -0,0 +1,57 @@
|
|||
return {
|
||||
"goolord/alpha-nvim",
|
||||
event = "VimEnter",
|
||||
opts = function()
|
||||
local dashboard = require "alpha.themes.dashboard"
|
||||
local logo = [[
|
||||
██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██╗███╗ ███╗ Z
|
||||
██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██║██║████╗ ████║ Z
|
||||
██║ ███████║ ███╔╝ ╚████╔╝ ██║ ██║██║██╔████╔██║ z
|
||||
██║ ██╔══██║ ███╔╝ ╚██╔╝ ╚██╗ ██╔╝██║██║╚██╔╝██║ z
|
||||
███████╗██║ ██║███████╗ ██║ ╚████╔╝ ██║██║ ╚═╝ ██║
|
||||
╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝
|
||||
]]
|
||||
|
||||
dashboard.section.header.val = vim.split(logo, "\n")
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
|
||||
dashboard.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
|
||||
dashboard.button("g", " " .. " Git status", ":Neogit kind=floating <CR>"),
|
||||
dashboard.button("c", " " .. " Config", ":e $MYVIMRC <CR>"),
|
||||
dashboard.button("l", " " .. " Lazy", ":Lazy<CR>"),
|
||||
dashboard.button("q", " " .. " Quit", ":qa<CR>"),
|
||||
}
|
||||
for _, button in ipairs(dashboard.section.buttons.val) do
|
||||
button.opts.hl = "AlphaButtons"
|
||||
button.opts.hl_shortcut = "AlphaShortcut"
|
||||
end
|
||||
dashboard.section.header.opts.hl = "AlphaHeader"
|
||||
dashboard.section.buttons.opts.hl = "AlphaButtons"
|
||||
dashboard.section.footer.opts.hl = "AlphaFooter"
|
||||
dashboard.opts.layout[1].val = 8
|
||||
return dashboard
|
||||
end,
|
||||
config = function(_, dashboard)
|
||||
-- close Lazy and re-open when the dashboard is ready
|
||||
if vim.o.filetype == "lazy" then
|
||||
vim.cmd.close()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "AlphaReady",
|
||||
callback = function() require("lazy").show() end,
|
||||
})
|
||||
end
|
||||
|
||||
require("alpha").setup(dashboard.opts)
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimStarted",
|
||||
callback = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
dashboard.section.footer.val = "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
|
||||
pcall(vim.cmd.AlphaRedraw)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
|
@ -3,11 +3,7 @@ local config = {
|
|||
term_colors = true,
|
||||
transparent_background = true,
|
||||
integrations = {
|
||||
barbar = true,
|
||||
barbecue = {
|
||||
dim_dirname = true,
|
||||
},
|
||||
dashboard = true,
|
||||
alpha = true,
|
||||
gitsigns = true,
|
||||
hop = true,
|
||||
indent_blankline = {
|
||||
|
@ -15,15 +11,17 @@ local config = {
|
|||
colored_indent_levels = true,
|
||||
},
|
||||
cmp = true,
|
||||
mason = true,
|
||||
markdown = true,
|
||||
mini = true,
|
||||
native_lsp = {
|
||||
enabled = true,
|
||||
},
|
||||
neogit = true,
|
||||
neotree = true,
|
||||
noice = true,
|
||||
notify = true,
|
||||
nvimtree = true,
|
||||
navic = {
|
||||
enabled = false,
|
||||
enabled = true,
|
||||
custom_bg = "NONE",
|
||||
},
|
||||
treesitter = true,
|
||||
|
|
|
@ -30,8 +30,8 @@ return {
|
|||
win_options = { winblend = 0 },
|
||||
},
|
||||
},
|
||||
status = { lsp = { event = "lsp" } },
|
||||
routes = { { view = "mini", filter = { event = "lsp" }, opts = { skip = true } } },
|
||||
status = { lsp = { event = "lsp", kind = "progress" } },
|
||||
routes = { { view = "mini", filter = { event = "lsp", kind = "progress" }, opts = { skip = true } } },
|
||||
-- you can enable a preset for easier configuration
|
||||
presets = {
|
||||
bottom_search = false, -- use a classic bottom cmdline for search
|
||||
|
|
|
@ -6,6 +6,22 @@ return {
|
|||
config = true,
|
||||
opts = {
|
||||
icons = require "ui.navic_icons",
|
||||
window = { border = "rounded" },
|
||||
window = {
|
||||
border = "none",
|
||||
size = "80%",
|
||||
sections = {
|
||||
left = { border = "rounded" },
|
||||
mid = { border = "rounded" },
|
||||
right = { border = "rounded", preview = "always" },
|
||||
},
|
||||
},
|
||||
node_markers = {
|
||||
enabled = true,
|
||||
icons = {
|
||||
leaf = " ",
|
||||
leaf_selected = " → ",
|
||||
branch = " ",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -21,13 +21,13 @@ return {
|
|||
init = function()
|
||||
vim.keymap.set("n", "<leader>;", "<cmd>Telescope builtin<cr>")
|
||||
vim.keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>")
|
||||
vim.keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>")
|
||||
vim.keymap.set("n", "<leader>fg", "<cmd>Telescope live_grep<cr>")
|
||||
vim.keymap.set("n", "<leader>fb", "<cmd>Telescope buffers<cr>")
|
||||
vim.keymap.set("n", "<leader>fl", "<cmd>Telescope lsp_document_symbols<cr>")
|
||||
vim.keymap.set("n", "<leader>fs", "<cmd>Telescope lsp_document_symbols<cr>")
|
||||
vim.keymap.set("n", "<leader>fe", "<cmd>Telescope diagnostics<cr>")
|
||||
vim.keymap.set("n", "<leader>fs", "<cmd>Telescope treesitter<cr>")
|
||||
vim.keymap.set("n", "<leader>ft", "<cmd>Telescope treesitter<cr>")
|
||||
vim.keymap.set("n", "<leader>fz", "<cmd>Telescope current_buffer_fuzzy_find<cr>")
|
||||
vim.keymap.set("n", "<leader>fp", "<cmd>Telescope projects<cr>")
|
||||
end,
|
||||
config = function()
|
||||
local trouble = require "trouble.providers.telescope"
|
||||
|
|
|
@ -10,7 +10,18 @@ return {
|
|||
"TSUpdate",
|
||||
"TSEnable",
|
||||
},
|
||||
config = true,
|
||||
config = function(_, opts)
|
||||
if type(opts.ensure_installed) == "table" then
|
||||
-- @type table<string, boolean>
|
||||
local added = {}
|
||||
opts.ensure_installed = vim.tbl_filter(function(lang)
|
||||
if added[lang] then return false end
|
||||
added[lang] = true
|
||||
return true
|
||||
end, opts.ensure_installed)
|
||||
end
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
opts = {
|
||||
ensure_installed = { "vim", "regex", "lua", "bash", "markdown", "markdown_inline" },
|
||||
auto_install = false,
|
||||
|
|
Loading…
Reference in a new issue