Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Shevchenko ur4ltz

View GitHub Profile
@numToStr
numToStr / au.lua
Last active Sep 22, 2021
Neovim autocmd in lua
View au.lua
--
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua
--
local cmd = vim.api.nvim_command
local function autocmd(this, event, spec)
local is_table = type(spec) == 'table'
local pattern = is_table and spec[1] or '*'
local action = is_table and spec[2] or spec
if type(action) == 'function' then
@folke
folke / lua-lsp.lua
Last active Aug 28, 2021
Correct sumneko lua lsp setup for init.lua and plugin development
View lua-lsp.lua
-- put this file somewhere in your nvim config, like: ~/.config/nvim/lua/config/lua-lsp.lua
-- usage: require'lspconfig'.sumneko_lua.setup(require("config.lua-lsp"))
local library = {}
local path = vim.split(package.path, ";")
-- this is the ONLY correct way to setup your path
table.insert(path, "lua/?.lua")
table.insert(path, "lua/?/init.lua")
@windwp
windwp / livereload.lua
Created Apr 18, 2021
livereload for plugin development on lua
View livereload.lua
#Neovim Trick
Live Reload on plugin development and init.lua
# Demo
# How
* [ ] code
@pkkm
pkkm / git-ml.el
Created Feb 26, 2021
Asynchronous git modeline (rough prototype)
View git-ml.el
;;; Asynchronous detailed git modeline.
;; git-ml is free software: you can redistribute it and/or modify it under the
;; terms of the GNU General Public License as published by the Free Software
;; Foundation, either version 3 of the License, or (at your option) any later
;; version.
;; This is a rough sketch. Things to do before publishing it as a package:
;;
;; * Consider doing the checks per git directory instead of per buffer, then
@TheCedarPrince
TheCedarPrince / init.vim
Last active Jul 17, 2021
My (neo)Vim Configuration File
View init.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIM SETTINGS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" TURNS LINE NUMBERING ON
set nu
" trigger `autoread` when files changes on disk
set autoread
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif
@nezuo
nezuo / testez-selene.md
Last active Jul 16, 2021
TestEZ standard library for selene
View testez-selene.md

Instructions

  1. Copy the file below into one called testez.toml
  2. In selene.toml, replace std = "roblox" with std = "roblox+testez"
@rougier
rougier / nano.el
Created Oct 2, 2020
A very minimal emacs configuration
View nano.el
;; nano.el -- A very minimal emacs
;; Usage: emacs -q -l nano.el
;;
;; Copyright (C) 2020 Nicolas .P Rougier
;;
;; Author: Nicolas P. Rougier <nicolas.rougier@inria.fr>
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@progfolio
progfolio / general-spacemacs.org
Last active Aug 20, 2021
Spacemacs-like menus using general.el
View general-spacemacs.org

Spacemacs-like menus using general.el

Global keybindings

First, we define a global prefix key:

(general-create-definer global-definer
  :keymaps 'override
  :states  '(insert emacs normal hybrid motion visual operator)
  :prefix  "SPC"
  :non-normal-prefix "S-SPC")
@mg979
mg979 / import.vim
Last active Aug 13, 2021
Import Ultisnips snippets in vim-vsnip
View import.vim
" ========================================================================///
" Description: import UltiSnips snippets as VsCode snippets for vim-vsnip
" File: import.vim
" Author: Gianmaria Bajo <mg1979@git.gmail.com>
" License: MIT
" Created: dom 09 agosto 2020 13:14:35
" Modified: dom 09 agosto 2020 15:33:32
" ========================================================================///
function! import#snippets(ask_confirm) abort
@windwp
windwp / i3-swallow.py
Last active Sep 18, 2021
i3-swallow used to swallow a terminal window in i3
View i3-swallow.py
#!/usr/bin/env python3
#-----------------------------------------------
# used to swallow a terminal window in i3
#
# INSTALL
# Install python 3 and install i3ipc libary
# pip3 install i3ipc
# download this scrript and put it to your i3 config folder and run