This commit is contained in:
Zelong Kuang
2025-10-17 20:03:30 +11:00
parent 68da8f5a24
commit 8c11269da8
20 changed files with 131 additions and 211 deletions

View File

@@ -1,28 +1,28 @@
return {
{
"xeluxee/competitest.nvim",
dependencies = "MunifTanjim/nui.nvim",
lazy = false,
keys = {
{ "<localleader>rt", "<cmd>CompetiTest receive testcases<CR>", "Receive testcases" },
{ "<localleader>rp", "<cmd>CompetiTest receive problem<CR>", "Receive problem" },
{ "<localleader>rc", "<cmd>CompetiTest receive contest<CR>", "Receive contest" },
{ "<localleader>c", "<cmd>CompetiTest run<CR>", "Run code" },
},
config = function()
require("competitest").setup({
received_problems_path = "$(HOME)/compcode/$(JUDGE)/$(CONTEST)/$(PROBLEM).$(FEXT)c",
received_contests_directory = "$(HOME)/compcode/$(JUDGE)/$(CONTEST)",
template_file = {
cpp = "~/compcode/templates/template.cpp",
},
compile_command = {
cpp = { exec = "clang++", args = { "$(FNAME)", "-o", "$(FNOEXT)", "-lm" } },
},
run_command = {
cpp = { exec = "./$(FNOEXT)" },
},
})
end,
},
-- {
-- "xeluxee/competitest.nvim",
-- dependencies = "MunifTanjim/nui.nvim",
-- lazy = false,
-- keys = {
-- { "<localleader>rt", "<cmd>CompetiTest receive testcases<CR>", "Receive testcases" },
-- { "<localleader>rp", "<cmd>CompetiTest receive problem<CR>", "Receive problem" },
-- { "<localleader>rc", "<cmd>CompetiTest receive contest<CR>", "Receive contest" },
-- { "<localleader>c", "<cmd>CompetiTest run<CR>", "Run code" },
-- },
-- config = function()
-- require("competitest").setup({
-- received_problems_path = "$(HOME)/compcode/$(JUDGE)/$(CONTEST)/$(PROBLEM).$(FEXT)c",
-- received_contests_directory = "$(HOME)/compcode/$(JUDGE)/$(CONTEST)",
-- template_file = {
-- cpp = "~/compcode/templates/template.cpp",
-- },
-- compile_command = {
-- cpp = { exec = "clang++", args = { "$(FNAME)", "-o", "$(FNOEXT)", "-lm" } },
-- },
-- run_command = {
-- cpp = { exec = "./$(FNOEXT)" },
-- },
-- })
-- end,
-- },
}

View File

@@ -7,8 +7,16 @@ return {
-- compat = { "avante_commands", "avante_mentions", "avante_files" },
-- },
keymap = {
["<C-j>"] = { "select_next", "fallback" },
["<C-k>"] = { "select_prev", "fallback" },
preset = "default",
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<C-e>"] = { "hide", "fallback" },
["<Up>"] = { "select_prev", "fallback" },
["<Down>"] = { "select_next", "fallback" },
["<C-p>"] = { "select_prev", "fallback" },
["<C-n>"] = { "select_next", "fallback" },
["<C-b>"] = { "scroll_documentation_up", "fallback" },
["<C-f>"] = { "scroll_documentation_down", "fallback" },
["<Enter>"] = { "accept", "fallback" },
},
completion = {
menu = { border = "single" },

View File

@@ -6,7 +6,6 @@ return {
["jsonc"] = { "jq" },
["tex"] = { "latexindent" },
["toml"] = { "taplo "},
["typst"] = { 'typstyle' },
["markdown"] = { 'prettierd', "cbfmt" },
["sh"] = { 'shfmt' },
}

View File

@@ -1,13 +1,30 @@
return {
{
"zbirenbaum/copilot.lua",
"CopilotC-Nvim/CopilotChat.nvim",
opts = {
suggestion = {
keymap = {
accept = "<D-l>",
next = "<D-]>",
prev = "<D-[>",
},
model = "gemini-2.5-pro",
},
},
{
"zbirenbaum/copilot.lua",
keys = {
{
-- Open in the current working directory
"<leader>ad",
"<cmd>Copilot detach<cr>",
desc = "Copilot detach",
},
{
-- Open in the current working directory
"<leader>at",
"<cmd>Copilot toggle<cr>",
desc = "Copilot toggle",
},
},
opts = {
copilot_model = "gemini-2.5-pro",
keymap = {
accept = "<C-l>",
},
},
},

View File

@@ -4,6 +4,8 @@ return {
optional = true,
opts = {
servers = {
dockerls = {},
docker_compose_language_service = {},
texlab = {
keys = {
{ "<Leader>K", "<plug>(vimtex-doc-package)", desc = "Vimtex Docs", silent = true },
@@ -19,7 +21,13 @@ return {
},
},
tinymist = {},
tinymist = {
settings = {
formatterMode = "typstyle",
exportPdf = "onType",
semanticTokens = "enable",
},
},
},
},
},

View File

@@ -1,6 +1,8 @@
return {
{
"L3MON4D3/LuaSnip",
build = "make install_jsregexp",
dependencies = { "neotab.nvim" },
config = function()
require("luasnip").config.set_config({
enable_autosnippets = true,

View File

@@ -1,22 +0,0 @@
return {
{
"nvim-neo-tree/neo-tree.nvim",
lazy = true,
opts = {
filesystem = {
window = {
mappings = {
["o"] = "system_open",
},
},
commands = {
system_open = function(state)
local node = state.tree:get_node()
local path = node:get_id()
vim.api.nvim_command("silent !open -g " .. path)
end,
},
},
},
},
}

View File

@@ -33,7 +33,7 @@ return {
{ icon = "", key = "s", desc = "Restore Session", section = "session" },
{ icon = "", key = "x", desc = "Lazy Extras", action = ":LazyExtras" },
{ icon = "󰒲 ", key = "l", desc = "Lazy", action = ":Lazy" },
{ icon = "", key = "q", desc = "Quit", action = ":qa" },
{ icon = "", key = "q", desc = "Quit", action = ":qa" },
},
header = [[
███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗
@@ -50,6 +50,7 @@ return {
{ section = "projects", padding = 1, gap = 1 },
{ title = "Options", padding = 1 },
{ section = "keys", gap = 1 },
{ section = "startup" },
},
},
picker = {
@@ -66,6 +67,8 @@ return {
{ "<c-/>", function() Snacks.terminal(nil, { cwd = vim.fn.expand("%:p:h") }) end, desc = "Toggle Terminal" },
{ "]]", function() Snacks.words.jump(vim.v.count1) end, desc = "Next Reference", mode = { "n", "t" } },
{ "[[", function() Snacks.words.jump(-vim.v.count1) end, desc = "Prev Reference", mode = { "n", "t" } },
{ "<leader>E", function() Snacks.explorer({ cwd = LazyVim.root() }) end, desc = "Explorer Snacks (root dir)", },
{ "<leader>e", function() Snacks.explorer() end, desc = "Explorer Snacks (cwd)", },
},
},
}

View File

@@ -1,89 +0,0 @@
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
enabled = false,
version = false, -- Never set this value to "*"! Never!
opts = {
-- add any opts here
-- for example
-- provider = "copilot",
-- copilot = { model = "claude-3.5-sonnet" },
-- hints = { enabled = false },
-- file_selector = {
-- provider = "snack",
-- provider_opts = {},
-- },
-- openai = {
-- endpoint = "https://api.openai.com/v1",
-- model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
-- timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
-- temperature = 0,
-- max_tokens = 8192, -- Increase this to include reasoning tokens (for reasoning models)
-- --reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
-- },
},
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
-- "echasnovski/mini.pick", -- for file_selector provider mini.pick
-- "nvim-telescope/telescope.nvim", -- for file_selector provider telescope
-- "hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
-- "ibhagwan/fzf-lua", -- for file_selector provider fzf
-- "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
"zbirenbaum/copilot.lua", -- for providers='copilot'
{
-- support for image pasting
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- recommended settings
default = {
embed_image_as_base64 = false,
prompt_for_file_name = false,
drag_and_drop = {
insert_mode = true,
},
-- required for Windows users
use_absolute_path = true,
},
},
},
{
-- Make sure to set this up properly if you have lazy=true
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
{
"saghen/blink.compat",
lazy = true,
opts = {},
config = function()
-- monkeypatch cmp.ConfirmBehavior for Avante
require("cmp").ConfirmBehavior = {
Insert = "insert",
Replace = "replace",
}
end,
},
{
"saghen/blink.cmp",
lazy = true,
opts = {
sources = {
compat = { "avante_commands", "avante_mentions", "avante_files" },
},
},
},
},
},
}

View File

@@ -1,16 +1,16 @@
return {
{
"kmontocam/nvim-conda",
ft = "python",
dependencies = { "nvim-lua/plenary.nvim" },
keys = {
{ "<leader>cv", "<cmd>CondaActivate<cr>", desc = "Conda environment" },
},
},
{
"nvim-neotest/neotest",
ft = "python",
dependencies = { "nvim-neotest/neotest-python" },
opts = { adapters = { "neotest-python" } },
},
-- {
-- "kmontocam/nvim-conda",
-- ft = "python",
-- dependencies = { "nvim-lua/plenary.nvim" },
-- keys = {
-- { "<leader>cv", "<cmd>CondaActivate<cr>", desc = "Conda environment" },
-- },
-- },
-- {
-- "nvim-neotest/neotest",
-- ft = "python",
-- dependencies = { "nvim-neotest/neotest-python" },
-- opts = { adapters = { "neotest-python" } },
-- },
}

View File

@@ -1,6 +1,7 @@
return {
{
"chomosuke/typst-preview.nvim",
lazy = true,
ft = "typst",
version = "1.*",
opts = {

View File

@@ -4,7 +4,16 @@ return {
event = "InsertEnter",
opts = {
-- configuration goes here
tabkey = "",
pairs = { ---@type ntab.pair[]
{ open = "(", close = ")" },
{ open = "[", close = "]" },
{ open = "{", close = "}" },
{ open = "'", close = "'" },
{ open = '"', close = '"' },
{ open = "`", close = "`" },
{ open = "<", close = ">" },
{ open = "$", closed = "$" },
}
},
},
}