Skip to main content

Lab Machines Environment Setup

Installing oh my zsh and Neovim with Neovim kickstart on the lab machines.

Examples

After you have run the installation, you will get compiler errors directly inside your editor.

Neovim LSP Example

Your command line will have syntax highlighting and autocomplete with the right arrow key.

Oh-My-Zsh Example

Installation

  1. Log into a lab machine with ssh.

  2. Run this command

    bash -c "$(curl -fsSL https://raw.githubusercontent.com/utk-eecs-crumpton-tas/cs102-downloads/main/scripts/install.bash)"
  3. That's it, now you can use Neovim. Just replace vim with nvim when editing your files.

    nvim file.cpp
  4. If you are on a Mac the color scheme for Neovim will not display correctly in the default terminal app. You can use iTerm2 instead.

Here is a vim command reference to help you get started.

Customizing (Optional)

Oh My Zsh

To customize OMZ plugins, edit the ~/.zshrc file with

nvim ~/.zshrc

OMZ comes with several themes you can find here

If you want to add additional plugins, you can git clone them into ~/.oh-my-zsh/custom/plugins and then add them to the plugins array in ~/.zshrc.

Neovim

To customize Neovim, edit the ~/.config/nvim/init.lua file with

nvim ~/.config/nvim/init.lua

The file contains tons of comments detailing all the configuration options.

The creator of Neovim kickstart created a YouTube video detailing all the aspects of the config as well.

Effective Neovim: Instant IDE

Neovim Themes

Nvim comes with several themes. You can switch to another theme with the telescope command:

:Telescope colorscheme

You can also add additional themes from the community.

Here is a collection of Neovim themes you can use.

If you wanted to change your theme to, for example, One Dark Pro, find the section of the init.lua file that looks like this:

  { -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
'folke/tokyonight.nvim',
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- Load the colorscheme here
vim.cmd.colorscheme 'tokyonight-night'

-- You can configure highlights by doing something like
vim.cmd.hi 'Comment gui=none'
end,
},

And change it to this:

  { -- You can easily change to a different colorscheme.
-- Change the name of the colorscheme plugin below, and then
-- change the command in the config to whatever the name of that colorscheme is
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`
'navarasu/onedark.nvim',
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
-- Load the colorscheme here
vim.cmd.colorscheme 'onedark'

-- You can configure highlights by doing something like
vim.cmd.hi 'Comment gui=none'
end,
},