1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Compare commits

..

No commits in common. "784b435f0e637e496e4bb541bb3d2331c2eeb47f" and "bbb8545403d276fa6bc56e956906fb14f871553f" have entirely different histories.

2 changed files with 19 additions and 21 deletions

View File

@ -1,7 +1,6 @@
local utils = require("utils")
local plugin_dir = vim.fn.stdpath("data") .. "/lazy"
local lazypath = plugin_dir .. "/lazy.nvim"
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system {
@ -16,6 +15,12 @@ end
vim.opt.rtp:prepend(lazypath)
-- check if firenvim is active
-- macOS will reset the PATH when firenvim starts a nvim process, causing the PATH variable to change unexpectedly.
-- Here we are trying to get the correct PATH and use it for firenvim.
-- See also https://github.com/glacambre/firenvim/blob/master/TROUBLESHOOTING.md#make-sure-firenvims-path-is-the-same-as-neovims
local path_env = vim.env.PATH
local prologue = string.format('export PATH="%s"', path_env)
local firenvim_not_active = function()
return not vim.g.started_by_firenvim
end
@ -109,12 +114,8 @@ local plugin_specs = {
"Yggdroot/LeaderF",
cmd = "Leaderf",
build = function()
local leaderf_path = plugin_dir .. "/LeaderF"
vim.opt.runtimepath:append(leaderf_path)
vim.cmd("runtime! plugin/leaderf.vim")
if not vim.g.is_win then
vim.cmd("LeaderfInstallCExtension")
vim.cmd(":LeaderfInstallCExtension")
end
end,
},
@ -429,20 +430,7 @@ local plugin_specs = {
end,
-- it seems that we can only call the firenvim function directly.
-- Using vim.fn or vim.cmd to call this function will fail.
build = function()
local firenvim_path = plugin_dir .. "/firenvim"
vim.opt.runtimepath:append(firenvim_path)
vim.cmd("runtime! firenvim.vim")
-- macOS will reset the PATH when firenvim starts a nvim process, causing the PATH variable to change unexpectedly.
-- Here we are trying to get the correct PATH and use it for firenvim.
-- See also https://github.com/glacambre/firenvim/blob/master/TROUBLESHOOTING.md#make-sure-firenvims-path-is-the-same-as-neovims
local path_env = vim.env.PATH
local prologue = string.format('export PATH="%s"', path_env)
-- local prologue = "echo"
local cmd_str = string.format(":call firenvim#install(0, '%s')", prologue)
vim.cmd(cmd_str)
end
build = string.format(":call firenvim#install(0, '%s')", prologue),
},
-- Debugger plugin
{

View File

@ -58,6 +58,16 @@ endif
" Only fuzzy-search files names
let g:Lf_DefaultMode = 'FullPath'
" Popup window settings
let w = float2nr(&columns * 0.8)
if w > 140
let g:Lf_PopupWidth = 140
else
let g:Lf_PopupWidth = w
endif
let g:Lf_PopupPosition = [0, float2nr((&columns - g:Lf_PopupWidth)/2)]
" Do not use version control tool to list files under a directory since
" submodules are not searched by default.
let g:Lf_UseVersionControlTool = 0