Something went wrong. Try again.
My personal nvim config files
Something went wrong. Try again.
nvim-config init.lua
1.3 kB · 54 lines
Lua
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455-- NeoVim Configuration
-- Detect OSif vim.fn.exists("g:os") == 0 then local is_windows = vim.fn.has("win64") == 1 or vim.fn.has("win32") == 1 or vim.fn.has("win16") == 1 if is_windows then vim.g.os = "Windows" else if vim.fn.system("uname -a"):lower():find "microsoft" then vim.g.os = "Wsl" else vim.g.os, _ = string.gsub(vim.fn.system("uname"), "\n", "") end endend
-- Set leader key to <space>vim.g.mapleader = " "
-- Base initial configsrequire("configs")
-- Bootstrap lazy.nvimlocal 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 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) endendvim.opt.rtp:prepend(lazypath)
-- Setup lazy.nvimrequire("lazy").setup({ spec = { { import = "plugins" }, }, install = { colorscheme = { "catppuccin" }, }, ui = { border = "rounded", },})
-- Mappingsrequire("mappings")