48 lines
1.4 KiB
Lua
48 lines
1.4 KiB
Lua
-- .nvim.lua — project-local settings
|
|
-- Created with :LocalInit. Loaded automatically by nvim-config-local (first time — via :ConfigLocalTrust).
|
|
|
|
-- ── Runners ─────────────────────────────────────────────
|
|
-- :Run — picker, :Run <name> [args] — specific command,
|
|
-- <leader>dr = :Run run.
|
|
require("custom.runner").setup({
|
|
commands = {
|
|
run = function()
|
|
local command = require("custom.runner").command
|
|
command:add("odin run .")
|
|
command.target = { position = "bottom" }
|
|
command:run()
|
|
end,
|
|
debug = function()
|
|
local command = require("custom.runner").command
|
|
command:add("odin build . -debug -out:build/debug")
|
|
command:add("gdbf ./build/debug")
|
|
command:run()
|
|
command.target = { position = "bottom" }
|
|
end,
|
|
},
|
|
|
|
-- Editor options (indent, tabstop, expandtab) come from .editorconfig —
|
|
-- nvim applies them natively. `options` is only for what .editorconfig
|
|
-- cannot express:
|
|
-- options = {
|
|
-- textwidth = 100,
|
|
-- },
|
|
|
|
-- ── Excludes for snacks pickers (on top of base .git, .gitignore, etc.) ──
|
|
exclude = {
|
|
"build",
|
|
"Tiled",
|
|
"assets",
|
|
".gdbf",
|
|
".gdbinit",
|
|
}, -- e.g.: { "_build", "vendor" }
|
|
})
|
|
|
|
-- ── Project autocmd (example) ──
|
|
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
|
-- pattern = "*.odin",
|
|
-- callback = function()
|
|
-- vim.notify("File saved in project", vim.log.levels.INFO)
|
|
-- end,
|
|
-- })
|