Welcome to your new ultimate development environment! A post-install setup script for developers that works on Fedora and all RHEL 8 clones. Enjoy the same software and desktop regardless of which Red Hat based distribution you choose.
Works across Fedora 34+, RHEL 8+ and all clones. You get to choose between cutting edge Fedora or stable RHEL clones. I suggest if you want stable, then choose Rocky.
To maintain parity with Fedora 34+, any package that is not available directly in RHEL is downloaded as:
- A binary from Github or another trusted source
- From flathub
Development | Browsers | Graphics | Sound and video | Security and backup |
---|---|---|---|---|
Neovim 0.5 | Firefox | Krita | MPV | KeepassXC |
Node.js / Deno | Chromium | Shotwell | Handbrake | BorgBackup |
Gnome Boxes | nnn file browser | ImageMagick | MKVToolNix | |
Lazygit | ||||
Github CLI | ||||
Pandoc | ||||
Shellcheck | ||||
Shfmt | ||||
Bat / ripgrep |
Gnome has been tweaked along with font settings for a better experience.
Setup out of the box with the latest Neovim 0.5 and plugins configured to use fzf
, ripgrep
and bat
with an attractive Visual Studio Code theme
Uses stow to install and mange dotfiles
All the software dotfiles are managed using stow, this makes them easy to alter and version on your computer.
This script is designed to be run immediately after installing the operating system. If you are using a RHEL clone you should select workstation
from the software selection option during the install.
git clone https://github.com/David-Else/developer-workstation-setup-script
cd developer-workstation-setup-script
You will want to look at the install script and modify it with your own preferences. This has been made as easy as possible, and should be self explanatory.
The following arrays in install.sh
contain all the packages that are common to Fedora and RHEL clones:
rpm_packages_to_remove=()
rpm_packages_to_install=()
flathub_packages_to_install=()
npm_global_packages_to_install=()
These arrays are global and are modified depending on if you have installed Fedora or a RHEL clone. Inside the if then
conditional you can add and remove packages specifically for each operating system:
if [[ ("$ID" == "centos" || "$ID" == "rocky" || "$ID" == "rhel" || "$ID" == "almalinux") && "${VERSION_ID%.*}" -gt 7 ]]; then
setup_redhat_packages() {
local rhel_rpm_packages_to_remove=()
local rhel_rpm_packages_to_install=()
local rhel_flathub_packages_to_install=()
}
elif [ "$ID" == "fedora" ]; then
setup_fedora_packages() {
local fedora_rpm_packages_to_remove=()
local fedora_rpm_packages_to_install=()
}
fi
Repos can be added conditionally, so if the package is not required then the repo is not installed:
case " ${rpm_packages_to_install[*]} " in
*' code '*)
rpm --import https://packages.microsoft.com/keys/microsoft.asc
sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
;;&
*' lazygit '*)
dnf -y copr enable atim/lazygit
;;&
*' gh '*)
dnf -y config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
;;
esac
sudo ./install.sh
./setup.sh
ENJOY!
General LSP
------- ---
jk = escape gD = Jumps to the declaration
ctrl-s = save gd = Jumps to the definition
]c/[c/[l/]l = cycle quick/location lists K = Displays hover information
ESC = search highlighting off <C-k> = Displays signature info
gi = Lists all implementations
<leader>f = format (formatprg or LSP) in the quickfix window
<leader>m = run make on current buffer gr = List all symbol references
<leader>t = open terminal to the right <space>wa = Add workspace folder
<leader>cd = working dir to current file <space>wr = Remove workstation folder
<leader>c = edit init.vim config <space>wl = List workstation folders
<leader>o = insert newline below <space>D = Jump to type definition
<leader>qa = quit all <space>rn = Rename all symbol references
<space>ca = Selects a code action
<leader>cc = toggle colorcolumn <space>e = Show diagnostics from line
<leader>n = toggle line numbers <space>q = Sets the location list
<leader>s = toggle spell check [d = Move to previous diagnostic
<leader>sn = next spell error and prompt ]d = Move to next diagnostic
<leader>w = toggle whitespaces
<leader>z = toggle zen mode
<leader>ga = git add current file
<leader>gr = git reset current file
<leader>gc = git commit
<leader>gp = git push
alt h/j/k/l = navigate windows
fzf.vim Tree-sitter
------- -----------
ctrl-p = open file explorer <CR> = Initilize selection
<leader>b = open buffers <CR> = Expand selection by scope
<leader>h = open file history <TAB> = Expand selection by node
<leader>rg = ripgrep search results <S-TAB> = Shrink selection by node
<leader>gs = git status
<leader>gh = git commits history
ctrl-/ = toggle preview window
ctrl-t/x/v = open in new tab/split/vert split
For all the Vim/Neovim built in shortcuts please check out https://www.elsewebdevelopment.com/ultimate-vim-keyboard-shortcuts/
This is a list of all the plugins used, please follow the links to read about how to opperate them.
-
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
-
nvim-lspconfig - Quickstart configurations for the Nvim LSP client
-
nvim-compe - Auto completion plugin for nvim written in Lua
-
nvim-lightbulb - Shows a lightbulb whenever a
textDocument/codeAction
is available at the current cursor position -
nvim-markdown-preview - Markdown preview in the browser using pandoc/live-server through Neovim's job-control API
-
zen-mode.nvim - Distraction-free coding for Neovim
-
which-key.nvim - Neovim plugin that shows a popup with possible keybindings of the command you started typing
-
vim-commentary - Comment stuff out
-
fzf.vim - fzf vim wrapper
Q: How do I install Visual Studio Code?
A: Simply un-comment code
from rpm-packages-to-install
in install.sh
before you run it.
If you would like to use Code for things that Neovim still struggles with (like debugging), and still use all the Vim keyboard shortcuts, I suggest installing asvetliakov.vscode-neovim
and using these settings:
settings.json
You might also like to install ms-vscode.live-server
for live debugging in Code or the browser.
Q: Why is the script spit into two parts for install and setup?
A: Sudo privileges are needed for the installation, and they time out before the script can finish. This makes unattended installation impossible without running the install part of the script as root.
The setup part is much easier to do as a user, so running it as the user avoids constant su - "$SUDO_USER" -c
statements in the code. If a part of the setup needs sudo
it will ask for your password.
Q: Does this script disable the caps lock key? I've noticed that it works during login but after that it stops working altogether.
A: It makes the caps lock into a delete for touch typing purposes, to change it modify this line in the setup script:
capslock_delete="false"