[zsh,nvim] Set up vim's &path based on zsh's FPATH
This commit is contained in:
parent
711dd78a2f
commit
d1e8f59c53
3 changed files with 22 additions and 0 deletions
15
config/nvim/after/ftplugin/zsh.lua
Normal file
15
config/nvim/after/ftplugin/zsh.lua
Normal file
|
@ -0,0 +1,15 @@
|
|||
-- Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
local zshFPath = vim.env.FPATH
|
||||
if zshFPath then
|
||||
local paths = vim.split(zshFPath, ":")
|
||||
vim.bo.path = ".," .. table.concat(paths, ",") .. ",,"
|
||||
else
|
||||
local defaultFPath = {
|
||||
"~/.dotfiles/zsh/func/**",
|
||||
"~/.zsh/func/**",
|
||||
"/usr/local/share/zsh/site-functions",
|
||||
"/usr/share/zsh/site-functions"
|
||||
}
|
||||
vim.bo.path = ".," .. table.concat(defaultFPath) .. ",,"
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue