Skip to content

Instantly share code, notes, and snippets.

@default-anton
Last active December 12, 2024 17:54
Show Gist options
  • Save default-anton/8c5fa8937ba475b5185df132f09f7a96 to your computer and use it in GitHub Desktop.
Save default-anton/8c5fa8937ba475b5185df132f09f7a96 to your computer and use it in GitHub Desktop.
.llmsidekick.lua for Rails + TailwindCSS + Inertia.js
local lsk = require("llm-sidekick")
local function wrap_in_markdown(content, language)
return string.format("```%s\n%s\n```", language or "markdown", content)
end
local guideline_sections = {
general_info = {
title = "General information about the project:",
content = lsk.read_file("APP.md"),
language = "markdown"
},
design_doc = {
title = "Design documentation from ./DESIGN.md:",
content = lsk.read_file("DESIGN.md"),
language = "markdown"
},
tailwind_config = {
title = "Tailwind CSS configuration file ./tailwind.config.js:",
content = lsk.read_file("tailwind.config.js"),
language = "javascript"
}
}
-- Technologies section remains unchanged
local technologies = [[
Frontend:
- Tailwind CSS
- @tailwindcss/container-queries
- @tailwindcss/forms
- @tailwindcss/typography
- PostCSS
- autoprefixer
- React (18.3)
- Vite (vite_rails)
- Inertia.js Rails
- inertia_rails-contrib
- Heroicons (React)
Backend:
- Ruby on Rails (8.0)
- sqlite3
]]
local function build_guidelines()
local parts = {}
for _, section in pairs(guideline_sections) do
if not section.disabled then
table.insert(parts, section.title)
table.insert(parts, wrap_in_markdown(section.content, section.language))
table.insert(parts, "")
end
end
return table.concat(parts, "\n")
end
-- To disable a section, simply set its disabled flag:
--guideline_sections.general_info.disabled = true
--guideline_sections.design_doc.disabled = true
--guideline_sections.tailwind_config.disabled = true
return {
guidelines = build_guidelines(),
technologies = technologies,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment