From 7ff113de40b1bdb0cc05a22c209507ff061411d3 Mon Sep 17 00:00:00 2001 From: Code Lich Date: Tue, 11 Mar 2025 19:53:06 +0700 Subject: [PATCH] updated some plugins --- init.lua | 4 ++-- lua/custom/plugins/competitest.lua | 9 +++++++++ lua/custom/plugins/neo-tree.lua | 32 ++++++++++++++++++++++++++++++ lua/custom/plugins/theme.lua | 12 +++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/competitest.lua create mode 100644 lua/custom/plugins/neo-tree.lua create mode 100644 lua/custom/plugins/theme.lua diff --git a/init.lua b/init.lua index 5cac3d14..00b45e39 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -992,7 +992,7 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/plugins/competitest.lua b/lua/custom/plugins/competitest.lua new file mode 100644 index 00000000..a8fa39df --- /dev/null +++ b/lua/custom/plugins/competitest.lua @@ -0,0 +1,9 @@ +return { + { + 'xeluxee/competitest.nvim', + dependencies = 'MunifTanjim/nui.nvim', + config = function() + require('competitest').setup() + end, + }, +} diff --git a/lua/custom/plugins/neo-tree.lua b/lua/custom/plugins/neo-tree.lua new file mode 100644 index 00000000..d43e76e4 --- /dev/null +++ b/lua/custom/plugins/neo-tree.lua @@ -0,0 +1,32 @@ +return { + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v3.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', + 'MunifTanjim/nui.nvim', + }, + config = function() + require('neo-tree').setup { + filesystem = { + filtered_items = { + visible = true, + hide_dotfiles = false, + hide_gitignored = false, + }, + follow_current_file = true, -- Highlight current file + use_libuv_file_watcher = true, -- Auto-update tree when files change + }, + window = { + mappings = { + ['l'] = 'open', -- Set 'l' to open files + ['h'] = 'close_node', -- Collapse folders with 'h' + [''] = 'open', + }, + }, + } + + -- Set keymap to open Neo-tree with + e + vim.keymap.set('n', 'e', ':Neotree toggle', { noremap = true, silent = true }) + end, +} diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua new file mode 100644 index 00000000..1a1d832c --- /dev/null +++ b/lua/custom/plugins/theme.lua @@ -0,0 +1,12 @@ +return { + 'folke/tokyonight.nvim', + priority = 1000, + config = function() + require('tokyonight').setup { + style = 'moon', -- Options: night, storm, moon, day + transparent = false, -- Enable transparent background + terminal_colors = true, + } + vim.cmd [[colorscheme tokyonight]] + end, +}