This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #pragma once | |
| #ifndef RB_H | |
| #define RB_H | |
| #include "types.h" | |
| #include "memory.h" | |
| #include "utility.h" | |
| #define rb_new(T, N) \ | |
| struct { \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vim.api.nvim_create_user_command("LspLogClear", function() | |
| local lsplogpath = vim.fn.stdpath("state") .. "/lsp.log" | |
| print(lsplogpath) | |
| if io.close(io.open(lsplogpath, "w+b")) == false then vim.notify("Clearning LSP Log failed.", vim.log.levels.WARN) end | |
| end, { nargs = 0 }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Fortune and Cowsay that uses tput to check for the width of the terminal. | |
| if type -q fortune && type -q cowsay | |
| fortune -o | cowsay -W (math (tput cols) - 3) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "include/tgraymath.h" | |
| #include "include/raymath.h" | |
| #include <stdio.h> | |
| void print_vector2(Vector2 v) { | |
| printf("Vector2: {%.6f, %.6f}\n", v.x, v.y); | |
| } | |
| void print_vector3(Vector3 v) { | |
| printf("Vector3: {%.6f, %.6f, %.6f}\n", v.x, v.y, v.z); |