Skip to content

Instantly share code, notes, and snippets.

@simon-lang
simon-lang / init.lua
Last active February 13, 2023 07:07
init.lua
-- Install packer
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim'
local is_bootstrap = false
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
is_bootstrap = true
vim.fn.system { 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }
vim.cmd [[packadd packer.nvim]]
end
require('packer').startup(function(use)
{
// Require .prettierrc
"prettier.requireConfig": true,
// Show diagnostics for current line
"diagnostic.checkCurrentLine": true,
// Tslint on save
"tslint.enable": true,
"tslint.autoFixOnSave": true,
" https://github.com/neoclide/coc.nvim#example-vim-configuration
inoremap <silent><expr> <c-space> coc#refresh()
" gd - go to definition of word under cursor
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
" gi - go to implementation
nmap <silent> gi <Plug>(coc-implementation)
@simon-lang
simon-lang / .vimrc
Last active October 22, 2021 01:56
syntax on
" colorscheme onedark
set shortmess=I
set backspace=start,eol,indent
" set colorcolumn=80
" set cursorline
set expandtab
set foldlevel=2

Author Search

Step 1:

Use this aggregation:

{
  "aggregations": {
    "result": {
@simon-lang
simon-lang / html.json
Created August 5, 2020 01:53
VSCode HTML Snippets
{
"bind": {
"prefix": "bind",
"body": [
"{{$1}}"
],
"description": ""
},
"message": {
"prefix": "message",
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+y",
"command": "redo",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
"command": "editor.action.moveLinesDownAction",
@simon-lang
simon-lang / settings.json
Last active May 23, 2019 00:37
VSCode Settings
{
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 2,
"editor.renderWhitespace": "boundary",
"files.exclude": {
"dist": true,
"fixtures": true,
"node_modules": true,
"static/timeline*": true
},
@simon-lang
simon-lang / WSL.md
Created May 22, 2019 06:22
Initial WSL setup

ssh

ssh-keygen
cat ~/.ssh/id_rsa.pub

git

const grouped = _.groupBy(this.state.deepAnalysisGroupedBarChart, 'color')
this.state.deepAnalysisMaxValue = max.value
const _encoding = {
x: {
field: 'value',
type: 'quantitative',
scale: {
domain: [0, max.value]
}