Skip to content

Instantly share code, notes, and snippets.

View edrpls's full-sized avatar
😶‍🌫️

Eder Sánchez edrpls

😶‍🌫️
  • Mexico
  • 22:53 (UTC -06:00)
View GitHub Profile
@edrpls
edrpls / tree-sitter-config.lua
Created January 25, 2021 19:40
tree-sitter-config
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "<tab>",
node_decremental = "<s-tab>",
@edrpls
edrpls / coc-settings.json
Created January 23, 2021 21:40
Jan 2021 CoC Settings
{
"javascript.suggest.enabled": true,
"coc.preferences.enableFloatHighlight": true,
"coc.preferences.formatOnSaveFiletypes": [
"css",
"md",
"markdown",
"javascript",
"typescript",
"html",
@edrpls
edrpls / init.vim
Last active January 25, 2021 19:39
Jan 2021 NeoVim Config
set termguicolors " use terminal colors
set number " show line number
set ruler " show line and column number of cursor
set relativenumber " show lines relative to cursor
set cursorline " show a line where the cursor is
set clipboard^=unnamed,unnamedplus " use the same clipboard as system
" from https://github.com/neoclide/coc.nvim
set hidden " hide buffers when abandoned
" prevent tsserver from recompiling project on save
" https://github.com/neoclide/coc.nvim/issues/649
{
"tsserver.npm": "/home/eder/.npm-global/lib/node_modules",
"coc.preferences.hoverTarget": "float",
"coc.preferences.enableFloatHighlight": true,
"coc.preferences.useQuickfixForLocations": true,
"suggest.enablePreview": true,
"tsserver.enable": true,
"typescript.suggestionActions.enabled": false,
"javascript.suggestionActions.enabled": false,
"eslint.nodePath": "/home/eder/.npm-global/lib/node_modules",
@edrpls
edrpls / createFluxStore.js
Created June 27, 2018 00:55
Copy of Redux' createStore to ease migrations from Flux to Redux
// This file is base is based on https://github.com/vivek3003/flux-redux-migration, with some modifications
// for flux's actionTypes and other validations
import isPlainObject from 'lodash/isPlainObject';
import { createStore } from 'redux';
/**
* This is a copy of Redux's createStore. Only the dispatch function is modified.
* It passes the action Type as parameter to the callbacks registered by store.subscribe *
* /
@edrpls
edrpls / tmux.conf
Created March 20, 2018 04:31
tmux on antergos
set -sg escape-time 0
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' \
@edrpls
edrpls / init.vim
Last active February 15, 2019 18:44
init.vim on antergos
"set shell=/bin/sh
set termguicolors
set number
set ruler
set relativenumber
set cursorline
set synmaxcol=1000
set clipboard=unnamed
set list listchars=tab:▸\ ,eol:¬,trail:·
@edrpls
edrpls / build.js
Last active January 20, 2023 15:04
npm pack the dist directory of a project with a flat structure
// PRs welcome!
// import system dependencies
const {
lstatSync,
readdirSync,
createReadStream,
createWriteStream,
writeFile,
rename
@edrpls
edrpls / init.vim
Last active January 4, 2023 03:00
My neovim config on WSL/Ubuntu
set shell=/bin/sh
set termguicolors
set number
set ruler
set relativenumber
set cursorline
"set synmaxcol=1000
set clipboard=unnamed
"set list listchars=tab:\ ,eol:¬,trail:
@edrpls
edrpls / init.vim
Last active October 22, 2020 23:07
Current nvim config
set shell=/bin/sh
set termguicolors
set number
set ruler
set relativenumber
set cursorline
set synmaxcol=1000
set clipboard=unnamed
"set list listchars=tab:\ ,eol:¬,trail: