Skip to content

Commit

Permalink
Add for MacOS and FreeBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
eturnq-cd committed Sep 23, 2024
1 parent cc31aea commit 7c3c315
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 7 deletions.
69 changes: 69 additions & 0 deletions install_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/sh

printf "Installing git, python3, curl, wget...\n"

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# ...
printf "Linux is not yet fully supported.\n"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
if [[ `which brew` == "" ]]; then
printf "Installing Homebrew...\n"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
printf "Using Homebrew...\n"
fi
to_inst=()

if [[ `which git` == "" ]]; then
to_inst+=("git")
fi
if [[ `which python3` == "" ]]; then
to_inst+=("python3")
fi
if [[ `which curl` == "" ]]; then
to_inst+=("curl")
fi
if [[ `which wget` == "" ]]; then
to_inst+=("wget")
fi

if [[ "$to_inst" ]]; then
brew install $to_inst
fi
elif [[ "$OSTYPE" == "cygwin" ]]; then
# POSIX compatibility layer and Linux environment emulation for Windows
printf "Cygwin is not yet fully supported.\n"
elif [[ "$OSTYPE" == "msys" ]]; then
# Lightweight shell and GNU utilities compiled for Windows (part of MinGW)
printf "Msys is not yet fully supported.\n"
elif [[ "$OSTYPE" == "win32" ]]; then
# I'm not sure this can happen.
printf "Win32 is not yet fully supported.\n"
elif [[ "$OSTYPE" == "freebsd"* ]]; then
printf "FreeBSD is not yet fully supported.\n"
to_inst=()

if [[ `which git` == "" ]]; then
to_inst+=("git")
fi
if [[ `which python3` == "" ]]; then
to_inst+=("python3")
fi
if [[ `which curl` == "" ]]; then
to_inst+=("curl")
fi
if [[ `which wget` == "" ]]; then
to_inst+=("wget")
fi

if [[ "$to_inst" ]]; then
su root -c "pkg install $to_inst"
fi
else
# Unknown.
printf "This OS ($OSTYPE) is not yet fully supported.\n"
fi

git clone https://github.com/eturnq/unix-dotfiles ~/.config/unix-dotfiles
python3 ~/.config/unix-dotfiles/install_stage2.py
7 changes: 7 additions & 0 deletions install_stage2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python3

def main():
print("Not implemented yet")

if __name__ == "__main__":
main()
4 changes: 2 additions & 2 deletions nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ vim.cmd("let mapleader = ' '")
require("preferences")
require("keymaps")

vim.cmd("colorscheme nord")

-- bootstrap LazyVim
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"

Expand Down Expand Up @@ -59,3 +57,5 @@ require("lazy").setup({
}
}
})

vim.cmd("colorscheme nord")
10 changes: 5 additions & 5 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"lazy.nvim": { "branch": "main", "commit": "48b52b5cfcf8f88ed0aff8fde573a5cc20b1306d" },
"lazy.nvim": { "branch": "main", "commit": "cece2a9b4a649ee5fa45fe83590a6dd11c5d4eb7" },
"lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
"nord.nvim": { "branch": "main", "commit": "70fc2425b50396e5f1230200b59527d8440a24df" },
"nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-lspconfig": { "branch": "master", "commit": "bdbc65aadc708ce528efb22bca5f82a7cca6b54d" },
"nvim-treesitter": { "branch": "master", "commit": "4770d9a1a77b0cc2b723c646c3dbe43a9133e5db" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-lspconfig": { "branch": "master", "commit": "7edfd6692ba17f8d4fe08d84142781898ab0a672" },
"nvim-treesitter": { "branch": "master", "commit": "fa19150d0057b22dde98746680162b9a7ab61d1e" },
"nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" },
"plenary.nvim": { "branch": "master", "commit": "ec289423a1693aeae6cd0d503bac2856af74edaa" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"ultimate-autopair.nvim": { "branch": "v0.6", "commit": "53ed7c65e466963c916251f9ce6df7dd3685dc36" }
}
}
4 changes: 4 additions & 0 deletions nvim/lua/plugins/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ return {
lspconfig.pyright.setup{
capabilities = capabilities
}

lspconfig.zls.setup{
capabilities = capabilities
}
end
}
}

0 comments on commit 7c3c315

Please sign in to comment.