mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat(nvim): upgrade LazyVim to version 10
This commit is contained in:
@@ -3,3 +3,6 @@ require("config.lazy")
|
||||
|
||||
-- Custom Highlight
|
||||
vim.api.nvim_set_hl(0, "WinSeparator", { fg = "#1F2334" })
|
||||
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#A8CD76" })
|
||||
vim.api.nvim_set_hl(0, "DashboardFooter", { fg = "#A8CD76" })
|
||||
vim.api.nvim_set_hl(0, "DashboardIcon", { fg = "#A8CD76" })
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"LuaSnip": { "branch": "master", "commit": "0df29db3543837f8b41597f2640397c5ec792b7b" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "f3c4985093716c8ddf93731609ebfc1df7c5335d" },
|
||||
"aerial.nvim": { "branch": "master", "commit": "9ef83d9a7a4ac471d14e608da50b8d91459cae10" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
|
||||
"aw-watcher-vim": { "branch": "master", "commit": "4ba86d05a940574000c33f280fd7f6eccc284331" },
|
||||
"baleia.nvim": { "branch": "main", "commit": "00bb4af31c8c3865b735d40ebefa6c3f07b2dd16" },
|
||||
"base16-vim": { "branch": "master", "commit": "3be3cd82cd31acfcab9a41bad853d9c68d30478d" },
|
||||
@@ -19,8 +18,10 @@
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"codewindow.nvim": { "branch": "master", "commit": "8c8f5ff66e123491c946c04848d744fcdc7cac6c" },
|
||||
"committia.vim": { "branch": "master", "commit": "0b4df1a7f48ffbc23b009bd14d58ee1be541917c" },
|
||||
"conform.nvim": { "branch": "master", "commit": "4db76a68b47aa6e9777e4da4aed16f0fff74920e" },
|
||||
"copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" },
|
||||
"copilot.lua": { "branch": "master", "commit": "1a8032ae496916ccc7a7a52ee79194fbef29f462" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "8721edccead31c07c2cda0bc5ac75b0491b5adcd" },
|
||||
"dial.nvim": { "branch": "master", "commit": "019bbe9daea397c93a99adc747f8f071379fee5c" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||
@@ -68,12 +69,13 @@
|
||||
"nvim-code-action-menu": { "branch": "main", "commit": "e4399dbaf6eabff998d3d5f1cbcd8d9933710027" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
|
||||
"nvim-cursorline": { "branch": "main", "commit": "804f0023692653b2b2368462d67d2a87056947f9" },
|
||||
"nvim-lint": { "branch": "master", "commit": "0f54481d7537a6872f7bb021575366657e123474" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "bb8e3dfbe10d80c294bb609c4bb4bba3ecdfbfe2" },
|
||||
"nvim-navic": { "branch": "master", "commit": "0ffa7ffe6588f3417e680439872f5049e38a24db" },
|
||||
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" },
|
||||
"nvim-transparent": { "branch": "main", "commit": "3af6232c8d39d51062702e875ff6407c1eeb0391" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "783e5fc3079680b307e8ac518935317907e71a59" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "4cf64264c049c55f256550ad247b606f3e53bc77" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
|
||||
|
||||
13
nvim/lazyvim.json
Normal file
13
nvim/lazyvim.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.coding.copilot",
|
||||
"lazyvim.plugins.extras.editor.aerial",
|
||||
"lazyvim.plugins.extras.formatting.prettier",
|
||||
"lazyvim.plugins.extras.lang.tailwind",
|
||||
"lazyvim.plugins.extras.lang.yaml"
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "2123"
|
||||
},
|
||||
"version": 2
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
-- Dashboard
|
||||
-- https://github.com/goolord/alpha-nvim
|
||||
return {
|
||||
"goolord/alpha-nvim",
|
||||
opts = function(_, opts)
|
||||
opts.section.header.val = {
|
||||
" ▖ ",
|
||||
"┌─╮╭─╮╭─╮▖ ▖▖▄▄▗▄ ",
|
||||
"│ │├─┘│ │▝▖▞ ▌▌ ▌ ▌",
|
||||
"╵ ╵╰─╯╰─╯ ▝ ▘▘ ▘ ▘",
|
||||
}
|
||||
opts.section.buttons.val = {
|
||||
opts.button("f", " " .. " Find file", ":Telescope find_files <CR>"),
|
||||
opts.button("n", " " .. " New file", ":ene <BAR> startinsert <CR>"),
|
||||
opts.button("r", " " .. " Recent files", ":Telescope oldfiles <CR>"),
|
||||
opts.button("g", " " .. " Find text", ":Telescope live_grep <CR>"),
|
||||
opts.button("p", " " .. " Find Project", ":Telescope projects<CR>"),
|
||||
opts.button("s", " " .. " Restore Session", [[:lua require("persistence").load() <cr>]]),
|
||||
opts.button("l", " " .. " Lazy (Plugins)", ":Lazy<CR>"),
|
||||
opts.button("m", " " .. " Mason (LSP, DAP, Linter, Formatter)", ":Mason<CR>"),
|
||||
opts.button("q", " " .. " Quit", ":qa<CR>"),
|
||||
opts.padding,
|
||||
}
|
||||
opts.section.header.opts.hl = "String"
|
||||
opts.section.buttons.opts.hl = "Keyword"
|
||||
opts.section.footer.opts.hl = "String"
|
||||
opts.opts.opts.noautocmd = true
|
||||
end,
|
||||
}
|
||||
110
nvim/lua/plugins/dashboard.lua
Normal file
110
nvim/lua/plugins/dashboard.lua
Normal file
@@ -0,0 +1,110 @@
|
||||
return {
|
||||
"glepnir/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
opts = function()
|
||||
local logo = [[
|
||||
▖
|
||||
┌─╮╭─╮╭─╮▖ ▖▖▄▄▗▄
|
||||
│ │├─┘│ │▝▖▞ ▌▌ ▌ ▌
|
||||
╵ ╵╰─╯╰─╯ ▝ ▘▘ ▘ ▘
|
||||
]]
|
||||
|
||||
logo = string.rep("\n", 8) .. logo .. "\n\n"
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
hide = {
|
||||
statusline = false,
|
||||
},
|
||||
config = {
|
||||
header = vim.split(logo, "\n"),
|
||||
center = {
|
||||
{
|
||||
action = "Telescope find_files",
|
||||
desc = " Find file",
|
||||
icon = " ",
|
||||
key = "f",
|
||||
},
|
||||
{
|
||||
action = "ene | startinsert",
|
||||
desc = " New file",
|
||||
icon = " ",
|
||||
key = "n",
|
||||
},
|
||||
{
|
||||
action = "Telescope oldfiles",
|
||||
desc = " Recent files",
|
||||
icon = " ",
|
||||
key = "r",
|
||||
},
|
||||
{
|
||||
action = "Telescope live_grep",
|
||||
desc = " Find text",
|
||||
icon = " ",
|
||||
key = "g",
|
||||
},
|
||||
{
|
||||
action = "Telescope projects",
|
||||
desc = " Find project",
|
||||
icon = " ",
|
||||
key = "p",
|
||||
},
|
||||
{
|
||||
action = 'lua require("persistence").load()',
|
||||
desc = " Restore Session",
|
||||
icon = " ",
|
||||
key = "s",
|
||||
},
|
||||
{
|
||||
action = "LazyExtras",
|
||||
desc = " Lazy Extras",
|
||||
icon = " ",
|
||||
key = "e",
|
||||
},
|
||||
{
|
||||
action = "Lazy",
|
||||
desc = " Lazy",
|
||||
icon = " ",
|
||||
key = "l",
|
||||
},
|
||||
{
|
||||
action = "Mason",
|
||||
desc = " Mason",
|
||||
icon = " ",
|
||||
key = "m",
|
||||
},
|
||||
{
|
||||
action = "qa",
|
||||
desc = " Quit",
|
||||
icon = " ",
|
||||
key = "q",
|
||||
},
|
||||
},
|
||||
footer = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
return {
|
||||
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
for _, button in ipairs(opts.config.center) do
|
||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||
end
|
||||
|
||||
-- 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 = "DashboardLoaded",
|
||||
callback = function()
|
||||
require("lazy").show()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return opts
|
||||
end,
|
||||
}
|
||||
@@ -103,7 +103,7 @@ return {
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set("n", "g0", "<cmd>Telescope lsp_document_symbols<cr>", { buffer = buffer, desc = "Document Symbols" })
|
||||
end)
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
return {
|
||||
"nvimtools/none-ls.nvim",
|
||||
config = function()
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
debug = false,
|
||||
debounce = 50,
|
||||
save_after_format = false,
|
||||
sources = {
|
||||
null_ls.builtins.code_actions.cspell,
|
||||
null_ls.builtins.code_actions.eslint_d,
|
||||
null_ls.builtins.diagnostics.cspell,
|
||||
null_ls.builtins.diagnostics.eslint_d,
|
||||
null_ls.builtins.diagnostics.fish,
|
||||
null_ls.builtins.diagnostics.stylelint,
|
||||
null_ls.builtins.diagnostics.tsc,
|
||||
null_ls.builtins.diagnostics.tsc,
|
||||
null_ls.builtins.formatting.black,
|
||||
null_ls.builtins.formatting.fish_indent,
|
||||
null_ls.builtins.formatting.prettierd.with({
|
||||
filetypes = {
|
||||
"astro",
|
||||
"css",
|
||||
"graphql",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"less",
|
||||
"markdown",
|
||||
"scss",
|
||||
"svelte",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"yaml",
|
||||
},
|
||||
}),
|
||||
null_ls.builtins.formatting.shfmt,
|
||||
null_ls.builtins.formatting.stylelint,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
null_ls.builtins.formatting.trim_newlines,
|
||||
null_ls.builtins.formatting.trim_whitespace,
|
||||
},
|
||||
root_dir = require("null-ls.utils").root_pattern("package.json", ".null-ls-root", ".neoconf.json", ".git"),
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
return {
|
||||
"MunifTanjim/prettier.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
"nvimtools/none-ls.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("prettier").setup({
|
||||
bin = "prettierd",
|
||||
filetypes = {
|
||||
"astro",
|
||||
"css",
|
||||
"graphql",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"json",
|
||||
"less",
|
||||
"markdown",
|
||||
"scss",
|
||||
"svelte",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"yaml",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user