代码拉取完成,页面将自动刷新
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
}
end
-- add lazypath to runtime path like java classpath
vim.opt.rtp:prepend(lazypath)
require('lazy').setup {
{
'saecki/crates.nvim',
event = { 'BufRead Cargo.toml' },
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require('crates').setup {
src = {
cmp = {
enabled = true,
},
},
null_ls = {
enabled = true,
},
popup = {
autofocus = true,
hide_on_select = true,
},
}
end,
},
{
'jose-elias-alvarez/null-ls.nvim',
config = function()
require('null-ls').setup {
null_ls = {
enabled = true,
},
}
end,
},
'simrat39/rust-tools.nvim',
'nvimdev/lspsaga.nvim',
'nvim-lualine/lualine.nvim',
{
'folke/flash.nvim',
event = 'VeryLazy',
opts = {},
keys = {
{
's',
mode = { 'n', 'x', 'o' },
function()
require('flash').jump()
end,
desc = 'Flash',
},
{
'S',
mode = { 'n', 'x', 'o' },
function()
require('flash').treesitter()
end,
desc = 'Flash Treesitter',
},
{
'r',
mode = 'o',
function()
require('flash').remote()
end,
desc = 'Remote Flash',
},
{
'R',
mode = { 'o', 'x' },
function()
require('flash').treesitter_search()
end,
desc = 'Treesitter Search',
},
{
'<c-s>',
mode = { 'c' },
function()
require('flash').toggle()
end,
desc = 'Toggle Flash Search',
},
},
},
{
'coffebar/neovim-project',
opts = {
projects = { -- define project roots
'~/workspace/*',
'~/.config/*',
},
},
init = function()
-- enable saving the state of plugins in the session
vim.opt.sessionoptions:append 'globals' -- save global variables that start with an uppercase letter and contain at least one lowercase letter.
end,
dependencies = {
{ 'nvim-lua/plenary.nvim' },
{ 'nvim-telescope/telescope.nvim', tag = '0.1.4' },
{ 'Shatur/neovim-session-manager' },
},
lazy = false,
priority = 100,
},
'hinell/duplicate.nvim',
{
'mrjones2014/legendary.nvim',
-- since legendary.nvim handles all your keymaps/commands,
-- its recommended to load legendary.nvim before other plugins
priority = 10000,
lazy = false,
-- sqlite is only needed if you want to use frecency sorting
-- dependencies = { 'kkharji/sqlite.lua' }
},
{
'folke/todo-comments.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
},
{
'numToStr/Comment.nvim',
lazy = false,
},
{
'Wansmer/treesj',
keys = { '<space>m', '<space>j', '<space>s' },
dependencies = { 'nvim-treesitter/nvim-treesitter' },
},
'gcmt/wildfire.vim',
{
'kylechui/nvim-surround',
version = '*', -- Use for stability; omit to use `main` branch for the latest features
event = 'VeryLazy',
config = function()
require('nvim-surround').setup {
-- Configuration here, or leave empty to use defaults
}
end,
},
'rmagatti/alternate-toggler',
{ 'echasnovski/mini.nvim', version = '*' },
{ 'akinsho/toggleterm.nvim', version = '*', config = true },
'axelvc/template-string.nvim',
'windwp/nvim-ts-autotag',
'nvim-treesitter/nvim-treesitter',
'neovim/nvim-lspconfig',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
'hrsh7th/cmp-cmdline',
'hrsh7th/nvim-cmp',
'L3MON4D3/LuaSnip',
'saadparwaiz1/cmp_luasnip',
'mfussenegger/nvim-lint',
{
'pmizio/typescript-tools.nvim',
dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' },
opts = {},
},
'MattesGroeger/vim-bookmarks',
'tom-anders/telescope-vim-bookmarks.nvim',
{
'sainnhe/everforest',
lazy = false,
priority = 1000,
config = function()
vim.g.everforest_diagnostic_line_highlight = 1
vim.cmd [[colorscheme everforest]]
end,
},
{
'olimorris/onedarkpro.nvim',
priority = 1000, -- Ensure it loads first
},
-- somewhere in your config:
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'neovim/nvim-lspconfig',
'WhoIsSethDaniel/mason-tool-installer.nvim',
{
'stevearc/conform.nvim',
opts = {},
},
'nvim-tree/nvim-tree.lua',
'nvim-tree/nvim-web-devicons',
{
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts = {}, -- this is equalent to setup({}) function
},
{
'nvim-telescope/telescope.nvim',
tag = '0.1.4',
dependencies = { 'nvim-lua/plenary.nvim' },
},
{
'lewis6991/gitsigns.nvim',
tag = 'release',
config = function()
require('gitsigns').setup()
end,
},
'mg979/vim-visual-multi',
'f-person/git-blame.nvim',
-- 'github/copilot.vim',
}
require 'base'
require 'color'
require 'keymap'
require 'p-tree'
require 'p-mason'
require 'p-lsp'
require 'p-conform'
require 'p-telescope'
require 'p-bookmark'
require 'p-lint'
require 'p-cmp'
require 'p-treesitter'
require 'p-term'
require 'p-indent'
require 'p-text'
require 'p-comment'
require 'p-legendary'
require 'p-lualine'
require 'p-crates'
require 'p-gitsigns'
require 'v-neovide'
require 'lsp.lua'
require 'lsp.rust'
require 'lsp.typescript'
-- require ('dap.dap').setup()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。