Files
dots/.config/nvim/init.lua
2026-04-10 01:06:00 +02:00

55 lines
1.3 KiB
Lua

vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
vim.g.mapleader = " "
vim.opt.relativenumber = true
-- bootstrap lazy and all plugins
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
local repo = "https://github.com/folke/lazy.nvim.git"
vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath }
end
vim.opt.rtp:prepend(lazypath)
local lazy_config = require "configs.lazy"
-- load plugins
require("lazy").setup({
{
"NvChad/NvChad",
lazy = false,
branch = "v2.5",
import = "nvchad.plugins",
},
{ import = "plugins" },
}, lazy_config)
-- load theme
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
require "options"
require "nvchad.autocmds"
require "render-markdown"
require("gen").prompts["Markdown_links"] = {
prompt = "Make markdown links wherever you find link in the following text, and generate the namas accordingly:\n$text",
replace = true,
}
require("gen").prompts["Optimize code"] = {
prompt = "Check if code can be optimized for speed and readability:\n$text",
replace = true,
}
require("gen").prompts["Genetrate types "] = {
prompt = "Check if types are correct in this code, fix and optimize if something is needed:\n$text",
replace = true,
}
vim.schedule(function()
require "mappings"
end)