nvchad/init.lua
Paul Trowbridge 9b578f964b refactor config to follow nvchad conventions
- Create separate config files for telescope and nvim-tree in lua/configs/
- Fix plugin syntax (requires -> dependencies for lazy.nvim)
- Consolidate duplicate settings into appropriate files
- Move plugin configs out of options.lua and mappings.lua
- Clean up init.lua to only contain SQL autocmds

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-17 23:54:05 -05:00

53 lines
1.1 KiB
Lua

vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
vim.g.mapleader = " "
-- 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"
vim.schedule(function()
require "mappings"
end)
------added------------
-- SQL-specific settings
vim.api.nvim_create_autocmd("FileType", {
pattern = "sql",
callback = function()
vim.bo.commentstring = "-- %s"
end,
})
-- pgformatter for SQL files
vim.api.nvim_create_autocmd("FileType", {
pattern = "sql",
command = "setlocal formatprg=/usr/local/bin/pg_format\\ -",
})