feat: config refresh
This commit is contained in:
parent
a24128cfca
commit
f956194c53
16 changed files with 217 additions and 233 deletions
37
init.lua
37
init.lua
|
@ -1,37 +1,8 @@
|
||||||
require("options")
|
require("config.options")
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
require("config.lazy")
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
|
||||||
vim.fn.system({
|
|
||||||
"git",
|
|
||||||
"clone",
|
|
||||||
"--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", -- latest stable release
|
|
||||||
lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
-- Fix for yanking to system clipboard on Windows
|
require("config.autocmds")
|
||||||
if vim.fn.has("wsl") == 1 then
|
require("config.keybinds")
|
||||||
vim.g.clipboard = {
|
|
||||||
name = "WslClipboard",
|
|
||||||
copy = {
|
|
||||||
["+"] = "clip.exe",
|
|
||||||
["*"] = "clip.exe",
|
|
||||||
},
|
|
||||||
paste = {
|
|
||||||
["+"] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
|
||||||
["*"] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
|
|
||||||
},
|
|
||||||
cache_enabled = 0,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
require("lazy").setup("plugins")
|
|
||||||
require("keybinds")
|
|
||||||
require("autocmds")
|
|
||||||
require("filetypes")
|
|
||||||
|
|
||||||
vim.cmd.colorscheme("tokyonight")
|
vim.cmd.colorscheme("tokyonight")
|
||||||
|
|
|
@ -1,38 +1,35 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "e808bee352d1a6fcf902ca1a71cee76e60e24071" },
|
"LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" },
|
||||||
"alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" },
|
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "40d4e98fcc3e6f485f0e8924c63734bc7e305967" },
|
"conform.nvim": { "branch": "master", "commit": "62055b40c4d0b001c87559c7adf96a4a464bcdd5" },
|
||||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "863903631e676b33e8be2acb17512fdc1b80b4fb" },
|
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "1159bdccd8910a0fd0914b24d6c3d186689023d9" },
|
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||||
"lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" },
|
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
|
"markdown.nvim": { "branch": "main", "commit": "0022a579ac7355966be5ade77699b88c76b6a549" },
|
||||||
"markdown.nvim": { "branch": "main", "commit": "fe1002fddc61207e4ef4325d4bc0ca33697bbc7a" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "2daa8921b7afdcfa47419a21ea343c3df6d74fa0" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "25c11854aa25558ee6c03432edfa0df0217324be" },
|
|
||||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||||
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
|
"mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" },
|
||||||
"mini.pairs": { "branch": "main", "commit": "919a89ed3c9f4142215a44c9fffca72fa8c8e792" },
|
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
"neo-tree.nvim": { "branch": "main", "commit": "694fc4b8a5a722fcc85a57515cb47eea58212b53" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" },
|
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
"nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
|
"nvim-lspconfig": { "branch": "master", "commit": "040001d85e9190a904d0e35ef5774633e14d8475" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "04680101ff79e99b4e33a4386ec27cbd0d360c75" },
|
"nvim-treesitter": { "branch": "master", "commit": "2405274937718d520a40e03df92030dca6b4f0fd" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" },
|
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "45e0d66246f31306d890b91301993fa1623e79f1" },
|
"nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" },
|
||||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "56f17def81478e406e3a8ec4aa727558e79786f3" },
|
|
||||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "98df370703b3c47a297988f3e55ce99628639590" },
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "2c85fad417170d4572ead7bf9fdd706057bd73d7" },
|
"tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "254145ffd528b98eb20be894338e2d5c93fa02c2" },
|
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
|
||||||
"ts-comments.nvim": { "branch": "main", "commit": "98d7d4dec0af1312d38e288f800bbf6ff562b6ab" },
|
"ts-comments.nvim": { "branch": "main", "commit": "872dcfa0418f4a33b7437fb4d9f4e89f2f000d74" },
|
||||||
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" }
|
"which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }
|
||||||
}
|
}
|
||||||
|
|
12
lua/config/keybinds.lua
Normal file
12
lua/config/keybinds.lua
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
vim.keymap.set("n", "<C-h>", "<cmd>wincmd h<CR>", { desc = "Go to split on left" })
|
||||||
|
vim.keymap.set("n", "<C-j>", "<cmd>wincmd j<CR>", { desc = "Go to split above" })
|
||||||
|
vim.keymap.set("n", "<C-k>", "<cmd>wincmd k<CR>", { desc = "Go to split below" })
|
||||||
|
vim.keymap.set("n", "<C-l>", "<cmd>wincmd l<CR>", { desc = "Go to split on right" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>|", "<C-w>v", { desc = "Split window right" })
|
||||||
|
vim.keymap.set("n", "<leader>-", "<C-w>s", { desc = "Split window below" })
|
||||||
|
vim.keymap.set("n", "<leader>wd", "<C-w>c", { desc = "Delete window" })
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<Leader>y", '"*y', { desc = "Yank into system clipboard" })
|
||||||
|
vim.keymap.set("v", "<Leader>y", '"*y', { desc = "Yank into system clipboard" })
|
||||||
|
|
35
lua/config/lazy.lua
Normal file
35
lua/config/lazy.lua
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
-- Bootstrap lazy.nvim
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||||
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||||
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||||
|
if vim.v.shell_error ~= 0 then
|
||||||
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
|
{ out, "WarningMsg" },
|
||||||
|
{ "\nPress any key to exit..." },
|
||||||
|
}, true, {})
|
||||||
|
vim.fn.getchar()
|
||||||
|
os.exit(1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||||
|
-- loading lazy.nvim so that mappings are correct.
|
||||||
|
-- This is also a good place to setup other settings (vim.opt)
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
|
-- Setup lazy.nvim
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
-- import your plugins
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
-- Configure any other settings here. See the documentation for more details.
|
||||||
|
-- colorscheme that will be used when installing plugins.
|
||||||
|
install = { colorscheme = { "habamax" } },
|
||||||
|
-- automatically check for plugin updates
|
||||||
|
checker = { enabled = true },
|
||||||
|
})
|
|
@ -1,5 +0,0 @@
|
||||||
vim.filetype.add({
|
|
||||||
extension = {
|
|
||||||
njk = "html",
|
|
||||||
},
|
|
||||||
})
|
|
|
@ -1,24 +0,0 @@
|
||||||
vim.keymap.set("n", "<C-h>", "<cmd>wincmd h<CR>", { desc = "Go to split on left" })
|
|
||||||
vim.keymap.set("n", "<C-j>", "<cmd>wincmd j<CR>", { desc = "Go to split above" })
|
|
||||||
vim.keymap.set("n", "<C-k>", "<cmd>wincmd k<CR>", { desc = "Go to split below" })
|
|
||||||
vim.keymap.set("n", "<C-l>", "<cmd>wincmd l<CR>", { desc = "Go to split on right" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>|", "<C-w>v", { desc = "Split window right" })
|
|
||||||
vim.keymap.set("n", "<leader>-", "<C-w>s", { desc = "Split window below" })
|
|
||||||
vim.keymap.set("n", "<leader>wd", "<C-w>c", { desc = "Delete window" })
|
|
||||||
|
|
||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move lines under cursor up" })
|
|
||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv", { desc = "Move lines under cursor down" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "n", "nzzzv", { desc = "Go to next search result and keep cursor centered on screen" })
|
|
||||||
vim.keymap.set("n", "N", "Nzzzv", { desc = "Go to previous search result and keep cursor centered on screen" })
|
|
||||||
|
|
||||||
vim.keymap.set("x", "<Leader>p", '"_dP', { desc = "Paste without replacing clipboard contents" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<Leader>y", '"*y', { desc = "Yank into system clipboard" })
|
|
||||||
vim.keymap.set("v", "<Leader>y", '"*y', { desc = "Yank into system clipboard" })
|
|
||||||
|
|
||||||
vim.keymap.set("t", "<C-h>", "<cmd>wincmd h<CR>", { desc = "Go to split on left (Terminal)" })
|
|
||||||
vim.keymap.set("t", "<C-j>", "<cmd>wincmd j<CR>", { desc = "Go to split above (Terminal)" })
|
|
||||||
vim.keymap.set("t", "<C-k>", "<cmd>wincmd k<CR>", { desc = "Go to split below (Terminal)" })
|
|
||||||
vim.keymap.set("t", "<C-l>", "<cmd>wincmd l<CR>", { desc = "Go to split on right (Terminal)" })
|
|
|
@ -16,7 +16,32 @@ return {
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
lang = {
|
lang = {
|
||||||
|
graphql = "# %s",
|
||||||
|
html = "<!-- %s -->",
|
||||||
|
javascript = {
|
||||||
|
"// %s", -- default commentstring when no treesitter node matches
|
||||||
|
"/* %s */",
|
||||||
|
call_expression = "// %s", -- specific commentstring for call_expression
|
||||||
|
jsx_attribute = "// %s",
|
||||||
|
jsx_element = "{/* %s */}",
|
||||||
|
jsx_fragment = "{/* %s */}",
|
||||||
|
spread_element = "// %s",
|
||||||
|
statement_block = "// %s",
|
||||||
|
},
|
||||||
pug = "//- %s",
|
pug = "//- %s",
|
||||||
|
php = "// %s",
|
||||||
|
tsx = {
|
||||||
|
"// %s", -- default commentstring when no treesitter node matches
|
||||||
|
"/* %s */",
|
||||||
|
call_expression = "// %s", -- specific commentstring for call_expression
|
||||||
|
jsx_attribute = "// %s",
|
||||||
|
jsx_element = "{/* %s */}",
|
||||||
|
jsx_fragment = "{/* %s */}",
|
||||||
|
spread_element = "// %s",
|
||||||
|
statement_block = "// %s",
|
||||||
|
},
|
||||||
|
twig = "{# %s #}",
|
||||||
|
typescript = { "// %s", "/* %s */" }, -- langs can have multiple commentstrings
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
|
@ -11,9 +12,11 @@ return {
|
||||||
javascriptreact = { "prettierd" },
|
javascriptreact = { "prettierd" },
|
||||||
json = { "prettierd" },
|
json = { "prettierd" },
|
||||||
jsonc = { "prettierd" },
|
jsonc = { "prettierd" },
|
||||||
|
php = { "php_cs_fixer" },
|
||||||
toml = { "taplo" },
|
toml = { "taplo" },
|
||||||
typescript = { "prettierd" },
|
typescript = { "prettierd" },
|
||||||
typescriptreact = { "prettierd" },
|
typescriptreact = { "prettierd" },
|
||||||
|
twig = { "twig-cs-fixer" },
|
||||||
},
|
},
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
|
@ -31,6 +34,33 @@ return {
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
php_cs_fixer = {
|
||||||
|
args = function()
|
||||||
|
local CONFIG_PATH = os.getenv("HOME") .. "/.config/php-cs-fixer/php-cs-fixer.php"
|
||||||
|
return {
|
||||||
|
"fix",
|
||||||
|
"$FILENAME",
|
||||||
|
"--config",
|
||||||
|
CONFIG_PATH,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
||||||
|
opts = {
|
||||||
|
ensure_installed = {
|
||||||
|
"djlint",
|
||||||
|
"php-cs-fixer",
|
||||||
|
"prettierd",
|
||||||
|
"proselint",
|
||||||
|
"stylua",
|
||||||
|
"twig-cs-fixer",
|
||||||
|
},
|
||||||
|
auto_update = true,
|
||||||
|
automatic_installation = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,22 +1,4 @@
|
||||||
return {
|
return {
|
||||||
{
|
|
||||||
"kdheepak/lazygit.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
cmd = {
|
|
||||||
"LazyGit",
|
|
||||||
"LazyGitConfig",
|
|
||||||
"LazyGitCurrentFile",
|
|
||||||
"LazyGitFilter",
|
|
||||||
"LazyGitFilterCurrentFile",
|
|
||||||
},
|
|
||||||
-- optional for floating window border decoration
|
|
||||||
dependencies = {
|
|
||||||
"nvim-lua/plenary.nvim",
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>gg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
@ -38,7 +20,6 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ghb", ":Gitsigns blame_line<CR>", desc = "Blame line" },
|
|
||||||
{ "<leader>ghs", ":Gitsigns stage_hunk<CR>", desc = "Stage hunk", mode = { "n", "v" } },
|
{ "<leader>ghs", ":Gitsigns stage_hunk<CR>", desc = "Stage hunk", mode = { "n", "v" } },
|
||||||
{ "<leader>ghr", ":Gitsigns reset_hunk<CR>", desc = "Reset hunk", mode = { "n", "v" } },
|
{ "<leader>ghr", ":Gitsigns reset_hunk<CR>", desc = "Reset hunk", mode = { "n", "v" } },
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,25 +11,14 @@ return {
|
||||||
"eslint",
|
"eslint",
|
||||||
"html",
|
"html",
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
|
"psalm", -- .php
|
||||||
"taplo", -- .toml
|
"taplo", -- .toml
|
||||||
"ts_ls",
|
"ts_ls",
|
||||||
|
"twiggy_language_server", -- .twig
|
||||||
"yamlls", -- .yml
|
"yamlls", -- .yml
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"WhoIsSethDaniel/mason-tool-installer.nvim",
|
|
||||||
opts = {
|
|
||||||
ensure_installed = {
|
|
||||||
"djlint",
|
|
||||||
"prettierd",
|
|
||||||
"proselint",
|
|
||||||
"stylua",
|
|
||||||
},
|
|
||||||
auto_update = true,
|
|
||||||
automatic_installation = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- lspconfig should be the last step.
|
-- lspconfig should be the last step.
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
|
@ -49,10 +38,12 @@ return {
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
html = {},
|
|
||||||
lua_ls = {},
|
lua_ls = {},
|
||||||
|
html = {},
|
||||||
|
psalm = {},
|
||||||
taplo = {},
|
taplo = {},
|
||||||
tsserver = {},
|
ts_ls = {},
|
||||||
|
twiggy_language_server = {},
|
||||||
yamlls = {},
|
yamlls = {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
event = "VeryLazy",
|
|
||||||
branch = "v3.x",
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
|
23
lua/plugins/snack.lua
Normal file
23
lua/plugins/snack.lua
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
return {
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
opts = {
|
||||||
|
dashboard = { enabled = true },
|
||||||
|
git = { enabled = true },
|
||||||
|
lazygit = { enabled = true },
|
||||||
|
notifier = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
scratch = { enabled = true },
|
||||||
|
statuscolumn = { enabled = true },
|
||||||
|
terminal = { enabled = true },
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>.", function() Snacks.scratch() end, desc = "Toggle Scratch Buffer" },
|
||||||
|
{ "<leader>S", function() Snacks.scratch.select() end, desc = "Select Scratch Buffer" },
|
||||||
|
{ "<leader>n", function() Snacks.notifier.show_history() end, desc = "Notification History" },
|
||||||
|
{ "<leader>gb", function() Snacks.git.blame_line() end, desc = "Git Blame Line" },
|
||||||
|
{ "<leader>gg", function() Snacks.lazygit() end, desc = "Lazygit" },
|
||||||
|
{ "<c-/>", function() Snacks.terminal() end, desc = "Toggle Terminal" },
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,8 +3,11 @@ return {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
version = false,
|
version = false,
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
|
event = { "VeryLazy" },
|
||||||
|
lazy = vim.fn.argc(-1) == 0, -- load treesitter early when opening a file from the cmdline
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
|
"graphql",
|
||||||
"html",
|
"html",
|
||||||
"htmldjango",
|
"htmldjango",
|
||||||
"javascript",
|
"javascript",
|
||||||
|
@ -14,8 +17,10 @@ return {
|
||||||
"lua",
|
"lua",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
|
"php",
|
||||||
"pug",
|
"pug",
|
||||||
"tsx",
|
"tsx",
|
||||||
|
"twig",
|
||||||
"typescript",
|
"typescript",
|
||||||
"vim",
|
"vim",
|
||||||
"vimdoc",
|
"vimdoc",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
|
@ -36,17 +37,20 @@ return {
|
||||||
scope = { enabled = false },
|
scope = { enabled = false },
|
||||||
exclude = {
|
exclude = {
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"help",
|
"Trouble",
|
||||||
"alpha",
|
"alpha",
|
||||||
"dashboard",
|
"dashboard",
|
||||||
"neo-tree",
|
"help",
|
||||||
"Trouble",
|
|
||||||
"trouble",
|
|
||||||
"lazy",
|
"lazy",
|
||||||
"mason",
|
"mason",
|
||||||
|
"neo-tree",
|
||||||
"notify",
|
"notify",
|
||||||
|
"snacks_dashboard",
|
||||||
|
"snacks_notif",
|
||||||
|
"snacks_terminal",
|
||||||
|
"snacks_win",
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
"lazyterm",
|
"trouble",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -61,84 +65,25 @@ return {
|
||||||
init = function()
|
init = function()
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = {
|
pattern = {
|
||||||
"help",
|
"Trouble",
|
||||||
"alpha",
|
"alpha",
|
||||||
"dashboard",
|
"dashboard",
|
||||||
"neo-tree",
|
"help",
|
||||||
"Trouble",
|
|
||||||
"trouble",
|
|
||||||
"lazy",
|
"lazy",
|
||||||
"mason",
|
"mason",
|
||||||
|
"neo-tree",
|
||||||
"notify",
|
"notify",
|
||||||
|
"snacks_dashboard",
|
||||||
|
"snacks_notif",
|
||||||
|
"snacks_terminal",
|
||||||
|
"snacks_win",
|
||||||
"toggleterm",
|
"toggleterm",
|
||||||
"lazyterm",
|
"trouble",
|
||||||
},
|
},
|
||||||
callback = function()
|
callback = function(data)
|
||||||
vim.b.miniindentscope_disable = true
|
vim.b[data.buf].miniindentscope_disable = true
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
opts = {
|
|
||||||
timeout = 2000,
|
|
||||||
stages = "static",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"folke/noice.nvim",
|
|
||||||
event = "VeryLazy",
|
|
||||||
opts = {},
|
|
||||||
dependencies = {
|
|
||||||
"MunifTanjim/nui.nvim",
|
|
||||||
"rcarriga/nvim-notify",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"goolord/alpha-nvim",
|
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
||||||
config = function()
|
|
||||||
local alpha = require("alpha")
|
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
|
||||||
|
|
||||||
-- https://github.com/MaximilianLloyd/ascii.nvim
|
|
||||||
dashboard.section.header.val = {
|
|
||||||
" ",
|
|
||||||
" ░░░ ▄▄▄▄▄▄███▄▄▄▄▄ ",
|
|
||||||
" ▄███████▀▀▀▀▀▀█▓▓▓▓▓▓██▄▄▄▄ ",
|
|
||||||
" ▐████▄▄ ■▓▓▓▓▀▀▀▀▀▀▀▀▀█████■ ██▄ ",
|
|
||||||
" ▀█████████▄▄▄▄▄███████████▀▀ ▄▄ ████░▄▄▄ ",
|
|
||||||
" ▐██▄ ▄▄▄▄▄▄▀▀▀▀▀▀▀▀▓▓▓▀░░░▄▄▄ ▄▄ ▐███▏▐██▓▄████ ",
|
|
||||||
" ▄█▓░███▓ ▄▓▓▓▄▄████████████▄█████▄ ▄█████████▐███ ████▏██▀████▀ ",
|
|
||||||
" ▐███▄███░▀████████▀▀ ▀▓█████▓▀██▓████▀▀ ███████ ▄█████ ■ ██▀ ",
|
|
||||||
" ▀████▓██ ▐██████ ▐████ ▐████▀ ▒████████▄ ▄███████ ",
|
|
||||||
" ▀███ ▀▀█████▄ ▄████ ▄████▏ ▄█████▀█████████▀ ███ ",
|
|
||||||
" ▀████▄ ▄████▐██▄███████▄▄▄███▓██▏ ▀██████▀ ▐██ ",
|
|
||||||
" ▀████████▀ ▀████▀▀████████▀▐██▏ ▀██▀▀ ▐██▏ ",
|
|
||||||
" ▓▓█ ▀████ ▀ ■███▄▄ ███ ██▏ ",
|
|
||||||
" ▀▀▀ ▀▀ ▀█████▄▓▀ ██▏ ",
|
|
||||||
" ░░ ▄████████████▄▄▄▄▄▄▄ ▀▀▀████▄▄ ▒▒▒ ██▏ ▄▄ ",
|
|
||||||
" ▀▀████▀▀▀▀▀▀████████████▄▄▓▓▓███▄ ░░░░ ▐█▏ ■▀▀ ",
|
|
||||||
" ▀▀▀▀▀▀█████▓▓▓▓█▄▄ ▐█ ",
|
|
||||||
" ▄█████████▄▄ ",
|
|
||||||
" ▄▄▄▄████████▀▀▀▀▀▀▀███▏ ",
|
|
||||||
" ▄▄█████▀▀▀▀ ▀■ ",
|
|
||||||
" ▄███▀▀▀▀ ",
|
|
||||||
" ■▀▀ ",
|
|
||||||
" ",
|
|
||||||
}
|
|
||||||
|
|
||||||
dashboard.section.buttons.val = {
|
|
||||||
dashboard.button("e", " > New File", "<cmd>ene<CR>"),
|
|
||||||
dashboard.button("SPC ee", " > File explorer", "<cmd>Neotree<CR>"),
|
|
||||||
dashboard.button("q", " > Quit", "<cmd>qa<CR>"),
|
|
||||||
}
|
|
||||||
|
|
||||||
alpha.setup(dashboard.opts)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue