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

Compare commits

...

2 Commits

Author SHA1 Message Date
jdhao
6e137fe9a3 make firenvim work again
1. fix build issue
2. fix PATH env issue
2024-07-31 07:09:50 +08:00
jdhao
719fbfc1ab update lua_ls settings 2024-07-31 05:42:33 +08:00
2 changed files with 14 additions and 11 deletions

View File

@ -231,11 +231,12 @@ if utils.executable("lua-language-server") then
},
workspace = {
-- Make the server aware of Neovim runtime files,
-- see also https://github.com/LuaLS/lua-language-server/wiki/Libraries#link-to-workspace .
-- Lua-dev.nvim also has similar settings for lua ls, https://github.com/folke/neodev.nvim/blob/main/lua/neodev/luals.lua .
-- see also https://luals.github.io/wiki/settings/#workspacelibrary
library = {
vim.env.VIMRUNTIME,
fn.stdpath("config"),
-- make lua_ls aware of functions under vim.uv
"${3rd}/luv/library"
},
maxPreload = 2000,
preloadFileSize = 50000,

View File

@ -15,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
@ -419,17 +425,13 @@ local plugin_specs = {
{
"glacambre/firenvim",
enabled = function()
if vim.g.is_win or vim.g.is_mac then
return true
end
return false
local result = vim.g.is_win or vim.g.is_mac
return result
end,
build = function()
vim.fn["firenvim#install"](0)
end,
lazy = true,
-- 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)
},
-- Debugger plugin
{
"sakhnik/nvim-gdb",