summaryrefslogtreecommitdiff
path: root/lua/plugins.lua
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-10-29 21:41:47 +0100
committerHampusM <hampus@hampusmat.com>2024-10-29 21:41:47 +0100
commit70249465111cb531759e35753d5d594b0b2038fe (patch)
treed66dc13cf0db97f9479a8abc28a0cd3ff93b9ca9 /lua/plugins.lua
parentb53b07b6002a7549371d5921f926ca611d913b75 (diff)
use lazy.nvim instead of packer
Diffstat (limited to 'lua/plugins.lua')
-rw-r--r--lua/plugins.lua311
1 files changed, 145 insertions, 166 deletions
diff --git a/lua/plugins.lua b/lua/plugins.lua
index 456c9c4..e2fec76 100644
--- a/lua/plugins.lua
+++ b/lua/plugins.lua
@@ -1,185 +1,164 @@
-
-function bootstrap_plugin_manager()
- local lazy_nvim_repo_url = "https://github.com/folke/lazy.nvim.git"
-
- local lazy_nvim_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-
- if not (vim.uv or vim.loop).fs_stat(lazy_nvim_path) then
- local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazy_nvim_repo_url, lazy_nvim_path })
+LAZY_NVIM_REPO_URL = "https://github.com/folke/lazy.nvim.git"
+LAZY_NVIM_PATH = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+LAZY_NVIM_REF = "v11.14.1"
+
+local function bootstrap_plugin_manager()
+ if not (vim.uv or vim.loop).fs_stat(LAZY_NVIM_PATH) then
+ local out = vim.fn.system({
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "--branch=" .. LAZY_NVIM_REF,
+ LAZY_NVIM_REPO_URL,
+ LAZY_NVIM_PATH
+ })
if vim.v.shell_error ~= 0 then
- vim.api.nvim_echo({
- { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
- { out, "WarningMsg" },
- { "\nPress any key to exit..." },
- }, true, {}
+ vim.api.nvim_echo(
+ {
+ { "Failed to clone lazy.nvim:\n", "ErrorMsg" },
+ { out, "WarningMsg" },
+ { "\nPress any key to exit..." },
+ },
+ true, {}
)
vim.fn.getchar()
os.exit(1)
end
end
- vim.opt.rtp:prepend(lazy_nvim_path)
+
+ vim.opt.rtp:prepend(LAZY_NVIM_PATH)
end
--- Make sure to setup `mapleader` and `maplocalleader` before
--- loading lazy.nvim so that mappings are correct.
--- This is also a good place to setup other settings (vim.opt)
-vim.g.mapleader = " "
-vim.g.maplocalleader = "\\"
+bootstrap_plugin_manager()
-- Setup lazy.nvim
require("lazy").setup({
- spec = {
- -- add your plugins here
- },
- -- Configure any other settings here. See the documentation for more details.
- -- colorscheme that will be used when installing plugins.
- install = { colorscheme = { "habamax" } },
- -- automatically check for plugin updates
- checker = { enabled = true },
-})
-
-return require("packer").startup(function(use)
- use {
- "wbthomason/packer.nvim",
- commit = "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3"
- }
-
- use {
- "tpope/vim-fugitive",
- commit = "4f59455d2388e113bd510e85b310d15b9228ca0d"
- }
-
- -- Style
- use {
- "Shatur/neovim-ayu",
- commit = "d7a2b754c9f9be3c30e14a53d6cfda3e111edd24"
- }
-
- use {
- "nvim-tree/nvim-web-devicons",
- commit = "b77921fdc44833c994fdb389d658ccbce5490c16"
- }
-
- use {
- "nvim-lualine/lualine.nvim",
- commit = "0a5a66803c7407767b799067986b4dc3036e1983",
- }
-
- use {
- "akinsho/bufferline.nvim",
- tag = "v4.6.1",
- }
-
- use {
- "lukas-reineke/indent-blankline.nvim",
- tag = "v3.5.3",
- config = function()
- require("ibl").setup {
+ spec = {
+ -- Style
+ {
+ "Shatur/neovim-ayu",
+ commit = "d7a2b754c9f9be3c30e14a53d6cfda3e111edd24"
+ },
+ {
+ "nvim-lualine/lualine.nvim",
+ commit = "0a5a66803c7407767b799067986b4dc3036e1983",
+ dependencies = { "nvim-tree/nvim-web-devicons" }
+ },
+ {
+ "akinsho/bufferline.nvim",
+ tag = "v4.6.1",
+ dependencies = { "nvim-tree/nvim-web-devicons" }
+ },
+ {
+ "lukas-reineke/indent-blankline.nvim",
+ main = "ibl",
+ tag = "v3.5.3",
+ opts = {
indent = { char = '¦' }
}
- end
- }
- -- Style end
-
- -- Coc
- use {
- "neoclide/coc.nvim",
- commit = "5fdf3d6bdbefbd04bed82a4e605d5952024dd25b",
- run = "npm install"
- }
- -- Coc end
-
- -- Syntax & formatting
- use {
- "tikhomirov/vim-glsl",
- commit = "bfd330a271933c3372fcfa8ce052970746c8e9dd"
- }
-
- use {
- "rhysd/vim-clang-format",
- commit = "6b791825ff478061ad1c57b21bb1ed5a5fd0eb29"
- }
-
- use {
- "nvim-treesitter/nvim-treesitter",
- tag = "v0.9.2";
- run = ":TSUpdate"
- }
-
- -- Syntax & formatting end
-
- -- Navigation
- use {
- "christoomey/vim-tmux-navigator",
- commit = "5b3c701686fb4e6629c100ed32e827edf8dad01e"
- }
- -- Navigation end
-
- -- Telescope
- use {
- "nvim-telescope/telescope.nvim", tag = "0.1.8",
- requires = {
- {
- "nvim-lua/plenary.nvim",
- commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
+ },
+ -- Style end
+ -- Telescope
+ {
+ "nvim-telescope/telescope.nvim", tag = "0.1.8",
+ dependencies = {
+ {
+ "nvim-lua/plenary.nvim",
+ commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
+ }
}
- }
- }
-
- use {
- "nvim-telescope/telescope-fzf-native.nvim",
- commit = "9ef21b2e6bb6ebeaf349a0781745549bbb870d27",
- run = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && \
- cmake --build build --config Release && \
- cmake --install build --prefix build"
- }
-
- use {
- "nvim-telescope/telescope-file-browser.nvim",
- commit = "1280db1f835bd6b73a485d6f1149e02df67533c4",
- requires = {
- {
- "nvim-lua/plenary.nvim",
- commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
- }
- }
- }
-
- use {
- "Snikimonkd/telescope-git-conflicts.nvim",
- commit = "1ac7040f601d16ab3800bdda6f5912a0e385cb29",
- requires = {
- {
- "nvim-lua/plenary.nvim",
- commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
+ },
+ {
+ "nvim-telescope/telescope-fzf-native.nvim",
+ commit = "9ef21b2e6bb6ebeaf349a0781745549bbb870d27",
+ build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && \
+ cmake --build build --config Release && \
+ cmake --install build --prefix build"
+ },
+ {
+ "nvim-telescope/telescope-file-browser.nvim",
+ commit = "1280db1f835bd6b73a485d6f1149e02df67533c4",
+ dependencies = {
+ {
+ "nvim-lua/plenary.nvim",
+ commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
+ }
+ },
+ config = function()
+ local extensions_mod = require("telescope._extensions")
+
+ extensions_mod._config.file_browser = {
+ grouped = true,
+ respect_gitignore = false
+ }
+
+ require("telescope").load_extension("file_browser")
+ end
+ },
+ {
+ "Snikimonkd/telescope-git-conflicts.nvim",
+ commit = "1ac7040f601d16ab3800bdda6f5912a0e385cb29",
+ dependencies = {
+ {
+ "nvim-lua/plenary.nvim",
+ commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
+ }
}
- }
- }
-
- use {
- "fannheyward/telescope-coc.nvim",
- commit = "0819a790dc95336ce2a954513434a76bb76c41c7",
- requires = {
- {
- "nvim-lua/plenary.nvim",
- commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
+ },
+ {
+ "fannheyward/telescope-coc.nvim",
+ commit = "0819a790dc95336ce2a954513434a76bb76c41c7",
+ dependencies = {
+ {
+ "nvim-lua/plenary.nvim",
+ commit = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683"
+ }
}
- }
- }
- -- Telescope end
-
- -- Markdown
- use {
- "preservim/vim-markdown",
- commit = "a657e697376909c41475a686eeef7fc7a4972d94"
- }
+ },
+ -- Telescope end
+ -- Syntax & formatting
+ {
+ "tikhomirov/vim-glsl",
+ commit = "bfd330a271933c3372fcfa8ce052970746c8e9dd"
+ },
+ {
+ "rhysd/vim-clang-format",
+ commit = "6b791825ff478061ad1c57b21bb1ed5a5fd0eb29"
+ },
+ {
+ "nvim-treesitter/nvim-treesitter",
+ tag = "v0.9.2";
+ build = ":TSUpdate"
+ },
+ -- Syntax & formatting end
+ -- Markdown
+ {
+ "preservim/vim-markdown",
+ commit = "a657e697376909c41475a686eeef7fc7a4972d94"
+ },
+ {
+ "iamcco/markdown-preview.nvim",
+ commit = "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee",
+ build = "cd app && npm install"
+ },
+ -- Markdown end
+ {
+ "tpope/vim-fugitive",
+ commit = "4f59455d2388e113bd510e85b310d15b9228ca0d"
+ },
+ {
+ "neoclide/coc.nvim",
+ commit = "5fdf3d6bdbefbd04bed82a4e605d5952024dd25b",
+ build = "npm install"
+ },
+ {
+ "christoomey/vim-tmux-navigator",
+ commit = "5b3c701686fb4e6629c100ed32e827edf8dad01e"
+ },
+ },
+ install = { colorscheme = { "ayu" } },
+ checker = { enabled = true },
+})
- use {
- "iamcco/markdown-preview.nvim",
- commit = "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee",
- run = "cd app && yarn install"
- }
- -- Markdown end
-end)