mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
2 Commits
bbb8545403
...
784b435f0e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
784b435f0e | ||
|
|
beec97c086 |
@ -1,6 +1,7 @@
|
||||
local utils = require("utils")
|
||||
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
local plugin_dir = vim.fn.stdpath("data") .. "/lazy"
|
||||
local lazypath = plugin_dir .. "/lazy.nvim"
|
||||
|
||||
if not vim.uv.fs_stat(lazypath) then
|
||||
vim.fn.system {
|
||||
@ -15,12 +16,6 @@ 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
|
||||
@ -114,8 +109,12 @@ 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,
|
||||
},
|
||||
@ -430,7 +429,20 @@ 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 = string.format(":call firenvim#install(0, '%s')", prologue),
|
||||
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
|
||||
},
|
||||
-- Debugger plugin
|
||||
{
|
||||
|
||||
@ -58,16 +58,6 @@ 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user