269 lines
7.3 KiB
Lua
269 lines
7.3 KiB
Lua
return {
|
|
{
|
|
"LazyVim/LazyVim",
|
|
opts = {
|
|
colorscheme = "tokyonight-night",
|
|
-- colorscheme = "catppuccin-mocha",
|
|
},
|
|
},
|
|
{
|
|
"nvim-telescope/telescope.nvim",
|
|
cmd = "Telescope",
|
|
keys = function()
|
|
return {}
|
|
end,
|
|
config = function(opts)
|
|
require("telescope").setup(opts)
|
|
end,
|
|
},
|
|
{
|
|
"ThePrimeagen/harpoon",
|
|
lazy = true,
|
|
config = function()
|
|
require("telescope").load_extension("harpoon")
|
|
end,
|
|
},
|
|
{
|
|
"iamcco/markdown-preview.nvim",
|
|
lazy = true,
|
|
event = "FileType markdown",
|
|
build = "cd app && yarn install",
|
|
},
|
|
{
|
|
"nvim-telescope/telescope-project.nvim",
|
|
lazy = true,
|
|
},
|
|
{
|
|
"nvim-telescope/telescope-file-browser.nvim",
|
|
lazy = true,
|
|
config = function()
|
|
require("telescope").load_extension("file_browser")
|
|
end,
|
|
},
|
|
{
|
|
"jvgrootveld/telescope-zoxide",
|
|
lazy = true,
|
|
config = function()
|
|
local z_utils = require("telescope._extensions.zoxide.utils")
|
|
local t = require("telescope")
|
|
-- Configure the extension
|
|
t.setup({
|
|
extensions = {
|
|
zoxide = {
|
|
prompt_title = "[ Queries ]",
|
|
mappings = {
|
|
default = {
|
|
after_action = function(selection)
|
|
print("Update to (" .. selection.z_score .. ") " .. selection.path)
|
|
end,
|
|
},
|
|
["<C-s>"] = {
|
|
before_action = function(selection)
|
|
print("before C-s")
|
|
end,
|
|
action = function(selection)
|
|
vim.cmd("edit " .. selection.path)
|
|
end,
|
|
},
|
|
["<C-q>"] = { action = z_utils.create_basic_command("split") },
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
-- Load the extension
|
|
t.load_extension("zoxide")
|
|
end,
|
|
},
|
|
{
|
|
"lervag/vimtex",
|
|
config = function()
|
|
vim.cmd("let g:vimtex_quickfix_mode=0")
|
|
vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
|
|
vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
|
|
vim.cmd(
|
|
"let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}"
|
|
)
|
|
end,
|
|
},
|
|
{
|
|
"rcarriga/nvim-notify",
|
|
opts = {
|
|
top_down = false,
|
|
},
|
|
},
|
|
{
|
|
"jbyuki/instant.nvim",
|
|
config = function()
|
|
vim.cmd("let g:instant_username = 'dashie'")
|
|
end,
|
|
},
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
opts = {
|
|
textobjects = {
|
|
select = {
|
|
enable = true,
|
|
lookahead = true,
|
|
keymaps = {
|
|
-- You can use the capture groups defined in textobjects.scm
|
|
["af"] = "@function.outer",
|
|
["if"] = "@function.inner",
|
|
["ac"] = "@class.outer",
|
|
["ic"] = "@class.inner",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"karb94/neoscroll.nvim",
|
|
config = function()
|
|
require("neoscroll").setup()
|
|
end,
|
|
},
|
|
{
|
|
"kaarmu/typst.vim",
|
|
lazy = true,
|
|
event = "FileType typst",
|
|
},
|
|
{
|
|
"folke/which-key.nvim",
|
|
event = "VeryLazy",
|
|
opts = {
|
|
plugins = { spelling = true },
|
|
defaults = {
|
|
mode = { "n", "v" },
|
|
["g"] = { name = "+goto" },
|
|
["gz"] = { name = "+surround" },
|
|
["]"] = { name = "+next" },
|
|
["["] = { name = "+prev" },
|
|
["<leader><tab>"] = { name = "+tabs" },
|
|
["<leader>b"] = { name = "+buffer" },
|
|
["<leader>c"] = { name = "+code" },
|
|
["<leader>f"] = { name = "+file/find" },
|
|
["<leader>g"] = { name = "+git" },
|
|
["<leader>gh"] = { name = "+hunks" },
|
|
["<leader>q"] = { name = "+quit/session" },
|
|
["<leader>s"] = { name = "+search" },
|
|
["<leader>u"] = { name = "+ui" },
|
|
["<leader>w"] = { name = "+windows" },
|
|
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
|
["<leader>h"] = { name = "+harpoon" },
|
|
["<leader>d"] = { name = "+DAP" },
|
|
},
|
|
},
|
|
config = function(_, opts)
|
|
local wk = require("which-key")
|
|
wk.setup(opts)
|
|
wk.register(opts.defaults)
|
|
end,
|
|
},
|
|
{
|
|
"f-person/git-blame.nvim",
|
|
lazy = true,
|
|
},
|
|
{
|
|
"mg979/vim-visual-multi",
|
|
},
|
|
{
|
|
"rouge8/neotest-rust",
|
|
},
|
|
{
|
|
"Issafalcon/neotest-dotnet",
|
|
},
|
|
{
|
|
"andy-bell101/neotest-java",
|
|
},
|
|
{
|
|
"nvim-neotest/neotest-go",
|
|
},
|
|
{
|
|
"nvim-neotest/neotest-python",
|
|
},
|
|
{
|
|
"nvim-neotest/neotest",
|
|
dependencies = {
|
|
"rouge8/neotest-rust",
|
|
"Issafalcon/neotest-dotnet",
|
|
"andy-bell101/neotest-java",
|
|
"nvim-neotest/neotest-go",
|
|
"nvim-neotest/neotest-python",
|
|
},
|
|
opts = {
|
|
adapters = {
|
|
["neotest-rust"] = {},
|
|
["neotest-dotnet"] = {},
|
|
["neotest-java"] = {},
|
|
["neotest-go"] = {},
|
|
["neotest-python"] = {},
|
|
},
|
|
status = { virtual_text = true },
|
|
output = { open_on_run = true },
|
|
quickfix = {
|
|
open = function()
|
|
if require("lazyvim.util").has("trouble.nvim") then
|
|
vim.cmd("Trouble quickfix")
|
|
else
|
|
vim.cmd("copen")
|
|
end
|
|
end,
|
|
},
|
|
},
|
|
config = function(_, opts)
|
|
local neotest_ns = vim.api.nvim_create_namespace("neotest")
|
|
vim.diagnostic.config({
|
|
virtual_text = {
|
|
format = function(diagnostic)
|
|
-- Replace newline and tab characters with space for more compact diagnostics
|
|
local message = diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
|
|
return message
|
|
end,
|
|
},
|
|
}, neotest_ns)
|
|
|
|
if opts.adapters then
|
|
local adapters = {}
|
|
for name, config in pairs(opts.adapters or {}) do
|
|
if type(name) == "number" then
|
|
if type(config) == "string" then
|
|
config = require(config)
|
|
end
|
|
adapters[#adapters + 1] = config
|
|
elseif config ~= false then
|
|
local adapter = require(name)
|
|
if type(config) == "table" and not vim.tbl_isempty(config) then
|
|
local meta = getmetatable(adapter)
|
|
if adapter.setup then
|
|
adapter.setup(config)
|
|
elseif meta and meta.__call then
|
|
adapter(config)
|
|
else
|
|
error("Adapter " .. name .. " does not support setup")
|
|
end
|
|
end
|
|
adapters[#adapters + 1] = adapter
|
|
end
|
|
end
|
|
opts.adapters = adapters
|
|
end
|
|
|
|
require("neotest").setup(opts)
|
|
end,
|
|
-- stylua: ignore
|
|
keys = {
|
|
{ "<leader>tT", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File" },
|
|
{ "<leader>tt", function() require("neotest").run.run(vim.loop.cwd()) end, desc = "Run All Test Files" },
|
|
{ "<leader>tr", function() require("neotest").run.run() end, desc = "Run Nearest" },
|
|
{ "<leader>ts", function() require("neotest").summary.toggle() end, desc = "Toggle Summary" },
|
|
{ "<leader>to", function() require("neotest").output.open({ enter = true, auto_close = true }) end, desc = "Show Output" },
|
|
{ "<leader>tO", function() require("neotest").output_panel.toggle() end, desc = "Toggle Output Panel" },
|
|
{ "<leader>tS", function() require("neotest").run.stop() end, desc = "Stop" },
|
|
},
|
|
},
|
|
{
|
|
"barreiroleo/ltex_extra.nvim",
|
|
ft = { "markdown", "tex", "typst", "typ" },
|
|
lazy = true,
|
|
},
|
|
}
|