Skip to content

Commit

Permalink
🍬
Browse files Browse the repository at this point in the history
  • Loading branch information
mikker committed Apr 4, 2024
1 parent 11f7611 commit 4ecd239
Show file tree
Hide file tree
Showing 18 changed files with 194 additions and 140 deletions.
84 changes: 42 additions & 42 deletions git/gitconfig.symlink
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
; vim: set ft=gitconfig
[user]
name = Mikkel Malmberg
email = [email protected]
signingkey = 7B09867145A39CC3
name = Mikkel Malmberg
email = [email protected]
signingkey = 7B09867145A39CC3
[color]
diff = auto
status = auto
branch = auto
ui = true
diff = auto
status = auto
branch = auto
ui = true
[github]
user = mikker
user = mikker
[alias]
br = branch
ci = commit
co = checkout
hammer = commit --allow-empty -m 🔨
last = log -1 HEAD
rb = rebase
st = status
sw = switch
tree = "log --graph --decorate --abbrev=commit"
undo = reset HEAD~1 --mixed
up = pull --rebase --autostash
upto = "branch --set-upstream-to"
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
qs = "!git add -A && git commit -qm 'QuickSave'"
br = branch
ci = commit
co = checkout
hammer = commit --allow-empty -m 🔨
last = log -1 HEAD
rb = rebase
st = status
sw = switch
tree = "log --graph --decorate --abbrev=commit"
undo = reset HEAD~1 --mixed
up = pull --rebase --autostash
upto = "branch --set-upstream-to"
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
qs = "!git add -A && git commit -qm 'QuickSave'"
[core]
excludesfile = ~/.gitignore
editor = nvim
excludesfile = ~/.gitignore
editor = nvim
[format]
pretty=format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset
pretty=format:%C(yellow)%h%Creset -%C(red)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset
[push]
default = current
default = current
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[url "https://github.com"]
insteadOf = git:https://github.com
insteadOf = git:https://github.com
[stash]
showPatch = true
showPatch = true
[rebase]
autostash = true
autostash = true
[log]
decorate = full
decorate = full
[pull]
ff = only
rebase = true
ff = only
rebase = true
[credential]
helper = osxkeychain
helper = osxkeychain
[credential "https://github.com"]
username = mikker
username = mikker
[commit]
gpgsign = true
gpgsign = true
[merge]
tool = diffconflicts
[mergetool]
prompt = false
prompt = false
keepBackup = false
[difftool]
prompt = false
prompt = false
[mergetool "diffconflicts"]
cmd = nvim -c DiffConflictsWithHistory \"$MERGED\" \"$BASE\" \"$LOCAL\" \"$REMOTE\"
trustExitCode = true
[init]
defaultBranch = main
defaultBranch = main
1 change: 0 additions & 1 deletion hammerspoon/hammerspoon.symlink/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ for key, app in pairs(charsToApps) do
end)
end

require("hjkl")
require("caffeine")
require("window-management")
require("mouse_four_five")
Expand Down
16 changes: 16 additions & 0 deletions hammerspoon/hammerspoon.symlink/window-management/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,22 @@ hs.hotkey.bind(hyper, "L", function()
hs.grid.set(win, { x = 6, y = 0, w = 6, h = 12 }, win:screen())
end)

hs.hotkey.bind(hyper, "Left", function()
local win = hs.window.focusedWindow()
if not win then
return
end
hs.grid.set(win, { x = 0, y = 0, w = 6, h = 12 }, win:screen())
end)

hs.hotkey.bind(hyper, "Right", function()
local win = hs.window.focusedWindow()
if not win then
return
end
hs.grid.set(win, { x = 6, y = 0, w = 6, h = 12 }, win:screen())
end)

hs.hotkey.bind(hyper, "O", function()
local win = hs.window.focusedWindow()
if not win then
Expand Down
4 changes: 2 additions & 2 deletions nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"

if not vim.loop.fs_stat(lazypath) then
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
Expand All @@ -8,12 +9,11 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
{
"LazyVim/LazyVim",
opts = { colorscheme = "kanagawabones" },
opts = { colorscheme = "zenbones" },
import = "lazyvim.plugins",
},
{ import = "plugins" },
}, {
install = { colorscheme = { "kanagawabones" } },
checker = { enabled = true },
performance = {
rtp = {
Expand Down
5 changes: 3 additions & 2 deletions nvim/lazyvim.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"extras": [
"lazyvim.plugins.extras.coding.copilot",
"lazyvim.plugins.extras.editor.mini-move",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.typescript",
"lazyvim.plugins.extras.util.mini-hipatterns"
],
"news": {
"NEWS.md": "2123"
"NEWS.md": "3314"
},
"version": 2
"version": 3
}
10 changes: 10 additions & 0 deletions nvim/lua/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,14 @@ fun! <SID>Strip_trailing_whitespace()
call cursor(l:l, l:c)
endfun
noremap <leader>S :call <SID>Strip_trailing_whitespace()<cr>
command! -nargs=0 -bar Qargs execute 'args' QuickfixFilenames()
function! QuickfixFilenames()
let buffer_numbers = {}
for quickfix_item in getqflist()
let qf_bufnr = quickfix_item['bufnr']
let buffer_numbers[qf_bufnr] = bufname(quickfix_item['bufnr'])
endfor
return join(map(values(buffer_numbers), 'fnameescape(v:val)'))
endfunction
]])
13 changes: 8 additions & 5 deletions nvim/lua/config/options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ opt.wrap = true
opt.gdefault = true
opt.listchars:append({ trail = "·", nbsp = "·" })

opt.statuscolumn = ""

-- Automatic dark mode on boot
if vim.fn.executable("is-this-dark-mode") then
vim.fn.system("is-this-dark-mode")
Expand All @@ -24,7 +26,8 @@ if vim.fn.executable("is-this-dark-mode") then
end

if not vim.fn.has("gui_vimr") then
vim.opt.guifont = { "Iosevka Light", ":h18" }
-- vim.opt.guifont = { "Iosevka Light", ":h20" }
vim.opt.guifont = "Iosevka:h20"
end

local is_ui = vim.fn.has("gui_vimr") == 1 or vim.g.neovide
Expand All @@ -33,11 +36,11 @@ if is_ui then
-- act as in a term
vim.api.nvim_set_keymap("n", "<c-z>", ":term<cr>", {})

vim.cmd([[cd ~/Library/Mobile Documents/27N4MQEA55~pro~writer/Documents]])
-- vim.cmd([[cd ~/Library/Mobile Documents/27N4MQEA55~pro~writer/Documents]])

vim.cmd([[
autocmd VimEnter * if argc() == 0 | normal <leader>ww | endif
]])
-- vim.cmd([[
-- autocmd VimEnter * if argc() == 0 | normal <leader>ww | endif
-- ]])
end

vim.cmd([[
Expand Down
36 changes: 0 additions & 36 deletions nvim/lua/plugins/ai.lua

This file was deleted.

48 changes: 21 additions & 27 deletions nvim/lua/plugins/coding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,36 @@ return {
end,
dependencies = {},
},

{
"hrsh7th/nvim-cmp",
opts = function(_, opts)
local cmp = require("cmp")
opts.mapping = cmp.mapping.preset.insert(vim.tbl_deep_extend("force", opts.mapping, {
["<C-Space>"] = vim.NIL,
["<CR>"] = vim.NIL,
["<Right>"] = cmp.mapping.confirm({ select = false }),
}))
end,
},
-- {
-- "hrsh7th/nvim-cmp",
-- opts = function(_, opts)
-- local cmp = require("cmp")
-- opts.mapping = cmp.mapping.preset.insert(vim.tbl_deep_extend("force", opts.mapping, {
-- ["<C-Space>"] = vim.NIL,
-- -- ["<CR>"] = vim.NIL,
-- ["<Right>"] = cmp.mapping.complete(),
-- ["<C-p>"] = cmp.mapping.complete(),
-- }))
-- opts.completion = {
-- autocomplete = {
-- completeopt = "menu,menuone,noinsert",
-- -- completeopt = "menu,menuone",
-- },
-- }
-- -- opts.experimental = {
-- -- -- ghost_text = false,
-- -- }
-- end,
-- },

{ "echasnovski/mini.pairs", enabled = false },
{
"echasnovski/mini.surround",
opts = {
-- tpope/vim-surround style mappings
mappings = {
add = "ys",
delete = "ds",
find = nil,
highlight = nil,
replace = "cs",
update_n_lines = nil,
},
},
},

-- additions
"tpope/vim-abolish", -- :S smart replace
"tpope/vim-eunuch", -- unix things
"tpope/vim-fugitive", -- git things
"tpope/vim-rhubarb", -- github things
"tpope/vim-projectionist", -- project navigation
"tpope/vim-vinegar", -- fs navigation
"tpope/vim-endwise", -- auto ends

{
Expand Down
7 changes: 6 additions & 1 deletion nvim/lua/plugins/colorscheme.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
return {
{ "mcchrish/zenbones.nvim", dependencies = "rktjmp/lush.nvim", lazy = false, priority = 1000 },
{
"mcchrish/zenbones.nvim",
dependencies = "rktjmp/lush.nvim",
lazy = false,
priority = 1000,
},
}
20 changes: 20 additions & 0 deletions nvim/lua/plugins/editor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,24 @@ return {
"echasnovski/mini.bracketed",
"mbbill/undotree",
"whiteinge/diffconflicts",

{
"stevearc/oil.nvim",
opts = {
delete_to_trash = true,
skip_confirm_for_simple_edits = true,
view_options = {
show_hidden = true,
sort = {
{ "name", "asc" },
{ "type", "asc" },
},
},
},
-- Optional dependencies
dependencies = { "nvim-tree/nvim-web-devicons" },
keys = {
{ "-", "<CMD>Oil<cr>" },
},
},
}
Loading

0 comments on commit 4ecd239

Please sign in to comment.