A place for bears
This workspace is optimized for bear development. If you're a human, this just isn't for you. Feel free to try, but a lot of what goes on in this repo won't make any sense, and you're going to feel lost, a little scared, and very very hungry.
If you're a bear, congratulations, you good-looking animal! Follow these steps to get a workspace that works well, looks great, and is up to bear standards.
This will give you a few things:
- Ubuntu WSL
- Zsh & Oh My Zsh
- Neovim and a kitted config
- Development tools for bear work
This is taken from this website: https://docs.microsoft.com/en-us/windows/wsl/install-win10
- Open PowerShell as Administrator and run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Restart your computer when prompted.
- Install Ubuntu for Windows. Just go to the Microsoft store, you cute little creature
- Launch Ubuntu, and go through the unix user set up instructions
- Do you have an ugly computer name? Let's go fix that
Pictured above: ugly computer name
- Search for "About your PC"
- Click "Rename this PC"
- Type in your sexy new name
- Restart your computer
Oh my good, you are adorable. Go get that Hyper JS, you fluffy son of a bitch.
- Install HyperJS: https://hyper.is/
- Install a pretty little theme for yourself:
hyper install hyper-snazzy
- Bear out a little
- Update Hyper to start Ubuntu by default when launched
- Hit
Ctrl
+,
to open the HyperJS settings - Scroll down to shell and change it to
C:\\Windows\\System32\\bash.exe
- shell: '',
+ shell: 'C:\\Windows\\System32\\bash.exe',
Wow, you're so pretty. That fur, what sheen. Your color, your coat. Wonderful. Let's keep working though, we'll have time to frolic later.
- Run
./fix-wsl-permissions.sh
to fix a bug in WSL where permissions default to 0777 - Restart the terminal
- Run
./bear-with-me.sh
- Reload the terminal
- Rock on
Man, those paws are perfect. Round, soft, powerful. sigh. Let's install powerline, so our console can go from this
To this:
- Download the zip from the Powerline Github page
- Extract all from the zip
- Open a Powershell as Administrator
- Navigate to
fonts-master
directory:cd "${HOME}\Downloads\fonts-master\fonts-master"
- Change the
Execution Policy
:Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass
- Run
.\install.ps1
script to install the fonts - Set your execution policy back to what it was before:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Undefined
- Change your Hyper font to
Fira Mono for Powerline
Let's face it, bears are clumsy creatures. It's nothing against you, honestly, it's just part of your nature. You can't be beautiful, intelligent, charismatic, and graceful. That's just too much good for a single package. So let's dive into some clumsy bear problems you may have encountered along the way.
So you ran bear-with-me.sh
and your colors are totally bland and just blegh.
You know that you have the onedark installed via the nvim config you've loaded, so it should look beautiful.
If this happened to you, with those soft fluffy feet, check your Windows 10 version.
- Type
About your PC
in the search bar - Scroll to the
Windows specifications
section - If
Version
is less than1809
, then you need to update your version.
Update Windows 10 Version
- Download the Windows provided update installer
- Run it, and it should install the latest version of Windows for you
But why? Great question! Here's a fish 🐟 This one took a good amount of sleuthing to discover, but I one good clue to get started: the colors displayed pretty well when using the default terminal emulator that runs when you run the Ubuntu app.
Which led me to think that it might be a problem with HyperJs, and not actually an issue with the nvim config, or something inherently wrong with running the config on WSL. Then I found this issue thread: vercel/hyper#1968, and I ran the prescribed Ansi Tests myself.
- Save AnsiColors256.ans
- Run
type AnsiColors256.ans
in Powershell - Change HyperJs to launch Powershell by default by editing the config
- Hit
Ctrl
+,
to open the HyperJS settings - Scroll down to shell and change default shell
+ shell: '',
- shell: 'C:\\Windows\\System32\\bash.exe',
- Repeat steps 1 & 2
According to the thread, if I was on a version of Windows 10 less than 1809, I should see a problem. And it turns out I was on 1803. Here are the results of that test:
The fix is as simple as updating your Windows 10 version, which pulls in this release of node-pty
, a library that supports writing terminal emulators for Windows on NodeJs (i.e. HyperJs)
The final result isn't perfect, with the brown shading, but it's close enough to what I wanted that there's no real gain in further investigation.
Oh, silly silly animal. Do you keep seeing this pop up whenever you open vim?
[coc.nvim] javascript file not found, please compile the code or use release branch.
It's okay, sweet little bear. Just run these steps to fix it:
- Open vim
- Type :checkhealth
- You'll probably see this suggested help:
ERROR: Javascript entry not found, run ":call coc#util#install()" to fix it.
- Do the suggested help!
Geese are troubled characters, so we need to make sure there's no goose trouble in our config! You seeing an error like this pop up when you're viewing a Golang file?
Error detected while processing function <SNR>36_register[5]..go#lsp#DidOpen
line 14
Unknown function: sendMessage
E15: Invalid expression: l:lsp.sendMessage(l:msg, l:state)
First off, when you see an error like this, you can run :scriptnames
, and then find the script whose number corresponds with the error, so in this case, script number 36. That can be helpful in the future if you don't know what's going on.
In this case, you need to run :GoInstallBinaries
to finish the vim-go installation. That should add some binaries to your nvim
config directory, and then you should be on happy trails once again.