This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## type "nvim ~/.gitconfig" on shell and paste the following | |
[user] | |
name = # your username | |
email = # your e-mail | |
[alias] | |
ci = commit | |
co = checkout | |
cm = checkout main | |
cb = checkout -b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- autosave.lua script | |
-- Fork from: https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef | |
local options = require 'mp.options' | |
local o = { | |
save_period = 60 | |
} | |
options.read_options(o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.accessibilitySupport": "off", | |
"editor.cursorSmoothCaretAnimation": false, | |
"editor.find.addExtraSpaceOnTop": false, | |
"editor.fontFamily": "JetBrainsMono Nerd Font, JetBrains Mono, Fira Code, monospace", | |
"editor.fontLigatures": "'ss01', 'ss02', 'ss03', 'ss06', 'zero'", | |
"editor.fontSize": 14, | |
"editor.glyphMargin": true, | |
"editor.guides.bracketPairs": "active", | |
"editor.inlineSuggest.enabled": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim.opt.cmdheight = 1 | |
vim.opt.encoding = "utf-8" | |
vim.scriptencoding = "utf-8" | |
vim.opt.fileencoding = "utf-8" | |
vim.opt.expandtab = true | |
vim.opt.hidden = true | |
vim.opt.hlsearch = true | |
vim.opt.ignorecase = true | |
vim.opt.incsearch = true | |
vim.opt.laststatus = 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ok, formatter = pcall(require, "formatter") | |
if not ok then | |
return | |
end | |
local util = require "formatter.util" | |
local find_git_ancestor = function () | |
local path = util.get_current_buffer_file_path() | |
local root = path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local M = {} | |
local function return_project_root() | |
local path = vim.fn.expand "%:p:h" | |
local git_path = vim.fn.finddir(".git", path .. ";") | |
local git_file = vim.fn.findfile(".git", path .. ";") | |
if git_path == "" and git_file == "" then | |
return nil | |
else | |
return vim.fn.fnamemodify(git_path, ":h") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
config_file="$HOME/.config/datsvault.json" | |
if [ ! -e "$config_file" ]; then | |
echo "Config file '$config_file' does not exist. Creating one..." | |
mkdir -p "$HOME/.config" | |
echo '{"vault_path": "'"$HOME/.config/datsvault"'", "terminal": "alacritty", "vault_repo": "null"}' > "$config_file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
variant=$1 | |
if [ -z "$WAYLAND_DISPLAY" ]; then | |
if [ "$variant" = "intl" ]; then | |
setxkbmap -layout us -variant intl | |
notify-send -t 2000 "Keyboard layout" "Switched to international" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Calls GPT-4 to fill holes in the current file, | |
" omitting collapsed folds to save prompt space | |
local M = {} | |
local function save_visible_lines(dest) | |
local visible_lines = {} | |
local lnum = 1 | |
while lnum <= vim.fn.line('$') do | |
if vim.fn.foldclosed(lnum) == -1 then |