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.
784b435f0e
...
bbb8545403
@ -1,7 +1,6 @@
|
|||||||
local utils = require("utils")
|
local utils = require("utils")
|
||||||
|
|
||||||
local plugin_dir = vim.fn.stdpath("data") .. "/lazy"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
local lazypath = plugin_dir .. "/lazy.nvim"
|
|
||||||
|
|
||||||
if not vim.uv.fs_stat(lazypath) then
|
if not vim.uv.fs_stat(lazypath) then
|
||||||
vim.fn.system {
|
vim.fn.system {
|
||||||
@ -16,6 +15,12 @@ end
|
|||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
-- check if firenvim is active
|
-- 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()
|
local firenvim_not_active = function()
|
||||||
return not vim.g.started_by_firenvim
|
return not vim.g.started_by_firenvim
|
||||||
end
|
end
|
||||||
@ -109,12 +114,8 @@ local plugin_specs = {
|
|||||||
"Yggdroot/LeaderF",
|
"Yggdroot/LeaderF",
|
||||||
cmd = "Leaderf",
|
cmd = "Leaderf",
|
||||||
build = function()
|
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
|
if not vim.g.is_win then
|
||||||
vim.cmd("LeaderfInstallCExtension")
|
vim.cmd(":LeaderfInstallCExtension")
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -429,20 +430,7 @@ local plugin_specs = {
|
|||||||
end,
|
end,
|
||||||
-- it seems that we can only call the firenvim function directly.
|
-- it seems that we can only call the firenvim function directly.
|
||||||
-- Using vim.fn or vim.cmd to call this function will fail.
|
-- Using vim.fn or vim.cmd to call this function will fail.
|
||||||
build = function()
|
build = string.format(":call firenvim#install(0, '%s')", prologue),
|
||||||
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
|
-- Debugger plugin
|
||||||
{
|
{
|
||||||
|
|||||||
@ -58,6 +58,16 @@ endif
|
|||||||
" Only fuzzy-search files names
|
" Only fuzzy-search files names
|
||||||
let g:Lf_DefaultMode = 'FullPath'
|
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
|
" Do not use version control tool to list files under a directory since
|
||||||
" submodules are not searched by default.
|
" submodules are not searched by default.
|
||||||
let g:Lf_UseVersionControlTool = 0
|
let g:Lf_UseVersionControlTool = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user