From b53b07b6002a7549371d5921f926ca611d913b75 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 29 Oct 2024 19:53:37 +0100 Subject: disable array index & set type inlay hints in lua --- lua/plugins.lua | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'lua') diff --git a/lua/plugins.lua b/lua/plugins.lua index e6c54db..456c9c4 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,3 +1,45 @@ + +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 }) + + 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.fn.getchar() + os.exit(1) + end + end + 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 = "\\" + +-- 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", -- cgit v1.2.3-18-g5258