mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 00:49:03 +02:00
refactor: config.plugins -> plugins
This commit is contained in:
parent
8625b49288
commit
09c27b5e4d
17 changed files with 43 additions and 36 deletions
46
README.md
46
README.md
|
@ -16,29 +16,29 @@ A starter template for Neovim using [lazy.nvim](https://github.com/folke/lazy.nv
|
|||
## File Structure
|
||||
|
||||
<pre>
|
||||
~/.config/nvim
|
||||
├── lua
|
||||
│ └── user
|
||||
│ ├── plugins
|
||||
│ │ ├── lsp
|
||||
│ │ │ ├── format.lua
|
||||
│ │ │ ├── init.lua
|
||||
│ │ │ ├── keymaps.lua
|
||||
│ │ │ └── servers.lua
|
||||
│ │ ├── api.lua
|
||||
│ │ ├── coding.lua
|
||||
│ │ ├── colorscheme.lua
|
||||
│ │ ├── editor.lua
|
||||
│ │ ├── treesitter.lua
|
||||
│ │ └── ui.lua
|
||||
│ ├── autocmds.lua
|
||||
│ ├── keymaps.lua
|
||||
│ ├── lazy.lua
|
||||
│ └── options.lua
|
||||
├── init.lua
|
||||
├── lazy-lock.json
|
||||
├── README.md
|
||||
└── stylua.toml
|
||||
~/.config/nvim
|
||||
├── lua
|
||||
│ ├── config
|
||||
│ │ ├── autocmds.lua
|
||||
│ │ ├── keymaps.lua
|
||||
│ │ ├── lazy.lua
|
||||
│ │ └── options.lua
|
||||
│ └── plugins
|
||||
│ ├── lsp
|
||||
│ │ ├── format.lua
|
||||
│ │ ├── init.lua
|
||||
│ │ ├── keymaps.lua
|
||||
│ │ └── servers.lua
|
||||
│ ├── api.lua
|
||||
│ ├── coding.lua
|
||||
│ ├── colorscheme.lua
|
||||
│ ├── editor.lua
|
||||
│ ├── treesitter.lua
|
||||
│ └── ui.lua
|
||||
├── init.lua
|
||||
├── lazy-lock.json
|
||||
├── README.md
|
||||
└── stylua.toml
|
||||
</pre>
|
||||
|
||||
## Plugins
|
||||
|
|
8
init.lua
8
init.lua
|
@ -1,4 +1,4 @@
|
|||
require("user.options")
|
||||
require("user.lazy")
|
||||
require("user.autocmds")
|
||||
require("user.keymaps")
|
||||
require("config.options")
|
||||
require("config.lazy")
|
||||
require("config.autocmds")
|
||||
require("config.keymaps")
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"friendly-snippets": { "branch": "main", "commit": "1a6a02350568d6830bcfa167c72f9b6e75e454ae" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "db7cbcb40cc00fc5d6074d7569fb37197705e7f6" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "fb46cb586242392081f908b23470e5096a8406c3" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "cba99de3eb73437754984fcad02b3a0e05917e56" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "32a7382a75a52e8ad05f4cec7eeb8bbfbe80d461" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "aa25b4153d2f2636c3b3a8c8360349d2b29e7ae3" },
|
||||
"mason.nvim": { "branch": "main", "commit": "1592493e3406c271e9128b4d424731e25f1ff2a1" },
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
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", lazypath })
|
||||
vim.fn.system({ "git", "-C", lazypath, "checkout", "tags/stable" }) -- last stable release
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable",
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup("user.plugins", {
|
||||
require("lazy").setup("plugins", {
|
||||
defaults = { lazy = true, version = "*" },
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true },
|
|
@ -1,8 +1,8 @@
|
|||
local servers = require("user.plugins.lsp.servers")
|
||||
local servers = require("plugins.lsp.servers")
|
||||
|
||||
local function on_attach(client, bufnr)
|
||||
require("user.plugins.lsp.format").on_attach(client, bufnr)
|
||||
require("user.plugins.lsp.keymaps").on_attach(client, bufnr)
|
||||
require("plugins.lsp.format").on_attach(client, bufnr)
|
||||
require("plugins.lsp.keymaps").on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
return {
|
|
@ -20,12 +20,12 @@ function M.on_attach(client, buffer)
|
|||
},
|
||||
f = {
|
||||
{
|
||||
require("user.plugins.lsp.format").format,
|
||||
require("plugins.lsp.format").format,
|
||||
"Format Document",
|
||||
cond = cap.documentFormatting,
|
||||
},
|
||||
{
|
||||
require("user.plugins.lsp.format").format,
|
||||
require("plugins.lsp.format").format,
|
||||
"Format Range",
|
||||
cond = cap.documentRangeFormatting,
|
||||
mode = "v",
|
|
@ -31,6 +31,7 @@ return {
|
|||
config = {
|
||||
options = {
|
||||
globalstatus = true,
|
||||
disabled_filetypes = { statusline = { "lazy", "alpha" } },
|
||||
},
|
||||
},
|
||||
},
|
Loading…
Add table
Add a link
Reference in a new issue