Skip to content

Instantly share code, notes, and snippets.

Avatar
🤗
remote work is the best work

Eder Sánchez edrpls

🤗
remote work is the best work
  • Mexico
View GitHub Profile
View tree-sitter-config.lua
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 Jan 23, 2021
Jan 2021 CoC Settings
View coc-settings.json
{
"javascript.suggest.enabled": true,
"coc.preferences.enableFloatHighlight": true,
"coc.preferences.formatOnSaveFiletypes": [
"css",
"md",
"markdown",
"javascript",
"typescript",
"html",
@edrpls
edrpls / init.vim
Last active Jan 25, 2021
Jan 2021 NeoVim Config
View init.vim
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
View coc-settings.json
{
"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 Jun 27, 2018
Copy of Redux' createStore to ease migrations from Flux to Redux
View createFluxStore.js
// 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 Mar 20, 2018
tmux on antergos
View tmux.conf
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 Feb 15, 2019
init.vim on antergos
View init.vim
"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 Mar 10, 2018
npm pack the dist directory of a project with a flat structure
View build.js
// PRs welcome!
// import system dependencies
const {
lstatSync,
readdirSync,
createReadStream,
createWriteStream,
writeFile,
rename
@edrpls
edrpls / init.vim
Last active Dec 25, 2021
My neovim config on WSL/Ubuntu
View init.vim
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 Oct 22, 2020
Current nvim config
View init.vim
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: