diff --git a/.gitignore b/.gitignore index e9669d9..24be7ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ src.bin +.gdbf/ +.gdbinit +build/ diff --git a/.nvim.lua b/.nvim.lua index 4b91e19..b6f061a 100644 --- a/.nvim.lua +++ b/.nvim.lua @@ -1,30 +1,47 @@ +-- .nvim.lua — project-local settings +-- Created with :LocalInit. Loaded automatically by nvim-config-local (first time — via :ConfigLocalTrust). + +-- ── Runners ───────────────────────────────────────────── +-- :Run — picker, :Run [args] — specific command, +-- dr = :Run run. require("custom.runner").setup({ commands = { - run = { cmd = "odin run ." }, -- активная команда - -- test = { cmd = "go test ./..." }, - -- build = { cmd = "odin build ./src/" }, - -- lint = { cmd = "go vet ./..." }, - build = { cmd = "odin build . -debug" }, + 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, }, - focus = false, -- фокус на нижний терминал при запуске - -- ── Опции редактора для проекта (применяются к буферам) ── + -- Editor options (indent, tabstop, expandtab) come from .editorconfig — + -- nvim applies them natively. `options` is only for what .editorconfig + -- cannot express: -- options = { - -- tabstop = 4, - -- shiftwidth = 4, - -- expandtab = false, + -- textwidth = 100, -- }, - -- ── Исключения для snacks-файндеров (поверх базовых .git, .gitignore и т.п.) ── + -- ── Excludes for snacks pickers (on top of base .git, .gitignore, etc.) ── exclude = { + "build", + "Tiled", "assets", - }, -- например: { "_build", "vendor" } + ".gdbf", + ".gdbinit", + }, -- e.g.: { "_build", "vendor" } }) --- ── Проектная автокоманда (пример) ── +-- ── Project autocmd (example) ── -- vim.api.nvim_create_autocmd("BufWritePre", { -- pattern = "*.odin", -- callback = function() --- vim.notify("Файл сохраняется в проекте", vim.log.levels.INFO) +-- vim.notify("File saved in project", vim.log.levels.INFO) -- end, -- }) diff --git a/Tiled/hello.tiled-project b/Tiled/hello.tiled-project new file mode 100644 index 0000000..d0eb592 --- /dev/null +++ b/Tiled/hello.tiled-project @@ -0,0 +1,14 @@ +{ + "automappingRulesFile": "", + "commands": [ + ], + "compatibilityVersion": 1100, + "extensionsPath": "extensions", + "folders": [ + "." + ], + "properties": [ + ], + "propertyTypes": [ + ] +} diff --git a/Tiled/hello.tiled-session b/Tiled/hello.tiled-session new file mode 100644 index 0000000..e0d9b11 --- /dev/null +++ b/Tiled/hello.tiled-session @@ -0,0 +1,12 @@ +{ + "activeFile": "", + "expandedProjectPaths": [ + ], + "fileStates": { + }, + "openFiles": [ + ], + "project": "hello.tiled-project", + "recentFiles": [ + ] +} diff --git a/hello b/hello deleted file mode 100755 index 22be77b..0000000 Binary files a/hello and /dev/null differ diff --git a/main.odin b/main.odin index a021739..bdeebc2 100644 --- a/main.odin +++ b/main.odin @@ -114,6 +114,7 @@ main :: proc() { defer rl.CloseWindow() rl.SetTargetFPS(60) + //WARN: Add a destructor to free (handlemap dangling) scene := create_scene() map_data := [16][16]i32 {