refactor neovim config
This commit is contained in:
parent
df34683aea
commit
fc8f483fa7
43 changed files with 346 additions and 102 deletions
24
nvim/lua/juancwu/utils/os.lua
Normal file
24
nvim/lua/juancwu/utils/os.lua
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---@class juancwu.utils.os
|
||||
local M = {}
|
||||
|
||||
---@return boolean
|
||||
function M.is_linux()
|
||||
return vim.loop.os_uname().sysname:find("Linux") ~= nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function M.is_mac()
|
||||
return vim.loop.os_uname().sysname:find("Darwin") ~= nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function M.is_win()
|
||||
return vim.loop.os_uname().sysname:find("Windows") ~= nil
|
||||
end
|
||||
|
||||
---@return boolean
|
||||
function M.is_wsl()
|
||||
return vim.fn.has("wsl") == 1
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue