This file contains 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
local lunajson = require "lunajson" | |
local icons_by_filename = require("icons-default").icons_by_filename | |
local icons_by_file_extension = require("icons-default").icons_by_file_extension | |
local icons_by_operating_system = require("icons-default").icons_by_operating_system | |
-- read the json | |
local f, err, rc = io.open("glyphnames.json", "r") | |
if not f then | |
io.stderr:write(string.format("%s\n", err)) | |
os.exit(rc) |
This file contains 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
-- :source this file to collect feature flag values and write to has_list.log | |
-- src/nvim/eval/funcs.c | |
local has_list = { | |
"bsd", | |
"linux", | |
"sun", | |
"unix", | |
"win32", | |
"win64", |
This file contains 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
local function bi(event, data) | |
log.line( | |
"dev", | |
"%15.15s buftype=%s filetype=%s bufhidden=%s swapfile=%s modifiable=%s buflisted=%s winnr=%d winid=%d tabpage=%d %d %s", | |
event, | |
vim.api.nvim_buf_get_option(data.buf, "buftype"), | |
vim.api.nvim_buf_get_option(data.buf, "filetype"), | |
vim.api.nvim_buf_get_option(data.buf, "bufhidden"), | |
vim.api.nvim_buf_get_option(data.buf, "swapfile"), | |
vim.api.nvim_buf_get_option(data.buf, "modifiable"), |
This file contains 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.keymap.set("n", "gb", function() | |
local api = require "nvim-tree.api" | |
local scratch_bufnr = vim.api.nvim_create_buf(true, true) | |
print("scratch_bufnr " .. scratch_bufnr) | |
-- substitute with user's on_attach as needed | |
api.config.mappings.default_on_attach(scratch_bufnr) |
This file contains 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
local api = require "nvim-tree.api" | |
local Event = api.events.Event | |
api.events.subscribe(Event.TreeAttachedPost, function(bufnr) | |
print(string.format("TreeAttachedPost bufnr=%s", vim.inspect(bufnr))) | |
local buf_keymaps = vim.api.nvim_buf_get_keymap(bufnr, "") | |
for i = 1, 4, 1 do | |
print(vim.inspect(buf_keymaps[i])) |
This file contains 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 <errno.h> | |
#include <poll.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/inotify.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <stdbool.h> | |
bool all = false; |
This file contains 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
KeyPress event, serial 34, synthetic NO, window 0x2000001, | |
root 0x1e9, subw 0x0, time 1300318, (497,338), root:(501,367), | |
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES, | |
XLookupString gives 0 bytes: | |
XmbLookupString gives 0 bytes: | |
XFilterEvent returns: False | |
KeyPress event, serial 34, synthetic NO, window 0x2000001, | |
root 0x1e9, subw 0x0, time 1300318, (497,338), root:(501,367), | |
state 0x14, keycode 133 (keysym 0xffeb, Super_L), same_screen YES, |