Created
November 25, 2025 22:09
-
-
Save rawnly/01601a4b8b5e389ec8e4bca0bc2df7c0 to your computer and use it in GitHub Desktop.
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
| -- Set buffer to be readonly | |
| vim.api.nvim_buf_set_option(buf, "readonly", true) | |
| vim.api.nvim_buf_set_option(buf, "modifiable", false) | |
| vim.api.nvim_buf_set_name( | |
| buf, | |
| string.format("gist://%s/%s", gist.hash, gist.name) | |
| ) | |
| -- Set winbar | |
| local winbar = string.format("%%=GIST `%s` [READ-ONLY]", gist.name) | |
| vim.api.nvim_win_set_option(win, "winbar", winbar) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment