| 1 | lua << EOF |
| 2 | -- This appends all applicable neovim paths to the runtimepath. |
| 3 | for _, directory in pairs({"/run/current-system/profile", "~/.guix-profile", "~/.guix-home/profile", vim.env.GUIX_PROFILE, vim.env.GUIX_ENVIRONMENT}) do |
| 4 | local rtp = vim.fs.abspath(directory .. "/share/nvim/site") |
| 5 | local stat = vim.uv.fs_stat(rtp) |
| 6 | if stat and stat.type == "directory" then |
| 7 | vim.opt.rtp:append(rtp) |
| 8 | end |
| 9 | end |
| 10 | EOF |