Skip to content

Commit 2df0628

Browse files
authored
fix: fix cpath component on windows (#166)
closes #164
1 parent 550a905 commit 2df0628

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

doc/fff.nvim.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*fff.nvim.txt* For Neovim >= 0.10.0 Last change: 2025 September 17
1+
*fff.nvim.txt* For Neovim >= 0.10.0 Last change: 2025 October 04
22

33
==============================================================================
44
Table of Contents *fff.nvim-table-of-contents*

lua/fff/download.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,11 @@ function M.get_binary_path()
187187
return get_binary_path(plugin_dir)
188188
end
189189

190+
function M.get_binary_cpath_component()
191+
local plugin_dir = vim.fn.fnamemodify(debug.getinfo(1, 'S').source:sub(2), ':h:h')
192+
local binary_dir = get_binary_dir(plugin_dir)
193+
local extension = system.get_lib_extension()
194+
return binary_dir .. '/lib?.' .. extension
195+
end
196+
190197
return M

lua/fff/rust/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ end
1212
local base_path = debug.getinfo(1).source:match('@?(.*/)')
1313

1414
local paths = {
15-
download.get_binary_path(),
15+
download.get_binary_cpath_component(),
1616
base_path .. '../../../target/release/lib?' .. get_lib_extension(),
1717
base_path .. '../../../target/release/?' .. get_lib_extension(),
1818
}

0 commit comments

Comments
 (0)