tjdevries / nlua.nvim

Lua Development for Neovim
MIT License
262 stars 21 forks source link

Better detection for platform OS #4

Open mhartington opened 4 years ago

mhartington commented 4 years ago

Since lua LSP has predictable platforms it builds to, you could do a conditional check and set the bin location

https://github.com/tjdevries/nlua.nvim/blob/b24d8384f5fec15e560386ab045b216590c38de4/lua/nlua/lsp/nvim.lua#L7


if jit.os == 'osx' then 
  local bin_location = 'macOS'
elseif jit.os == 'linux' then --or what ever the value returned by linux
    local bin_location = 'Linux'
....

Just some ideas

martini97 commented 3 years ago

This is what I did to fix the command on Mac: https://gitlab.com/martini97/dot-nvim/-/commit/b6f627ce8ac9c2eeb303237afe3abbf8d9de4a20

wantyapps commented 3 years ago

This is what I do in my pr! Please note that the macOS jit.os value is in uppercase. Not "osx", but "OSX".