1
0

Compare commits

..

3 Commits

Author SHA1 Message Date
47026c59e7 fix 2025-08-20 05:46:21 -07:00
0a34aec505 emacs: Skip package.el entirely when using Nix 2025-08-20 05:14:12 -07:00
f4a24ba664 emacs: switch to ws-butler 2025-08-20 05:12:26 -07:00
145 changed files with 152 additions and 2829 deletions

117
flake.nix
View File

@@ -2,92 +2,47 @@
description = "Timo's Shared Nix Modules";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }: {
# Set up formatter.
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
outputs = { self, nixpkgs, ... }:
{
# System Modules
nixosModules.default = { ... }: {
imports = [
./system/default/editor.nix
./system/default/nix.nix
./system/default/packages.nix
];
};
# Global all-hosts configuration
nixosModules.default = { ... }: {
imports = [
./system/default/editor.nix
./system/default/nix.nix
./system/default/packages.nix
./system/default/prompt.nix
./system/default/scripts.nix
./system/default/ssh-authorized-keys.nix
];
};
nixosModules.linux = { ... }: {
imports = [
./system/linux/system.nix
];
};
# Linux specific system configuration
nixosModules.linux = { ... }: {
imports = [
./system/linux/i18n.nix
./system/linux/openssh.nix
./system/linux/system.nix
./system/linux/user-tb.nix
];
};
nixosModules.macos = { ... }: {
imports = [
./system/macos/system.nix
./system/macos/fonts.nix
];
};
# MacOS specific system configuration
nixosModules.macos = { ... }: {
imports = [
./system/macos/environment.nix
./system/macos/fonts.nix
./system/macos/hotkeys.nix
./system/macos/nix.nix
./system/macos/system.nix
./system/macos/yabai.nix
];
};
# Home Manager Modules
homeManagerModules.default = { ... }: {
imports = [
./home/default/bash.nix
./home/default/basic.nix
./home/default/direnv.nix
./home/default/git.nix
];
};
# Tools on all development machines
nixosModules.develop = { ... }: {
imports = [
./system/develop/packages.nix
./system/develop/scripts.nix
];
homeManagerModules.develop = { ... }: {
imports = [
./home/develop/emacs.nix
];
};
};
# Home Manager Modules
homeManagerModules.default = { ... }: {
imports = [
./home/default/bash.nix
./home/default/basic.nix
./home/default/direnv.nix
./home/default/git.nix
];
};
# Add private homelab and cloud host aliases
homeManagerModules.private = { ... }: {
imports = [
./home/private/git.nix
./home/private/ssh-hosts.nix
];
};
# MacOS specific home configuration
homeManagerModules.macos = { ... }: {
imports = [
./home/macos/home.nix
];
};
# Emacs Configuration
homeManagerModules.develop = { ... }: {
imports = [
./home/develop/emacs.nix
];
};
# Claude Code configuration
homeManagerModules.claude = { ... }: {
imports = [
./home/claude/config.nix
];
};
};
}

View File

@@ -1,11 +0,0 @@
{ lib, ... }:
{
# Copy Claude Code configuration files to ~/.claude/
# Using activation script instead of home.file to copy (not symlink) files
home.activation.copyClaudeCommands = lib.hm.dag.entryAfter ["writeBoundary"] ''
$DRY_RUN_CMD mkdir -p $VERBOSE_ARG $HOME/.claude/commands
$DRY_RUN_CMD cp $VERBOSE_ARG ${./config/commands/commit.md} $HOME/.claude/commands/commit.md
$DRY_RUN_CMD cp $VERBOSE_ARG ${./config/commands/go-plan.md} $HOME/.claude/commands/go-plan.md
$DRY_RUN_CMD chmod $VERBOSE_ARG 644 $HOME/.claude/commands/*.md
'';
}

View File

@@ -1 +0,0 @@
Make another git commit -- read the git diff of staged files and write a good long description

View File

@@ -1 +0,0 @@
Write the detailed plan to PLAN.md and start.

View File

@@ -4,7 +4,7 @@
enable = true;
lfs.enable = true;
settings = {
extraConfig = {
pull.ff = "only";
merge.conflictstyle = "zdiff3";

View File

@@ -1,149 +1,125 @@
{ config, pkgs, lib, ... }:
let
snippetsPath = ./emacs/snippets;
extraSnippetDirs = config.tb.emacs.extraSnippetDirs;
allSnippetDirs = [ "${snippetsPath}" ] ++ extraSnippetDirs;
snippetDirsLisp = lib.concatMapStringsSep " " (d: ''"${d}"'') allSnippetDirs;
in
{ pkgs, ... }:
{
options.tb.emacs.extraSnippetDirs = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = ["~/.emacs.d/snippets/"];
description = "Additional snippet directories for yasnippet";
};
programs.emacs = {
enable = true;
config = {
programs.emacs = {
enable = true;
# Optionally provide extra packages not in the configuration file.
extraPackages = epkgs: with epkgs; [
# Optionally provide extra packages not in the configuration file.
extraPackages = epkgs: with epkgs; [
# === WEB AND SERVER CONFIGURATION ===
apache-mode # Syntax highlighting for Apache config files
nginx-mode # Syntax highlighting for Nginx config files
# === WEB AND SERVER CONFIGURATION ===
apache-mode # Syntax highlighting for Apache config files
nginx-mode # Syntax highlighting for Nginx config files
# === HARDWARE AND EMBEDDED DEVELOPMENT ===
arduino-mode # Arduino sketch development support
# === HARDWARE AND EMBEDDED DEVELOPMENT ===
arduino-mode # Arduino sketch development support
# === DOCUMENT PREPARATION ===
auctex # Comprehensive LaTeX editing environment
pandoc-mode # Pandoc document converter integration
# === DOCUMENT PREPARATION ===
auctex # Comprehensive LaTeX editing environment
pandoc-mode # Pandoc document converter integration
# === PROGRAMMING LANGUAGE SUPPORT ===
basic-mode # BASIC programming language support
bison-mode # Bison parser generator syntax
cmake-mode # CMake build system configuration
coffee-mode # CoffeeScript programming language
csharp-mode # C# programming language
groovy-mode # Groovy/Jenkins pipeline scripting
haskell-mode # Haskell functional programming
js2-mode # Enhanced JavaScript editing mode
lua-mode # Lua scripting language
php-mode # PHP web development
python-mode # Python programming language
scala-mode # Scala programming language
# === PROGRAMMING LANGUAGE SUPPORT ===
basic-mode # BASIC programming language support
bison-mode # Bison parser generator syntax
cmake-mode # CMake build system configuration
coffee-mode # CoffeeScript programming language
csharp-mode # C# programming language
groovy-mode # Groovy/Jenkins pipeline scripting
go-mode # Go programming language
haskell-mode # Haskell functional programming
js2-mode # Enhanced JavaScript editing mode
lua-mode # Lua scripting language
php-mode # PHP web development
python-mode # Python programming language
scala-mode # Scala programming language
# === MARKUP AND DATA FORMATS ===
csv-mode # Comma-separated values file editing
dockerfile-mode # Docker container definition files
jinja2-mode # Jinja2 template engine syntax
markdown-mode # Markdown markup language
nix-mode # Nix expression language (NixOS configs)
protobuf-mode # Protocol Buffers schema definitions
qml-mode # Qt QML user interface markup
yaml-mode # YAML configuration files
gnuplot-mode # Gnuplot script editing and plotting integration
# === MARKUP AND DATA FORMATS ===
csv-mode # Comma-separated values file editing
dockerfile-mode # Docker container definition files
jinja2-mode # Jinja2 template engine syntax
markdown-mode # Markdown markup language
nix-mode # Nix expression language (NixOS configs)
protobuf-mode # Protocol Buffers schema definitions
qml-mode # Qt QML user interface markup
yaml-mode # YAML configuration files
gnuplot-mode # Gnuplot script editing and plotting integration
# === SEARCH AND FILE UTILITIES ===
rg # Ripgrep searcher integration for fast text search
diredfl # Enhanced font-locking for dired mode
dired-ranger # File operations with copy/move/paste semantics
# === SEARCH AND FILE UTILITIES ===
rg # Ripgrep searcher integration for fast text search
diredfl # Enhanced font-locking for dired mode
dired-ranger # File operations with copy/move/paste semantics
# === TEXT COMPLETION AND PRODUCTIVITY ===
company # Text completion framework
smex # Enhanced M-x command with history
# === TEXT COMPLETION AND PRODUCTIVITY ===
company # Text completion framework
smex # Enhanced M-x command with history
# === USER INTERFACE ENHANCEMENTS ===
diminish # Hide minor modes from the mode line
smooth-scrolling # Smoother scrolling experience
rainbow-delimiters # Color-code nested parentheses/brackets
# === USER INTERFACE ENHANCEMENTS ===
diminish # Hide minor modes from the mode line
smooth-scrolling # Smoother scrolling experience
rainbow-delimiters # Color-code nested parentheses/brackets
# === ENVIRONMENT AND PROJECT MANAGEMENT ===
direnv # Environment variable management per directory
projectile # Project interaction and navigation library
# === ENVIRONMENT AND PROJECT MANAGEMENT ===
direnv # Environment variable management per directory
projectile # Project interaction and navigation library
# === LANGUAGE SERVER PROTOCOL (LSP) ===
# Modern language support with intelligent features
eglot # Built-in LSP client (simpler alternative to lsp-mode)
lsp-mode # Comprehensive Language Server Protocol client
lsp-java # Java language server integration
lsp-metals # Scala language server (Metals) integration
eglot-java # Java support for eglot LSP client
sbt-mode # Scala Build Tool integration
dap-mode # Debug Adapter Protocol for debugging support
# === LANGUAGE SERVER PROTOCOL (LSP) ===
# Modern language support with intelligent features
eglot # Built-in LSP client (simpler alternative to lsp-mode)
lsp-mode # Comprehensive Language Server Protocol client
lsp-java # Java language server integration
lsp-metals # Scala language server (Metals) integration
eglot-java # Java support for eglot LSP client
sbt-mode # Scala Build Tool integration
dap-mode # Debug Adapter Protocol for debugging support
# === SYNTAX CHECKING ===
flycheck # On-the-fly syntax checking framework
# === SYNTAX CHECKING ===
flycheck # On-the-fly syntax checking framework
# === VERSION CONTROL ===
git-link # Generate links to Git repository web interfaces
magit # Comprehensive Git porcelain for Emacs
# === VERSION CONTROL ===
git-link # Generate links to Git repository web interfaces
magit # Comprehensive Git porcelain for Emacs
# === TEXT EDITING ENHANCEMENTS ===
goto-last-change # Jump to the location of last edit
iedit # Edit multiple occurrences of text simultaneously
bm # Visual bookmarks for quick navigation
# === TEXT EDITING ENHANCEMENTS ===
goto-last-change # Jump to the location of last edit
iedit # Edit multiple occurrences of text simultaneously
bm # Visual bookmarks for quick navigation
# === CODE FORMATTING AND CLEANUP ===
web-beautify # Format and beautify web code (HTML/CSS/JS)
ethan-wspace # Automatically clean up whitespace on save
# === CODE FORMATTING AND CLEANUP ===
web-beautify # Format and beautify web code (HTML/CSS/JS)
ethan-wspace # Automatically clean up whitespace on save
# === PARENTHESES AND STRUCTURE EDITING ===
paredit # Balanced parentheses editing for Lisp-like languages
smartparens # Smart handling of pairs (parentheses, quotes, etc.)
# === PARENTHESES AND STRUCTURE EDITING ===
paredit # Balanced parentheses editing for Lisp-like languages
smartparens # Smart handling of pairs (parentheses, quotes, etc.)
# === SNIPPETS AND TEMPLATES ===
yasnippet # Template system for inserting code snippets
quelpa-use-package # Package management for packages not in MELPA
# === SNIPPETS AND TEMPLATES ===
yasnippet # Template system for inserting code snippets
quelpa-use-package # Package management for packages not in MELPA
# === VISUAL THEMES ===
grandshell-theme # Dark theme with good contrast
leuven-theme # Light theme designed for readability
# === VISUAL THEMES ===
grandshell-theme # Dark theme with good contrast
leuven-theme # Light theme designed for readability
# === TREE-SITTER GRAMMARS ===
# Modern syntax highlighting and parsing using tree-sitter
treesit-grammars.with-all-grammars # All available tree-sitter language grammars
# === TREE-SITTER GRAMMARS ===
# Modern syntax highlighting and parsing using tree-sitter
treesit-grammars.with-all-grammars # All available tree-sitter language grammars
# === TREE-SITTER BASED MODES ===
# These modes use tree-sitter for better performance and accuracy
awk-ts-mode # AWK script editing with tree-sitter
dart-mode # Dart programming (Flutter development)
graphql-ts-mode # GraphQL query language with tree-sitter
jq-ts-mode # jq JSON processor with tree-sitter
markdown-ts-mode # Markdown with tree-sitter parsing
mermaid-ts-mode # Mermaid diagram syntax with tree-sitter
scala-ts-mode # Scala with tree-sitter (alternative to scala-mode)
swift-ts-mode # Swift programming with tree-sitter
];
extraConfig = builtins.readFile ./emacs/custom.el + ''
;; Yasnippet configuration (generated by nix)
(use-package yasnippet
:init
(setq yas-snippet-dirs '(${snippetDirsLisp}))
:config
(yas-reload-all)
(yas-global-mode 1))
'';
};
# System packages required by various emacs packages
home.packages = with pkgs; [
# Search and file utilities
ripgrep # Required for rg package
# === TREE-SITTER BASED MODES ===
# These modes use tree-sitter for better performance and accuracy
awk-ts-mode # AWK script editing with tree-sitter
dart-mode # Dart programming (Flutter development)
graphql-ts-mode # GraphQL query language with tree-sitter
jq-ts-mode # jq JSON processor with tree-sitter
markdown-ts-mode # Markdown with tree-sitter parsing
mermaid-ts-mode # Mermaid diagram syntax with tree-sitter
scala-ts-mode # Scala with tree-sitter (alternative to scala-mode)
swift-ts-mode # Swift programming with tree-sitter
];
extraConfig = builtins.readFile ./emacs/custom.el;
};
# System packages required by various emacs packages
home.packages = with pkgs; [
# Search and file utilities
ripgrep # Required for rg package
];
}

View File

@@ -386,6 +386,14 @@ frame if FRAME is nil, and to 1 if AMT is nil."
try-expand-list
try-expand-line)))
;; Yet another snippet extension for Emacs.
(use-package yasnippet
:init
(setq yas-snippet-dirs '("~/.emacs.d/snippets/"))
:config
(yas-reload-all)
(yas-global-mode 1))
;; Clean up whitespace
(use-package ethan-wspace
:ensure t

View File

@@ -1,2 +0,0 @@
cc-mode
text-mode

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: A
# key: A
# binding: direct-keybinding
# --
ASSERT_EQ($0)

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: ac
# key: ac
# --
* @param[in] alloc Memory allocator to use.

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: alloc
# key: alloc
# --
const xplat::polymorphic_allocator<> alloc;

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: ator
# key: ator
# --
const xplat::polymorphic_allocator<> alloc;

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: be
# key: be
# --
$1.begin(), $1.end()

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# contributor: York Zhao <gtdplatform@gmail.com>
# name: cerr
# key: cerr
# --
`(progn (save-excursion) (goto-char (point-min)) (unless (re-search-forward
"^using\\s-+namespace std;" nil 'no-errer) "std::"))
`cerr << $0 << '\n';

View File

@@ -1,13 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: class
# key: class
# binding: direct-keybinding
# --
class ${1:Class}
{
public:
$1()
: { }
private:
};

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: cmd
# key: cmd
# --
static void ${1:cmd}(base::Cmd& cmd)
{
$0
}
CMD($1, "$1");

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: constructor
# key: ct
# --
${1:Class}::$1(${2:args}) ${3: : ${4:init}}
{
$0
}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: copy
# key: copy
# binding: direct-keybinding
# --
* Copyright (C) `(format-time-string "%Y" (current-time))` Timo Bingmann <tb@panthema.net>

View File

@@ -1,14 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: copymove
# key: copymove
# binding: direct-keybinding
# expand-env: ((yas-indent-line 'fixed))
# --
//! default copy-constructor
${1:class}(const $1 &) = default;
//! default assignment operator
$1 & operator = (const $1 &) = default;
//! move-constructor: default
$1($1 &&) = default;
//! move-assignment operator: default
$1 & operator = ($1 &&) = default;

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# contributor: York Zhao <gtdplatform@gmail.com>
# name: cout
# key: cout
# --
`(progn (save-excursion) (goto-char (point-min)) (unless (re-search-forward
"^using\\s-+namespace std;" nil 'no-errer) "std::"))
`cout << $0 << '\n';

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: cv
# key: cv
# --
std::cout << "$1 " << $1 << std::endl;

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: d
# key: d
# --
qDebug() <<

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: debug
# key: debug
# binding: direct-keybinding
# --
static constexpr bool debug = true;

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: debugf
# key: debugf
# binding: direct-keybinding
# --
static constexpr bool debug = false;

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: doc
# key: doc
# --
/**
* @brief $1
*/

View File

@@ -1,12 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: dog
# key: dog
# binding: direct-keybinding
# expand-env: ((yas-indent-line 'fixed))
# --
//! \\name $1
//! \\{
$0
//! \\}

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: el
# key: el
# --
<< std::endl

View File

@@ -1,14 +0,0 @@
# -*- mode: snippet -*-
# name: functor
# key: functor
# --
class ${1:Functor}
{
public:
$1($2) { }
void operator () () const {
}
private:
};

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: hi
# key: hi
# --
/*`(make-string (- 78 (current-column)) ?-)`*/

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: i
# key: i
# binding: direct-keybinding
# --
`(if (char-equal ?) (preceding-char)) "," "")` m_${1:var}($1)

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: lock
# key: lock
# binding: direct-keybinding
# --
std::unique_lock<std::mutex> lock$1(mutex$1_);

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: mutexlock
# key: mutexlock
# binding: direct-keybinding
# --
static std::mutex mutex$1;
std::unique_lock<std::mutex> lock$1(mutex$1);

View File

@@ -1,17 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: mysource
# key: mysource
# binding: direct-keybinding
# --
/*******************************************************************************
* $1/<file>
*
* $2
******************************************************************************/
namespace $1 {
} // namespace $1
/******************************************************************************/

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: nl
# key: nl
# --
// NOLINTNEXTLINE($1)

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: noncopy
# key: noncopy
# binding: direct-keybinding
# expand-env: ((yas-indent-line 'fixed))
# --
//! non-copyable: delete copy-constructor
${1:class}(const $1 &) = delete;
//! non-copyable: delete assignment operator
$1 & operator = (const $1 &) = delete;

View File

@@ -1,14 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: noncopymove
# key: noncopymove
# binding: direct-keybinding
# expand-env: ((yas-indent-line 'fixed))
# --
//! non-copyable: delete copy-constructor
${1:class}(const $1 &) = delete;
//! non-copyable: delete assignment operator
$1 & operator = (const $1 &) = delete;
//! move-constructor: default
$1($1 &&) noexcept = default;
//! move-assignment operator: default
$1 & operator = ($1 &&) noexcept = default;

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: namespace
# key: ns
# binding: direct-keybinding
# --
namespace $1 {
$0
} // namespace $1

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: al
# key: al
# --
allocator_type alloc

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: operator>>
# key: op>>
# --
istream& operator>>(istream& s, const ${1:type}& ${2:c})
{
$0
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: operator<
# key: op<
# --
friend bool operator < (const ${1:type}& a, const $1& b)
{
return $0;
}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: operator<<
# key: op<<
# --
friend std::ostream& operator << (std::ostream& os, const ${1:type}& ${2:x})
{
return os << $0;
}

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: os
# key: os
# --
os << " $1=" << x.$1;

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: oso
# key: oso
# --
if (${2:t}.${1:var})
os << " $1=" << $2.$1;

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet -*-
# name: oss
# key: oss
# --
std::ostringstream oss;
oss << $0

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: pe
# key: pe
# --
v.$1 += p.$1;

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: perl
# key: perl
# --
/*[[[perl
$0
]]]*/
//[[[end]]]

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: q
# key: q
# --
db::Query q = cmd.db_.query << "SELECT $1"
<< into(...);
while (q.next())
{
}

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: stdrand
# key: stdrand
# binding: direct-keybinding
# --
std::default_random_engine ${1:name}(std::random_device { } ())

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: stdsleep
# key: stdsleep
# binding: direct-keybinding
# --
std::this_thread::sleep_for(std::chrono::seconds($1));

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: sv
# key: sv
# --
std::string_view

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: svlit
# key: svlit
# --
using namespace std::string_view_literals;

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: timestamp
# key: timestamp
# --
//! Time is measured using chrono::steady_clock
static double timestamp() {
return std::chrono::duration_cast<std::chrono::duration<double> >(
std::chrono::steady_clock::now().time_since_epoch()).count();
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: try
# key: try
# a bit too intrusive now still, not always I want to do this
# --
try {
$0
} catch (${1:std::exception& e}) {
}

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: using_ator
# key: using
# --
using allocator_type = xplat::polymorphic_allocator<>;

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: ls
# key: ls
# --
common::allocate_local_shared

View File

@@ -1,2 +0,0 @@
cc-mode
text-mode

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: hr
# key: hr
# --
################################################################################

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: c
# key: c
# binding: direct-keybinding
# --
/* $1 */

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: cc
# key: cc
# binding: direct-keybinding
# --
/** $1
*/

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: comment-spacerline
# key: ***
# binding: direct-keybinding
# --
/******************************************************************************/

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: for
# key: for
# binding: direct-keybinding
# --
for ($1) {
$0
}

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: fori
# key: fori
# --
for (${1:std::size_t} ${2:i} = ${3:0}; $2 ${4:!= size()}; ++$2) {
$0
}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet -*-
# name: guard
# key: guard
# --
#ifndef ${1:NAME}_HEADER
#define $1_HEADER
$0
#endif // $1_HEADER

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: in
# key: in
# binding: direct-keybinding
# --
#include <$0>

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: inc
# key: inc
# binding: direct-keybinding
# --
#include "$0"

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: main
# key: main
# --
int main(${1:int argc, char *argv[]})
{
$0
return 0;
}

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: packed
# key: packed
# --
__attribute__((__packed__))$0

View File

@@ -1,11 +0,0 @@
# -*- mode: snippet -*-
# name: switch
# key: case
# --
switch (${1:ch}) {
case ${2:const}:
${3:a = b};
break;
${4:default:
${5:action}}
}

View File

@@ -1 +0,0 @@
text-mode

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: cmake_minimum_required
# key: min
# --
cmake_minimum_required(VERSION ${1:2.6})

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: foreach
# key: for
# --
foreach(${1:item} \${${2:array}})
$0
endforeach()

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: function
# key: fun
# --
function (${1:name})
$0
endfunction()

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: hr
# key: hr
# binding: direct-keybinding
# --
`(make-string (- 80 (current-column)) ?#)`

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: if
# key: if
# --
if(${1:cond})
$0
endif()

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: ifelse
# key: if
# --
if(${1:cond})
$2
else(${3:cond})
$0
endif()

View File

@@ -1,5 +0,0 @@
# type: command
# key: inc
# name: include
# --
include ($0)

View File

@@ -1,7 +0,0 @@
# -*- mode: snippet -*-
# name: macro
# key: macro
# --
macro(${1:name}${2: args})
endmacro()

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: message
# key: msg
# --
message(${1:STATUS }"$0")

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: option
# key: opt
# --
option (${1:OPT} "${2:docstring}" ${3:value})

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: project
# key: proj
# --
project ($0)

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: set
# key: set
# --
set(${1:var} ${2:value})

View File

@@ -1 +0,0 @@
text-mode

View File

@@ -1,21 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: package
# key: package
# binding: direct-keybinding
# --
#!/usr/bin/perl -w
package ${1:package};
use strict;
use warnings;
use diagnostics;
use utf8;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw();
our @EXPORT_OK = qw();
1;

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet -*-
# name: perl
# key: perl
# --
#!/usr/bin/env perl
use strict;
use warnings;

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: doc
# key: doc
# binding: direct-keybinding
# --
/* $1 */

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: hr
# key: hr
# --
################################################################################

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: hr
# key: hr
# --
################################################################################

View File

@@ -1,2 +0,0 @@
cc-mode
text-mode

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: hr
# key: hr
# --
/*`(make-string (- 78 (current-column)) ?*)`*/

View File

@@ -1 +0,0 @@
text-mode

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: begin
# key: begin
# binding: direct-keybinding
# --
\begin{${1:environment}}
$0
\end{$1}

View File

@@ -1,12 +0,0 @@
# -*- mode: snippet -*-
# name: cols
# key: cols
# --
\begin{columns}
\begin{column}{${1:.5}\linewidth}
column 1
\end{column}
\begin{column}{${2:.5}\linewidth}
column 2
\end{column}
\end{columns}

View File

@@ -1,8 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: enumerate
# key: enumerate
# binding: direct-keybinding
# --
\begin{enumerate}
\item $0
\end{enumerate}

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: figure
# key: figure
# --
\begin{figure}[ht]
\centering
\includegraphics[${1:options}]{figures/${2:path.pdf}}
\caption{\label{fig:${3:label}} $0}
\end{figure}

View File

@@ -1,10 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: frame
# key: frame
# binding: direct-keybinding
# --
% ------------------------------------------------------------------------------
\begin{frame}{${1:title}}
\end{frame}

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: ho
# key: ho
# --
% ---[ $1 ]-------------------------------------------------

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: hr
# key: hr
# binding: direct-keybinding
# --
% `(make-string (- 80 (current-column)) ?-)`

View File

@@ -1,6 +0,0 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: hrr
# key: hrr
# binding: direct-keybinding
# --
% ==============================================================================

View File

@@ -1,9 +0,0 @@
# -*- mode: snippet -*-
# name: hrx
# key: hrx
# --
% %
%% %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% %%
% %

View File

@@ -1,5 +0,0 @@
# -*- mode: snippet -*-
# name: hx
# key: hx
# --
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Some files were not shown because too many files have changed in this diff Show More