Skip to content

kar9222/minimalist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

I am back to Neovim, see kar9222/nvim. Although I still use some of the stuffs here (e.g. REPL, theme), this repo won't be updated. But feel free to use them.


My minimalist setup for theme & some of my productivity tools for

  • VSCode
  • Vim via VSCode Neovim
  • Tmux
  • R REPL {radian}
  • R REPL terminal output {colorout}
  • Julia REPL
  • {theme} for R packages: {ggplot2}, {plotly}, {shiny}, {rmarkdown}, {ggdist}, {ggdag}, etc

Minimalistic style. All colors are chosen & hand tuned manually with love

  • Dark background
  • 3 light colors: matching colors and good contrast for plots
  • Dark colors for everything else e.g. comments, operators, brackets, quotes
  • Consistent styles for everything mentioned above

Syntax highlighting styles

  • Focus on keywords with minimal visual noise
  • Customized for R, Julia, Vimscript, etc

NOTE

  • Some of these files (e.g. .Rprofile, startup.jl) only work together with VSCode's theme
  • I setup all these mainly for my personal use, hence may contain specific customizations and 'hacks'
  • Feel free to pick what you want

Gallery

setup_transparency

setup

VSCode theme

Image as above. See minimalist-vscode

Custom VSCode CSS

customize-ui

Install customize-ui and copy this and in settings.json

Theme
{
    "vscode_custom_css.policy": true,
    "vscode_custom_css.imports": ["/path/to/vscode.css"],
}

Custom CSS and JS Loader

Install Custom CSS and JS Loader

Theme
{
  // Sample only. Use any size you want.
  "customizeUI.listRowHeight": 28, // optionally, try 29
  "customizeUI.fontSizeMap": {
    "13px": "16px",
    "12px": "16px",
  },
}

R terminal output

See My {colorout}

colorout

Theme & productivity tools

NOTE

  • This section contains very hacky ways of editing the source files. Use at your own risks.
  • TODO Pull requests or rebase the repo, etc
  • Some of them are TODO and the hacks can be avoided
git clone [email protected]:kar9222/minimalist.git && cd minimalist
minimalist=`pwd`

{vscode-R}

Theme
# NOTE Manually alias your VSCode extensions directory e.g.
$vsc=~/.vscode/extensions
vsc_r=$(ls --color=never $vsc | grep ikuyadeu.r)
ln -sf vscode_r/r.json $vsc/$vsc_r/syntax/r.json

R REPL {radian}

Theme & productivity tools. NOTE I pin the {radian} version at pip install -I radian==0.4.7

FZF & R history search

FZF + R history search
Call [FZF](https://github.com/junegunn/fzf) for interactive R history search. Great for single-line history search and can be used together with native {radian} REPL's `ctrl+r` multi-line history search.
  1. Put this in e.g. ~/bin/r_history then chmod +x ~/bin/r_history
  2. Call FZF in Tmux for running this script

~/bin/r_history

#! /bin/bash

# R history: Remove duplicates, commented lines, blank lines, starting `+` symbol
# NOTE the location of your ~/.radian_history. Should be the default.
tac ~/.radian_history                    | \
    awk '!a[$0]++'                       | \
    sed -e '/^#/d  ;  /^$/d  ;  s/^+//g' | \
    fzf --exact --no-sort

~/.tmux.conf

bind -n MY_KEYBINDING run " \
    tmux split-window -p 75 \
    'tmux send -t #{pane_id} \
        \"$(~/bin/r_history)\"' \
"

FZF + R history search

{radian} autocompletion & theme

Autocompletion: Type some character, press right arrow or other keybindings for completion. NOTE In the GIF below, I use alt+l key autocompletion keybindings.

Theme: See image above and in your ~/.radian_profile, simply put options(radian.color_scheme = "monokai").

Autocomplete & theme
# R REPL {radian} --------------------------------

repl=./radian
radian_proj=$repl/radian
latest_conda=/opt/$(ls --color=never /opt | grep miniconda | tail -1)
latest_py=$(ls --color=never $latest_conda/lib | grep python | tail -1)
site_packages=$latest_conda/lib/$latest_py/site-packages

# {radian}
# TODO Use customer lexer
radian=$site_packages/radian
sudo ln -sf $radian_proj/lexer.py      $radian/lexer.py
sudo ln -sf $radian_proj/completion.py $radian/completion.py
sudo ln -sf $radian_proj/session.py    $radian/session.py

# {pygments}
# TODO https://pbelmans.ncag.info/blog/2011/03/06/how-to-change-pygments-styles-and-a-university-of-antwerp-style/
# https://stackoverflow.com/questions/25368222/pygments-style-not-found
# https://github.com/pbelmans/ua-pygments-style
sudo ln -sf $repl/pygments/styles/monokai.py $site_packages/pygments/styles/monokai.py

# {prompt_toolkit}
sudo ln -sf $repl/prompt_toolkit/styles/defaults.py $site_packages/lineedit/deps/prompt_toolkit/styles/defaults.py

autocompletion autocompletion3

R theme package

{theme} for R packages: {ggplot2}, {plotly}, {shiny}, {rmarkdown}, {ggdist}, {ggdag}, etc.

See {theme}

Custom {skimr} summary stats

See Custom {skimr} summary stats

skimr

Julia

Theme for Julia REPL. See image above and startup.jl

Vim

Theme for {vim-sneak} & {vim-easymotion}. See image above and init.vim

{vim-easymotion}

vim_easymotion

{vim-sneak}

vim_sneak

Tmux

Theme for status bar, pane, window and search bar. See image above and .tmux.conf

TODO

Update README for

  • FZF + ripgrep setup in VSCode
  • FZF + fd setup in VSCode

About

Minimalist setup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published