Skip to content

Instantly share code, notes, and snippets.

@pwang2
pwang2 / init-prev.vim
Last active December 31, 2023 02:37
nvim config files
" vim: foldmethod=marker:foldmarker={{{,}}}:foldlevelstart=0:foldclose=all:
set title
set wrap
set splitright
set expandtab
set splitbelow
set number
set relativenumber
set termguicolors
set nofoldenable
require('mason-lspconfig').setup {
ensure_installed = {
'lua_ls',
'vimls',
-- 'yamlls',
'azure_pipelines_ls',
'volar',
'pyright',
'bashls',
'tsserver',
local cmp = require('cmp')
local lspkind = require('lspkind')
local t = function(str)
return vim.api.nvim_replace_termcodes(str, true, true, true)
end
local fk = vim.api.nvim_feedkeys
vim.g.copilot_no_tab_map = true
vim.g.copilot_assume_mapped = true
local function on_attach(bufnr)
local api = require('nvim-tree.api')
local function opts(desc)
return { desc = 'nvim-tree: ' .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end
-- Default mappings. Feel free to modify or remove as you wish.
--
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-versions"
tap "homebrew/core"
brew "[email protected]"
brew "autojump"
brew "azure-cli"
brew "docker-compose"
brew "fd"
brew "gh"
@pwang2
pwang2 / vi.bat
Last active October 31, 2022 05:24
open windows file using wsl nvim
@echo on
set my_app=/home/linuxbrew/.linuxbrew/bin/nvim
set my_wt_profile="Ubuntu"
set pp=%1
:: remove quote
set pp=%pp:"=%
:: wsl can't handle mapped drive
if "%pp:~1,1%"==":" (
if not "%pp:~0,1%"=="C" (
@pwang2
pwang2 / windows.ahk
Last active October 31, 2022 05:25
Autohotkey settings to help switch between windows and mac easier
CapsLock::Esc
return
MButton::
Send ^w
return
+!r::
Reload
TrayTip "Reload", "Success"
@pwang2
pwang2 / init-prev.vim
Last active August 12, 2024 19:33
init-prev.vim - vimscript config
" vim: foldmethod=marker:foldmarker={{{,}}}:foldlevelstart=0:foldclose=all:
set title
set wrap
set splitright
set expandtab
set splitbelow
set number
set relativenumber
set termguicolors
set nofoldenable
# Reconstructed via infocmp from file: /usr/local/Cellar/ncurses/6.3/share/terminfo/74/tmux-256color
tmux-256color|tmux with 256 colors,
OTbs, OTpt, am, hs, km, mir, msgr, xenl, AX, G0,
colors#0x100, cols#80, it#8, lines#24, pairs#0x32767, U8#1,
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[J, cnorm=\E[34h\E[?25h, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\EM,
local config_path = vim.fn.stdpath('config')
local status_ok, alpha = pcall(require, 'alpha')
if not status_ok then return end
local path_ok, path = pcall(require, 'plenary.path')
if not path_ok then return end
local nwd = require('nvim-web-devicons')
local dashboard = require('alpha.themes.dashboard')