diff options
author | HampusM <hampus@hampusmat.com> | 2024-10-29 19:53:37 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-10-29 19:58:26 +0100 |
commit | b53b07b6002a7549371d5921f926ca611d913b75 (patch) | |
tree | 57dfaaf075395e3db4313e0428678df10f5824bb /lua | |
parent | 10ef62b10e3c76e7376d835986904b21ebc131a8 (diff) |
disable array index & set type inlay hints in lua
Diffstat (limited to 'lua')
-rw-r--r-- | lua/plugins.lua | 42 |
1 files changed, 42 insertions, 0 deletions
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", |