Skip to content

Instantly share code, notes, and snippets.


Wil Thomason wbthomason

View GitHub Profile
wbthomason /
Created Jul 6, 2020
Docs generation files for lsp-status.nvim (modified from core Neovim files)
#!/usr/bin/env python3
"""Generates Nvim :help docs from C/Lua docstrings, using Doxygen.
fmt_node_as_vimhelp \
para_as_map } recursive
update_params_map /
wbthomason / PKGBUILD
Last active Apr 30, 2020
Working lua-language-server-git PKGBUILD
# Contributor: Mohammad AlSaleh <CE.Mohammad.AlSaleh at gmail dot com>
# Updated by: Wil Thomason <>
pkgdesc='Lua Language Server coded by Lua'
wbthomason / help.vim
Last active May 25, 2021
Neovim: Open help in a floating window
View help.vim
scriptencoding utf-8
" This function originates from; it isn't mine
function! CreateCenteredFloatingWindow() abort
let width = min([&columns - 4, max([80, &columns - 20])])
let height = min([&lines - 4, max([20, &lines - 10])])
let top = ((&lines - height) / 2) - 1
let left = (&columns - width) / 2
let opts = {'relative': 'editor', 'row': top, 'col': left, 'width': width, 'height': height, 'style': 'minimal'}
wbthomason / minrc.vim
Created Sep 20, 2018
Minimum vimrc for LCN issue
View minrc.vim
call plug#begin('~/.local/share/nvim/plugs')
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash',
\ }
call plug#end()
" Always draw sign column. Prevent buffer moving when adding/deleting sign.

Keybase proof

I hereby claim:

  • I am wbthomason on github.
  • I am wbthomason ( on keybase.
  • I have a public key ASBXIldLEwPq1L_TU1NDUJX695XwcHOjMI4viUgp8CYlAAo

To claim this, I am signing this object:

wbthomason / UVa: CS Courses and Programming
Last active May 31, 2020
UVa: CS Courses and Programming Languages
View UVa: CS Courses and Programming

This is only my personal opinion, and other TAs probably will differ/should also post their opinions.

Java and C++ are really very similar. Java is more strictly object oriented than C++, and C++ lets the programmer have more low-level control (or rope with which to hang themselves, depending on how you look at it), but the paradigms they enforce are largely the same. So, when considering a new language to learn, we really have to consider what we'll get out of it - what about the language makes it worth learning. There are a few factors here. First, as the student answers have mentioned, the practicality of a language is important. If knowing a language might be necessary to get you a good job or to allow you to contribute meaningfully to a large open-source project, it might be a good idea to learn it. Second, you also need to look at how the language can help you in a larger sense. Does it use a unique paradigm, or one you haven't encountered before? Can it introduce you to new ways of thinking about and

wbthomason / Fixed Signals
Created Feb 7, 2014
A fixed version of some example Rust code showing simple signal handling.
View Fixed Signals
use std::io::signal::{Listener, Interrupt};
fn main() {
let mut listener = Listener::new();
let listener = listener;
do spawn {
loop {
match listener.port.recv() {
wbthomason / gist:6705396
Created Sep 25, 2013
A partial module for internal shell functions.
View gist:6705396
use std::{os, path, str};
mod internal {
pub fn changedir(pathstr: &str) {
let path = Path(pathstr);
if os::path_exists(path) && os::path_is_dir(path) && os::change_dir(path){
else {
println(fmt!("Error: %s is not a valid directory", pathstr));
println(fmt!("Current working directory is: %s", str::str(os::getcwd())));