114 lines
4.3 KiB
Lua
114 lines
4.3 KiB
Lua
-- [[ Install `lazy.nvim` plugin manager ]]
|
|
-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info
|
|
local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
|
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
|
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath }
|
|
if vim.v.shell_error ~= 0 then
|
|
error('Error cloning lazy.nvim:\n' .. out)
|
|
end
|
|
end
|
|
|
|
---@type vim.Option
|
|
local rtp = vim.opt.rtp
|
|
rtp:prepend(lazypath)
|
|
|
|
-- [[ Configure and install plugins ]]
|
|
--
|
|
-- To check the current status of your plugins, run
|
|
-- :Lazy
|
|
--
|
|
-- You can press `?` in this menu for help. Use `:q` to close the window
|
|
--
|
|
-- To update plugins you can run
|
|
-- :Lazy update
|
|
--
|
|
-- NOTE: Here is where you install your plugins.
|
|
require('lazy').setup({
|
|
-- NOTE: Plugins can be added via a link or github org/name. To run setup automatically, use `opts = {}`
|
|
|
|
-- Alternatively, use `config = function() ... end` for full control over the configuration.
|
|
-- If you prefer to call `setup` explicitly, use:
|
|
-- {
|
|
-- 'lewis6991/gitsigns.nvim',
|
|
-- config = function()
|
|
-- require('gitsigns').setup({
|
|
-- -- Your gitsigns configuration here
|
|
-- })
|
|
-- end,
|
|
-- }
|
|
--
|
|
-- Here is a more advanced example where we pass configuration
|
|
-- options to `gitsigns.nvim`.
|
|
--
|
|
-- See `:help gitsigns` to understand what the configuration keys do
|
|
|
|
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
|
|
--
|
|
-- This is often very useful to both group configuration, as well as handle
|
|
-- lazy loading plugins that don't need to be loaded immediately at startup.
|
|
--
|
|
-- For example, in the following configuration, we use:
|
|
-- event = 'VimEnter'
|
|
--
|
|
-- which loads which-key before all the UI elements are loaded. Events can be
|
|
-- normal autocommands events (`:help autocmd-events`).
|
|
--
|
|
-- Then, because we use the `opts` key (recommended), the configuration runs
|
|
-- after the plugin has been loaded as `require(MODULE).setup(opts)`.
|
|
|
|
-- NOTE: Plugins can specify dependencies.
|
|
--
|
|
-- The dependencies are proper plugin specifications as well - anything
|
|
-- you do for a plugin at the top level, you can do for a dependency.
|
|
--
|
|
-- Use the `dependencies` key to specify the dependencies of a particular plugin
|
|
|
|
-- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the
|
|
-- init.lua. If you want these files, they are in the repository, so you can just download them and
|
|
-- place them in the correct locations.
|
|
|
|
-- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart
|
|
--
|
|
-- Here are some example plugins that I've included in the Kickstart repository.
|
|
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
|
--
|
|
-- require 'kickstart.plugins.debug',
|
|
-- require 'kickstart.plugins.indent_line',
|
|
-- require 'kickstart.plugins.lint',
|
|
-- require 'kickstart.plugins.autopairs',
|
|
-- require 'kickstart.plugins.neo-tree',
|
|
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
|
|
|
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
|
-- 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 = 'plugins' },
|
|
|
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
|
-- Or use telescope!
|
|
-- In normal mode type `<space>sh` then write `lazy.nvim-plugin`
|
|
-- you can continue same window with `<space>sr` which resumes last telescope search
|
|
}, { ---@diagnostic disable-line: missing-fields
|
|
ui = {
|
|
-- If you are using a Nerd Font: set icons to an empty table which will use the
|
|
-- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table
|
|
icons = vim.g.have_nerd_font and {} or {
|
|
cmd = '⌘',
|
|
config = '🛠',
|
|
event = '📅',
|
|
ft = '📂',
|
|
init = '⚙',
|
|
keys = '🗝',
|
|
plugin = '🔌',
|
|
runtime = '💻',
|
|
require = '🌙',
|
|
source = '📄',
|
|
start = '🚀',
|
|
task = '📌',
|
|
lazy = '💤 ',
|
|
},
|
|
},
|
|
})
|