Squashed 'users/daniel/configs/system/nvim/nvim/' content from commit e088bce
git-subtree-dir: users/daniel/configs/system/nvim/nvim git-subtree-split: e088bce2bd90c0b5c35d13a8615a55455b96294d
This commit is contained in:
20
lua/astronvim/utils/ffi.lua
Normal file
20
lua/astronvim/utils/ffi.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- ### AstroNvim C Extensions
|
||||
|
||||
local ffi = require "ffi"
|
||||
|
||||
-- Custom C extension to get direct fold information from Neovim
|
||||
ffi.cdef [[
|
||||
typedef struct {} Error;
|
||||
typedef struct {} win_T;
|
||||
typedef struct {
|
||||
int start; // line number where deepest fold starts
|
||||
int level; // fold level, when zero other fields are N/A
|
||||
int llevel; // lowest level that starts in v:lnum
|
||||
int lines; // number of lines from v:lnum to end of closed fold
|
||||
} foldinfo_T;
|
||||
foldinfo_T fold_info(win_T* wp, int lnum);
|
||||
win_T *find_window_by_handle(int Window, Error *err);
|
||||
int compute_foldcolumn(win_T *wp, int col);
|
||||
]]
|
||||
|
||||
return ffi
|
||||
Reference in New Issue
Block a user