1 Star 0 Fork 0

花丢/nvim.x

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
init.lua 5.60 KB
一键复制 编辑 原始数据 按行查看 历史
花丢 提交于 2023-12-10 22:08 . init files
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()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
VimL
1
https://gitee.com/Flose/nvim.x.git
git@gitee.com:Flose/nvim.x.git
Flose
nvim.x
nvim.x
master

搜索帮助