chore: run stylua
This commit is contained in:
@@ -1,20 +1,18 @@
|
|||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
|
||||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
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 })
|
||||||
|
|
||||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
if vim.v.shell_error ~= 0 then
|
||||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
vim.api.nvim_echo({
|
||||||
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||||
if vim.v.shell_error ~= 0 then
|
{ out, "WarningMsg" },
|
||||||
vim.api.nvim_echo({
|
{ "\nPress any key to exit..." },
|
||||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
}, true, {})
|
||||||
{ out, "WarningMsg" },
|
vim.fn.getchar()
|
||||||
{ "\nPress any key to exit..." },
|
os.exit(1)
|
||||||
}, true, {})
|
end
|
||||||
vim.fn.getchar()
|
|
||||||
os.exit(1)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
@@ -22,4 +20,3 @@ vim.opt.rtp:prepend(lazypath)
|
|||||||
require("vim-options")
|
require("vim-options")
|
||||||
require("lazy").setup("plugins")
|
require("lazy").setup("plugins")
|
||||||
require("current-theme")
|
require("current-theme")
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,6 +53,6 @@
|
|||||||
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||||
"vim-dadbod-ui": { "branch": "master", "commit": "afd07819d8efcefc3317205b855ad4e3513b0011" },
|
"vim-dadbod-ui": { "branch": "master", "commit": "afd07819d8efcefc3317205b855ad4e3513b0011" },
|
||||||
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
||||||
"watchexec.nvim": { "branch": "main", "commit": "d424bd730784696e3f97f132581ba6fed39d16b0" },
|
"watchexec.nvim": { "branch": "main", "commit": "6530a1e66fa243d1befad72a98d8f00053be229a" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -1,2 +1 @@
|
|||||||
return { }
|
return {}
|
||||||
|
|
||||||
|
|||||||
+80
-80
@@ -1,85 +1,85 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-autopairs").setup()
|
require("nvim-autopairs").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
},
|
},
|
||||||
build = "make install_jsregexp",
|
build = "make install_jsregexp",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
config = function()
|
config = function()
|
||||||
local luasnip = require("luasnip")
|
local luasnip = require("luasnip")
|
||||||
local cmp = require("cmp")
|
local cmp = require("cmp")
|
||||||
|
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||||
|
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
luasnip.lsp_expand(args.body)
|
luasnip.lsp_expand(args.body)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<Esc>"] = cmp.mapping.close(),
|
["<Esc>"] = cmp.mapping.close(),
|
||||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-e>"] = cmp.mapping(function()
|
["<C-e>"] = cmp.mapping(function()
|
||||||
if cmp.visible.docs() then
|
if cmp.visible.docs() then
|
||||||
cmp.close_docs()
|
cmp.close_docs()
|
||||||
else
|
else
|
||||||
cmp.open_docs()
|
cmp.open_docs()
|
||||||
end
|
end
|
||||||
end),
|
end),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<CR>"] = cmp.mapping.confirm({
|
["<CR>"] = cmp.mapping.confirm({
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Replace,
|
||||||
select = true,
|
select = true,
|
||||||
}),
|
}),
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
elseif luasnip.expand_or_jumpable() then
|
elseif luasnip.expand_or_jumpable() then
|
||||||
luasnip.expand_or_jump()
|
luasnip.expand_or_jump()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif luasnip.jumpable(-1) then
|
elseif luasnip.jumpable(-1) then
|
||||||
luasnip.jump(-1)
|
luasnip.jump(-1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "luasnip" },
|
{ name = "luasnip" },
|
||||||
}, {
|
}, {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ return {
|
|||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.db_ui_use_nerd_fonts = 1
|
vim.g.db_ui_use_nerd_fonts = 1
|
||||||
vim.g.db_ui_auto_execute_table_helpers = 1
|
vim.g.db_ui_auto_execute_table_helpers = 1
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
+56
-56
@@ -1,8 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
"nvimdev/dashboard-nvim",
|
"nvimdev/dashboard-nvim",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
config = function()
|
config = function()
|
||||||
local logo = [[
|
local logo = [[
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -28,59 +28,59 @@ return {
|
|||||||
|
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local opts = {
|
local opts = {
|
||||||
theme = "doom",
|
theme = "doom",
|
||||||
hide = {
|
hide = {
|
||||||
statusline = false,
|
statusline = false,
|
||||||
},
|
},
|
||||||
config = {
|
config = {
|
||||||
header = vim.split(logo, "\n"),
|
header = vim.split(logo, "\n"),
|
||||||
center = {
|
center = {
|
||||||
{
|
{
|
||||||
action = 'lua require("telescope.builtin").find_files()',
|
action = 'lua require("telescope.builtin").find_files()',
|
||||||
desc = " Find File",
|
desc = " Find File",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = "f",
|
key = "f",
|
||||||
},
|
},
|
||||||
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
{ action = "ene | startinsert", desc = " New File", icon = " ", key = "n" },
|
||||||
{
|
{
|
||||||
action = 'lua require("telescope.builtin").oldfiles()',
|
action = 'lua require("telescope.builtin").oldfiles()',
|
||||||
desc = " Recent Files",
|
desc = " Recent Files",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = "r",
|
key = "r",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action = 'lua require("telescope.builtin").live_grep()',
|
action = 'lua require("telescope.builtin").live_grep()',
|
||||||
desc = " Find Text",
|
desc = " Find Text",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = "g",
|
key = "g",
|
||||||
},
|
},
|
||||||
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
{ action = "Lazy", desc = " Lazy", icon = " ", key = "l" },
|
||||||
{
|
{
|
||||||
action = function()
|
action = function()
|
||||||
vim.api.nvim_input("<cmd>qa<cr>")
|
vim.api.nvim_input("<cmd>qa<cr>")
|
||||||
end,
|
end,
|
||||||
desc = " Quit",
|
desc = " Quit",
|
||||||
icon = " ",
|
icon = " ",
|
||||||
key = "q",
|
key = "q",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
footer = function()
|
footer = function()
|
||||||
local stats = require("lazy").stats()
|
local stats = require("lazy").stats()
|
||||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||||
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
return { "⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms" }
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
require("dashboard").setup(opts)
|
require("dashboard").setup(opts)
|
||||||
|
|
||||||
for _, button in ipairs(opts.config.center) do
|
for _, button in ipairs(opts.config.center) do
|
||||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||||
button.key_format = " %s"
|
button.key_format = " %s"
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#b39cd0", bold = true })
|
vim.api.nvim_set_hl(0, "DashboardHeader", { fg = "#b39cd0", bold = true })
|
||||||
vim.api.nvim_set_hl(0, "DashboardFooter", { fg = "#b39cd0", bold = true })
|
vim.api.nvim_set_hl(0, "DashboardFooter", { fg = "#b39cd0", bold = true })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -1,17 +1,17 @@
|
|||||||
return {
|
return {
|
||||||
"kdheepak/lazygit.nvim",
|
"kdheepak/lazygit.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
cmd = {
|
cmd = {
|
||||||
"LazyGit",
|
"LazyGit",
|
||||||
"LazyGitConfig",
|
"LazyGitConfig",
|
||||||
"LazyGitCurrentFile",
|
"LazyGitCurrentFile",
|
||||||
"LazyGitFilter",
|
"LazyGitFilter",
|
||||||
"LazyGitFilterCurrentFile",
|
"LazyGitFilterCurrentFile",
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" }
|
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -282,15 +282,15 @@ return {
|
|||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.lsp.enable("rust_analyzer")
|
vim.lsp.enable("rust_analyzer")
|
||||||
|
|
||||||
vim.lsp.config("clangd", {
|
vim.lsp.config("clangd", {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.lsp.enable("clangd")
|
vim.lsp.enable("clangd")
|
||||||
|
|
||||||
vim.lsp.config("gh_actions_ls", {
|
vim.lsp.config("gh_actions_ls", {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
filetypes = { "yaml" },
|
filetypes = { "yaml" },
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("lualine").setup({
|
require("lualine").setup({
|
||||||
options = { theme = "dracula" },
|
options = { theme = "dracula" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
+77
-77
@@ -1,87 +1,87 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-neotest/neotest",
|
"nvim-neotest/neotest",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"antoinemadec/FixCursorHold.nvim",
|
"antoinemadec/FixCursorHold.nvim",
|
||||||
"nvim-neotest/neotest-python",
|
"nvim-neotest/neotest-python",
|
||||||
"nvim-neotest/neotest-jest",
|
"nvim-neotest/neotest-jest",
|
||||||
"marilari88/neotest-vitest",
|
"marilari88/neotest-vitest",
|
||||||
{ "stevanfreeborn/neotest-playwright", branch = "fork" },
|
{ "stevanfreeborn/neotest-playwright", branch = "fork" },
|
||||||
"issafalcon/neotest-dotnet",
|
"issafalcon/neotest-dotnet",
|
||||||
{ "stevanfreeborn/neotest-go" },
|
{ "stevanfreeborn/neotest-go" },
|
||||||
-- {
|
-- {
|
||||||
-- "mrcjkb/rustaceanvim",
|
-- "mrcjkb/rustaceanvim",
|
||||||
-- version = "^6",
|
-- version = "^6",
|
||||||
-- lazy = false,
|
-- lazy = false,
|
||||||
-- },
|
-- },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local neotest = require("neotest")
|
local neotest = require("neotest")
|
||||||
|
|
||||||
local neotest_ns = vim.api.nvim_create_namespace("neotest")
|
local neotest_ns = vim.api.nvim_create_namespace("neotest")
|
||||||
|
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = {
|
virtual_text = {
|
||||||
format = function(diagnostic)
|
format = function(diagnostic)
|
||||||
local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
|
local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
|
||||||
return message
|
return message
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}, neotest_ns)
|
}, neotest_ns)
|
||||||
|
|
||||||
neotest.setup({
|
neotest.setup({
|
||||||
log_level = vim.log.levels.DEBUG,
|
log_level = vim.log.levels.DEBUG,
|
||||||
summary = {
|
summary = {
|
||||||
follow = false,
|
follow = false,
|
||||||
},
|
},
|
||||||
adapters = {
|
adapters = {
|
||||||
require("neotest-python"),
|
require("neotest-python"),
|
||||||
require("neotest-jest"),
|
require("neotest-jest"),
|
||||||
require("neotest-vitest"),
|
require("neotest-vitest"),
|
||||||
require("neotest-playwright").adapter({
|
require("neotest-playwright").adapter({
|
||||||
options = {
|
options = {
|
||||||
persist_project_selection = true,
|
persist_project_selection = true,
|
||||||
enable_dynamic_test_discovery = true,
|
enable_dynamic_test_discovery = true,
|
||||||
preset = "headed",
|
preset = "headed",
|
||||||
experimental = {
|
experimental = {
|
||||||
telescope = {
|
telescope = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
get_playwright_binary = function()
|
get_playwright_binary = function()
|
||||||
return vim.loop.cwd() .. "/node_modules/.bin/playwright"
|
return vim.loop.cwd() .. "/node_modules/.bin/playwright"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
require("neotest-dotnet")({
|
require("neotest-dotnet")({
|
||||||
dap = {
|
dap = {
|
||||||
adapter_name = "coreclr",
|
adapter_name = "coreclr",
|
||||||
},
|
},
|
||||||
discovery_root = "solution",
|
discovery_root = "solution",
|
||||||
}),
|
}),
|
||||||
require("neotest-go"),
|
require("neotest-go"),
|
||||||
-- require('rustaceanvim.neotest'),
|
-- require('rustaceanvim.neotest'),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>tr", neotest.run.run, { desc = "Run nearest test" })
|
vim.keymap.set("n", "<leader>tr", neotest.run.run, { desc = "Run nearest test" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>td", function()
|
vim.keymap.set("n", "<leader>td", function()
|
||||||
neotest.run.run({ strategy = "dap" })
|
neotest.run.run({ strategy = "dap" })
|
||||||
end, { desc = "Debug nearest test" })
|
end, { desc = "Debug nearest test" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ts", neotest.run.stop, { desc = "Stop nearest test" })
|
vim.keymap.set("n", "<leader>ts", neotest.run.stop, { desc = "Stop nearest test" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>tf", function()
|
vim.keymap.set("n", "<leader>tf", function()
|
||||||
neotest.run.run(vim.fn.expand("%"))
|
neotest.run.run(vim.fn.expand("%"))
|
||||||
end, { desc = "Run file tests" })
|
end, { desc = "Run file tests" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>to", neotest.output.open, { desc = "Display output" })
|
vim.keymap.set("n", "<leader>to", neotest.output.open, { desc = "Display output" })
|
||||||
vim.keymap.set("n", "<leader>top", neotest.output_panel.open, { desc = "Display output panel" })
|
vim.keymap.set("n", "<leader>top", neotest.output_panel.open, { desc = "Display output panel" })
|
||||||
vim.keymap.set("n", "<leader>topc", neotest.output_panel.clear, { desc = "Clear output" })
|
vim.keymap.set("n", "<leader>topc", neotest.output_panel.clear, { desc = "Clear output" })
|
||||||
vim.keymap.set("n", "<C-t>", neotest.summary.open, { desc = "Display summary" })
|
vim.keymap.set("n", "<C-t>", neotest.summary.open, { desc = "Display summary" })
|
||||||
vim.keymap.set("n", "<leader>tsr", neotest.summary.run_marked, { desc = "Run marked tests" })
|
vim.keymap.set("n", "<leader>tsr", neotest.summary.run_marked, { desc = "Run marked tests" })
|
||||||
vim.keymap.set("n", "<leader>tsc", neotest.summary.clear_marked, { desc = "Clear marked tests" })
|
vim.keymap.set("n", "<leader>tsc", neotest.summary.clear_marked, { desc = "Clear marked tests" })
|
||||||
vim.keymap.set("n", "<leader>tw", neotest.watch.watch, { desc = "Start watching tests" })
|
vim.keymap.set("n", "<leader>tw", neotest.watch.watch, { desc = "Start watching tests" })
|
||||||
vim.keymap.set("n", "<leader>twc", neotest.watch.stop, { desc = "Stop watching tests" })
|
vim.keymap.set("n", "<leader>twc", neotest.watch.stop, { desc = "Stop watching tests" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
+50
-50
@@ -1,55 +1,55 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v3.x",
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("neo-tree").setup({
|
require("neo-tree").setup({
|
||||||
filesystem = {
|
filesystem = {
|
||||||
use_libuv_file_watcher = true,
|
use_libuv_file_watcher = true,
|
||||||
filtered_items = {
|
filtered_items = {
|
||||||
visible = true,
|
visible = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
["Y"] = {
|
["Y"] = {
|
||||||
function(state)
|
function(state)
|
||||||
local node = state.tree:get_node()
|
local node = state.tree:get_node()
|
||||||
local path = node:get_id()
|
local path = node:get_id()
|
||||||
vim.fn.setreg("+", path, "c")
|
vim.fn.setreg("+", path, "c")
|
||||||
vim.notify("Copied: " .. path .. " to clipboard")
|
vim.notify("Copied: " .. path .. " to clipboard")
|
||||||
end,
|
end,
|
||||||
desc = "Copy path to clipboard",
|
desc = "Copy path to clipboard",
|
||||||
},
|
},
|
||||||
["O"] = {
|
["O"] = {
|
||||||
function(state)
|
function(state)
|
||||||
local node = state.tree:get_node()
|
local node = state.tree:get_node()
|
||||||
vim.notify("Opening: " .. node.path)
|
vim.notify("Opening: " .. node.path)
|
||||||
|
|
||||||
local _, err = vim.ui.open(node.path)
|
local _, err = vim.ui.open(node.path)
|
||||||
|
|
||||||
if err then
|
if err then
|
||||||
vim.notify("Error opening explorer: " .. err, vim.log.levels.ERROR)
|
vim.notify("Error opening explorer: " .. err, vim.log.levels.ERROR)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
desc = "Open in default app",
|
desc = "Open in default app",
|
||||||
},
|
},
|
||||||
["P"] = { "toggle_preview", config = { use_float = false } },
|
["P"] = { "toggle_preview", config = { use_float = false } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
event_handlers = {
|
event_handlers = {
|
||||||
{
|
{
|
||||||
event = "file_open_requested",
|
event = "file_open_requested",
|
||||||
handler = function()
|
handler = function()
|
||||||
vim.cmd("Neotree close")
|
vim.cmd("Neotree close")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
vim.keymap.set("n", "<C-b>", ":Neotree filesystem reveal right<CR>", { desc = "Neotree show explorer" })
|
vim.keymap.set("n", "<C-b>", ":Neotree filesystem reveal right<CR>", { desc = "Neotree show explorer" })
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
return {
|
return {
|
||||||
"nvimtools/none-ls.nvim",
|
"nvimtools/none-ls.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
null_ls.setup({
|
null_ls.setup({
|
||||||
sources = {
|
sources = {
|
||||||
null_ls.builtins.formatting.stylua,
|
null_ls.builtins.formatting.stylua,
|
||||||
null_ls.builtins.formatting.prettier,
|
null_ls.builtins.formatting.prettier,
|
||||||
null_ls.builtins.formatting.black,
|
null_ls.builtins.formatting.black,
|
||||||
null_ls.builtins.formatting.isort,
|
null_ls.builtins.formatting.isort,
|
||||||
null_ls.builtins.formatting.clang_format,
|
null_ls.builtins.formatting.clang_format,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, { desc = "Format" })
|
vim.keymap.set("n", "<leader>gf", vim.lsp.buf.format, { desc = "Format" })
|
||||||
|
|||||||
+41
-41
@@ -1,43 +1,43 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"StevanFreeborn/lavender-dimmed.nvim",
|
"StevanFreeborn/lavender-dimmed.nvim",
|
||||||
name = "lavender-dimmed",
|
name = "lavender-dimmed",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require("lavender-dimmed").setup()
|
require("lavender-dimmed").setup()
|
||||||
vim.cmd.colorscheme("lavender-dimmed")
|
vim.cmd.colorscheme("lavender-dimmed")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"projekt0n/github-nvim-theme",
|
"projekt0n/github-nvim-theme",
|
||||||
name = "github-theme",
|
name = "github-theme",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require("github-theme").setup()
|
require("github-theme").setup()
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
name = "catppuccin",
|
name = "catppuccin",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require("catppuccin").setup()
|
require("catppuccin").setup()
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"olimorris/onedarkpro.nvim",
|
"olimorris/onedarkpro.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
require("onedarkpro").setup()
|
require("onedarkpro").setup()
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"notken12/base46-colors",
|
"notken12/base46-colors",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+90
-90
@@ -1,98 +1,98 @@
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
config = function()
|
config = function()
|
||||||
require("treesitter-context").setup()
|
require("treesitter-context").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"hiphish/rainbow-delimiters.nvim",
|
"hiphish/rainbow-delimiters.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("rainbow-delimiters.setup").setup()
|
require("rainbow-delimiters.setup").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
main = "ibl",
|
main = "ibl",
|
||||||
config = function()
|
config = function()
|
||||||
local highlight = {
|
local highlight = {
|
||||||
"RainbowRed",
|
"RainbowRed",
|
||||||
"RainbowYellow",
|
"RainbowYellow",
|
||||||
"RainbowBlue",
|
"RainbowBlue",
|
||||||
"RainbowOrange",
|
"RainbowOrange",
|
||||||
"RainbowGreen",
|
"RainbowGreen",
|
||||||
"RainbowViolet",
|
"RainbowViolet",
|
||||||
"RainbowCyan",
|
"RainbowCyan",
|
||||||
}
|
}
|
||||||
|
|
||||||
local hooks = require("ibl.hooks")
|
local hooks = require("ibl.hooks")
|
||||||
|
|
||||||
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
||||||
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
||||||
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
||||||
end)
|
end)
|
||||||
|
|
||||||
vim.g.rainbow_delimiters = { highlight = highlight }
|
vim.g.rainbow_delimiters = { highlight = highlight }
|
||||||
|
|
||||||
require("ibl").setup({
|
require("ibl").setup({
|
||||||
scope = { highlight = highlight },
|
scope = { highlight = highlight },
|
||||||
exclude = { filetypes = { "dashboard" } },
|
exclude = { filetypes = { "dashboard" } },
|
||||||
})
|
})
|
||||||
|
|
||||||
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
branch = "main",
|
branch = "main",
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
local config = require("nvim-treesitter.config")
|
local config = require("nvim-treesitter.config")
|
||||||
|
|
||||||
config.setup({
|
config.setup({
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"fsharp",
|
"fsharp",
|
||||||
"bash",
|
"bash",
|
||||||
"css",
|
"css",
|
||||||
"html",
|
"html",
|
||||||
"javascript",
|
"javascript",
|
||||||
"json",
|
"json",
|
||||||
"lua",
|
"lua",
|
||||||
"python",
|
"python",
|
||||||
"typescript",
|
"typescript",
|
||||||
"tsx",
|
"tsx",
|
||||||
"vue",
|
"vue",
|
||||||
"yaml",
|
"yaml",
|
||||||
"c_sharp",
|
"c_sharp",
|
||||||
"rust",
|
"rust",
|
||||||
"csv",
|
"csv",
|
||||||
"dockerfile",
|
"dockerfile",
|
||||||
"editorconfig",
|
"editorconfig",
|
||||||
"json",
|
"json",
|
||||||
"jsdoc",
|
"jsdoc",
|
||||||
"jsonc",
|
"jsonc",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
"nginx",
|
"nginx",
|
||||||
"proto",
|
"proto",
|
||||||
"sql",
|
"sql",
|
||||||
"toml",
|
"toml",
|
||||||
"ssh_config",
|
"ssh_config",
|
||||||
"xml",
|
"xml",
|
||||||
"go",
|
"go",
|
||||||
"c",
|
"c",
|
||||||
},
|
},
|
||||||
indent = { enabled = true },
|
indent = { enabled = true },
|
||||||
highlight = {
|
highlight = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
dependencies = { "echasnovski/mini.icons" },
|
dependencies = { "echasnovski/mini.icons" },
|
||||||
config = function()
|
config = function()
|
||||||
require("which-key").setup()
|
require("which-key").setup()
|
||||||
end
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user