Skip to content

Instantly share code, notes, and snippets.

@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active November 3, 2024 18:45
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
@hyperupcall
hyperupcall / settings.jsonc
Last active September 19, 2024 16:20
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@gsuuon
gsuuon / colors.lua
Last active July 10, 2024 21:21
My styled wezterm config - just the relevant bits
local wezterm = require 'wezterm'
local color_default_fg_light = wezterm.color.parse("#cacaca") -- 💩
local color_default_fg_dark = wezterm.color.parse("#303030")
return {
VERIDIAN = {
bg = wezterm.color.parse("#4D8060"),
fg = color_default_fg_light
},
@bashbunni
bashbunni / .zshrc
Created January 4, 2023 16:28
CLI Pomodoro for Linux
# study stream aliases
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro
declare -A pomo_options
pomo_options["work"]="45"
pomo_options["break"]="10"
pomodoro () {
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then
val=$1
@echasnovski
echasnovski / neovim-survey-summary_00_description.md
Last active May 22, 2023 17:28
Results of Neovim built-in options survey

This Gist contains results of Neovim built-in options survey. Users were asked to execute certain script (see 'neovim-survey_script.lua') and upload text it produced (comma-separated table of all options which differ from default, plus neovim version and leader key).

There were total 227 legible answers provided for period from 2022-11-22 to 2022-12-08.

Here is a link to Reddit announcement

File description:

@mengwangk
mengwangk / java.lua
Created May 28, 2022 14:49
Neovim for Beginners - Java
local jdtls_ok, jdtls = pcall(require, "jdtls")
if not jdtls_ok then
vim.notify "JDTLS not found, install with `:LspInstall jdtls`"
return
end
-- Installation location of jdtls by nvim-lsp-installer
local JDTLS_LOCATION = vim.fn.stdpath "data" .. "/lsp_servers/jdtls"
-- Data directory - change it to your liking
<head>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- jQuery ui -->
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
</head>
@mengwangk
mengwangk / keymaps.lua
Created February 19, 2022 06:37
Neovim for Beginners - Debugging using DAP
local M = {}
local whichkey = require "which-key"
-- local function keymap(lhs, rhs, desc)
-- vim.keymap.set("n", lhs, rhs, { silent = true, desc = desc })
-- end
function M.setup()
local keymap = {
@VonHeikemen
VonHeikemen / better-netrw.vim
Last active May 19, 2024 20:13
Making a more intuitive netrw
" Open Netrw on the directory of the current file
nnoremap <leader>dd :Lexplore %:p:h<CR>
" Toggle the Netrw window
nnoremap <Leader>da :Lexplore<CR>
if &columns < 90
" If the screen is small, occupy half
let g:netrw_winsize = 50
else
@Saraistupid
Saraistupid / important.md
Last active May 29, 2023 06:20
"ATTENTION TO ALL WINDOWS USERS" by Mental Outlaw

This is a public service announcement to anyone who is foolish enough to still be using Windows 10, Windows 8, Windows 7, Vista, and also Windows XP.

Your operating system is now fully compromised. and no, this isn't the same as Indian scammers trying to hold your data hostage for Google play cards or pictures of bobs and vagens or the CIA backdooring your operating system so they can spy on you, it is far worse than that.

The international hacker known as 4Chan has successfully reverse-engineered your operating system, THEY KNOW THE SOURCE CODE, they observed all of Windows XP vulnerabilities which means they know the vulnerabilities of all Windows operating systems that have come after it, because, let's face it, ever since Windows XP all Microsoft has really done is create some new themes for your desktop and add more spyware to Windows and also push out updates. and things are about to get EVEN WORSE, you thought viruses like WannaCry cause a lot of damage? that's child's play, the viruses of old were c