merge laptop branch features into customize

- Add detailed SQL formatter config (pg_format, sqlfluff with args)
- Add Mason plugin for installing formatters
- Add conform keybinding (g+w) for manual formatting
- Add gitsigns blame keybinding (<leader>gb)
- Add comments to organize plugin sections
- Keep vscode_dark theme and generic home paths

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Paul Trowbridge 2026-01-18 00:00:17 -05:00
parent 9b578f964b
commit 59e9fe7923
3 changed files with 55 additions and 14 deletions

View File

@ -1,15 +1,25 @@
local options = {
formatters_by_ft = {
lua = { "stylua" },
sql = { "pg_format", "sqlfluff" }, -- pg_format first, fallback to sqlfluff
json = { "jq" },
markdown = { "mdformat" },
-- css = { "prettier" },
-- html = { "prettier" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
-- no format_on_save (manual-only)
formatters = {
pg_format = {
prepend_args = {
"--keyword-case", "2", -- 1 = UPPER, 2 = lower
"--function-case", "2", -- 2 = lower
"--spaces", "4",
},
},
sqlfluff = {
args = { "fix", "--force", "--dialect", "postgres", "-" },
},
},
}
return options

View File

@ -57,3 +57,6 @@ vim.keymap.set('x', '<leader>"', function()
local text = vim.fn.getreg('"') -- Get the visually selected text
vim.cmd('normal! c"' .. text .. '"')
end, { desc = "Wrap selected text in double quotes" })
-- Gitsigns blame current line
vim.keymap.set("n", "<leader>gb", ":Gitsigns blame_line<CR>", { noremap = true, silent = true, desc = "Git blame line" })

View File

@ -1,10 +1,25 @@
return {
-- Conform (formatter)
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
lazy = false,
cmd = { "ConformInfo", "ConformFormat" }, -- enables :ConformInfo before load
keys = {
{
"g+w",
function()
require("conform").format({ async = false, lsp_fallback = true })
end,
mode = "n",
desc = "Format file (Conform)",
},
},
config = function()
require("conform").setup(require "configs.conform")
end,
},
-- LSP
{
"neovim/nvim-lspconfig",
config = function()
@ -12,11 +27,13 @@ return {
end,
},
-- File explorer
{
"nvim-tree/nvim-tree.lua",
opts = require "configs.nvimtree",
},
-- Telescope
{
'nvim-telescope/telescope.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
@ -24,14 +41,14 @@ return {
require "configs.telescope"
end
},
-- Treesitter
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function()
require'nvim-treesitter.configs'.setup {
-- Enable Treesitter syntax highlighting
ensure_installed = { "markdown", "sql","vim",
"lua", "vimdoc", "html", "css" }, -- add other languages if needed
ensure_installed = { "markdown", "sql", "vim", "lua", "vimdoc", "html", "css" },
highlight = {
enable = true,
additional_vim_regex_highlighting = { "markdown" },
@ -39,10 +56,21 @@ return {
}
end,
},
-- Transparent
{
'xiyaowong/transparent.nvim',
lazy = false
}
'xiyaowong/transparent.nvim',
lazy = false
},
-- Mason (to install formatters like pgformatter/sqlfluff)
{
"williamboman/mason.nvim",
cmd = { "Mason", "MasonInstall", "MasonUpdate" },
config = function()
require("mason").setup()
end,
},
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {