Files
telescope.nvim/scratch/nvim_ffi.lua
TJ DeVries 8783bea06e feat: quickfix (#293)
* feat: quickfix (not implemented)

* [WIP]: Wed 09 Dec 2020 11:11:30 PM EST

* somewhat working linked list impl

* getting closer

* might be working

* might be working for real

* works and implemented basic example

* dont forget to close prompt

* fix descending and add more tests

* test fixes

* fix test

* more logging

* Fix some more tests

* Fix logging messing up tests

* fix: lint

* fix: multi select stuffs
2021-01-11 13:29:37 -05:00

16 lines
342 B
Lua

local ffi = require("ffi")
-- ffi.load("/home/tj/build/neovim/build/include/eval/funcs.h.generated.h")
ffi.cdef [[
typedef unsigned char char_u;
char_u *shorten_dir(char_u *str);
]]
local text = "scratch/file.lua"
local c_str = ffi.new("char[?]", #text)
ffi.copy(c_str, text)
print(vim.inspect(ffi.string(ffi.C.shorten_dir(c_str))))