diff options
| author | srdusr <trevorgray@srdusr.com> | 2024-01-16 22:46:54 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2024-01-16 22:46:54 +0200 |
| commit | cad1eccc2ea4633a3f9236755727fea7351377d5 (patch) | |
| tree | 9b4b59ed1d9c938c17b1068a11e62c96ab1f0c11 | |
| parent | ae17b4311f43b996686cf4fbb6838aa75fe3205b (diff) | |
| download | dotfiles-cad1eccc2ea4633a3f9236755727fea7351377d5.tar.gz dotfiles-cad1eccc2ea4633a3f9236755727fea7351377d5.zip | |
Edit glow path
| -rw-r--r-- | lua/user/pack.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/user/pack.lua b/lua/user/pack.lua index 1a37d28..6c99473 100644 --- a/lua/user/pack.lua +++ b/lua/user/pack.lua @@ -362,8 +362,19 @@ return packer.startup(function(use) use({ 'ellisonleao/glow.nvim', -- Markdown Preview config = function() + local glow_path + + -- Check if glow exists in ~/.local/bin + if vim.fn.executable('~/.local/bin/glow') == 1 then + glow_path = '~/.local/bin/glow' + else + -- Fallback to /usr/bin/glow + glow_path = '/usr/bin/glow' + end + require('glow').setup({ style = 'dark', + glow_path = glow_path, }) end, }) |
