added plugins

This commit is contained in:
bing-me 2024-06-04 11:04:55 +08:00
parent 23773900d9
commit 7a47dcab24
1 changed files with 23 additions and 2 deletions

View File

@ -227,6 +227,8 @@ vim.opt.rtp:prepend(lazypath)
require('lazy').setup({ require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically
'JoosepAlviste/nvim-ts-context-commentstring', -- typescript commenting
-- NOTE: Plugins can also be added by using a table, -- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following -- with the first argument being the link and the following
@ -238,7 +240,17 @@ require('lazy').setup({
-- require('Comment').setup({}) -- require('Comment').setup({})
-- "gc" to comment visual regions/lines -- "gc" to comment visual regions/lines
{ 'numToStr/Comment.nvim', opts = {} }, -- { 'numToStr/Comment.nvim', opts = {} },
{
'numToStr/Comment.nvim',
config = function()
require('Comment').setup {
pre_hook = function()
return vim.bo.commentstring
end,
}
end,
},
-- Here is a more advanced example where we pass configuration -- Here is a more advanced example where we pass configuration
-- options to `gitsigns.nvim`. This is equivalent to the following Lua: -- options to `gitsigns.nvim`. This is equivalent to the following Lua:
@ -751,12 +763,21 @@ require('lazy').setup({
-- Load the colorscheme here. -- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load -- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night' -- vim.cmd.colorscheme 'tokyonight-night'
-- You can configure highlights by doing something like: -- You can configure highlights by doing something like:
vim.cmd.hi 'Comment gui=none' vim.cmd.hi 'Comment gui=none'
end, end,
}, },
{
'olimorris/onedarkpro.nvim',
priority = 1000, -- Ensure it loads first
init = function()
-- somewhere in your config:
-- vim.cmd("colorscheme onedark")
vim.cmd.colorscheme 'onedark'
end,
},
-- Highlight todo, notes, etc in comments -- Highlight todo, notes, etc in comments
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },