diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-10-05 13:15:41 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-10-05 13:15:41 -0700 |
commit | 95f941ee802eef6c2c83168fa36addf2e5f27e38 (patch) | |
tree | 2877c3117c4653c3acb3a04a1710555bc90abf6d | |
parent | 48e9e919f6077b41dfc43af6e56734d978a3fb21 (diff) |
chore: checkin
-rw-r--r-- | .config/mutt/usr/gmail | 1 | ||||
-rw-r--r-- | .config/mutt/usr/main | 1 | ||||
-rw-r--r-- | .config/nvim/after/syntax/c.vim | 2 | ||||
-rw-r--r-- | .config/nvim/lua/keybind.lua | 10 | ||||
-rw-r--r-- | .config/nvim/lua/lsp.lua | 23 | ||||
-rw-r--r-- | .config/nvim/lua/settings.lua | 5 | ||||
-rw-r--r-- | .config/nvim/lua/theme.lua | 13 | ||||
-rw-r--r-- | .config/nvim/pack/vendor/packages | 3 | ||||
-rwxr-xr-x | .config/nvim/pack/vendor/update | 19 | ||||
-rw-r--r-- | .config/qutebrowser/config.py | 3 | ||||
-rw-r--r-- | .config/qutebrowser/quickmarks | 2 | ||||
-rw-r--r-- | .config/sway/config | 2 |
12 files changed, 64 insertions, 20 deletions
diff --git a/.config/mutt/usr/gmail b/.config/mutt/usr/gmail index 15bc439..b256faa 100644 --- a/.config/mutt/usr/gmail +++ b/.config/mutt/usr/gmail @@ -7,6 +7,7 @@ set postponed = "+gmail/[Gmail].Drafts" set trash = "+gmail/[Gmail].Trash" set record = "+gmail/[Gmail].Sent Mail" set sendmail = "/usr/bin/msmtp -a gmail" +set copy = no # account specific macros macro index,pager a "<save-message>+gmail/[Gmail].Store<enter>" "Archive Message" diff --git a/.config/mutt/usr/main b/.config/mutt/usr/main index fe4cf57..9df3df5 100644 --- a/.config/mutt/usr/main +++ b/.config/mutt/usr/main @@ -8,6 +8,7 @@ set postponed = "+main/Drafts" set trash = "+main/Trash" set mbox = "+main/Archive" set sendmail = "/usr/bin/msmtp -a main" +set copy = yes # account specific macros macro index,pager a "<save-message>+main/Archive<enter>" "Archive Message" diff --git a/.config/nvim/after/syntax/c.vim b/.config/nvim/after/syntax/c.vim index 04896e7..f09d085 100644 --- a/.config/nvim/after/syntax/c.vim +++ b/.config/nvim/after/syntax/c.vim @@ -1,4 +1,4 @@ -syn keyword cgoInt uint8 uint16 uint32 uint64 int8 int16 int32 int64 uint uintptr intptr byte ubyte sbyte ulong vlong uvlong rune +syn keyword cgoInt uint8 uint16 uint32 uint64 int8 int16 int32 int64 uint uintptr intptr byte ubyte sbyte ushort vshort ulong vlong uvlong rune syn keyword cgoFloat float32 float64 syn keyword cgoType string syn keyword cgoConstant nil diff --git a/.config/nvim/lua/keybind.lua b/.config/nvim/lua/keybind.lua index d97074d..9f33083 100644 --- a/.config/nvim/lua/keybind.lua +++ b/.config/nvim/lua/keybind.lua @@ -23,10 +23,11 @@ vim.api.nvim_set_keymap("n", "<Leader>f", ":Files<CR>", { noremap = true, sile vim.api.nvim_set_keymap("n", "<Leader>b", ":Buffers<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "<Leader>l", ":Lines<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "<Leader>w", ":BLines<CR>", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "<Leader>m", ":Marks<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "<Leader>|", ":wincmd |<CR>", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("n", "<Leader>=", ":wincmd =<CR>", { noremap = true, silent = true }) -vim.api.nvim_set_keymap("n", "<Leader>r", ":wincmd R<CR>", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "<Leader>=", ":wincmd =<CR>", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("n", "<Leader>r", ":wincmd R<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "<Leader><Leader>d", ":Termdebug<CR>", { noremap = true, silent = true }) vim.api.nvim_set_keymap("n", "<Leader><Leader>b", ":Break<CR>", { noremap = true, silent = true }) @@ -50,3 +51,8 @@ vim.api.nvim_set_keymap("x", "<C-l>", "<C-w>l", { noremap = true }) vim.api.nvim_set_keymap("c", "<C-a>", "<Home>", { noremap = true }) vim.api.nvim_set_keymap("c", "<C-e>", "<End>", { noremap = true }) + +-------------------------------------------------------------------------- +-- netrw + +vim.cmd("nmap <unique> <C-r> <Plug>NetrwRefresh") diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 98caa7f..90dfce9 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -1,5 +1,9 @@ -local lsp = require('lspconfig') -local git = require('neogit') +local lsp = require('lspconfig') +local git = require('neogit') +local gitsigns = require('gitsigns') + +-------------------------------------------------------------------------- +-- lsp local setup = function(client, buffer) local function set_keymap(...) vim.api.nvim_buf_set_keymap(buffer, ...) end @@ -13,7 +17,6 @@ local setup = function(client, buffer) set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts) set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) - set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) set_keymap('n', '[c', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts) set_keymap('n', ']c', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts) @@ -36,4 +39,18 @@ vim.lsp.handlers["textDocument/publishDiagnostics"] = vim.lsp.with( } ) +-------------------------------------------------------------------------- +-- neogit + git.setup({}) + +-------------------------------------------------------------------------- +-- gitsigns + +gitsigns.setup({ + keymaps = { + noremap = true, + ['n ]d'] = { expr = true, "&diff ? ']c' : '<cmd>lua require\"gitsigns.actions\".next_hunk()<CR>'"}, + ['n [d'] = { expr = true, "&diff ? '[c' : '<cmd>lua require\"gitsigns.actions\".prev_hunk()<CR>'"}, + } +}) diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index 2d77b7a..e9238b4 100644 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -145,6 +145,5 @@ vim.g.termdebug_wide = 1 -- latex vim.g.tex_flavor = "latex" --- git gutter -vim.g.gitgutter_grep = "" -vim.g.gitgutter_set_sign_backgrounds = 1 +-- headers are c +vim.g.c_syntax_for_h = 1 diff --git a/.config/nvim/lua/theme.lua b/.config/nvim/lua/theme.lua index 83e9c0a..8b14485 100644 --- a/.config/nvim/lua/theme.lua +++ b/.config/nvim/lua/theme.lua @@ -45,7 +45,7 @@ local editor = { Special = { fg = theme[216] }, SpecialKey = { fg = theme[59] }, - NonText = { fg = theme[239] }, + NonText = { fg = theme[237] }, VertSplit = { fg = theme[239] }, LineNr = { fg = theme[101] }, @@ -90,6 +90,8 @@ local editor = { DiffDelete = { bg = theme[95] }, DiffChange = { bg = theme[235] }, DiffText = { bg = theme[52] }, + + Directory = { fg = theme[109] }, } for group, colors in pairs(editor) do highlight(group, colors) end @@ -110,6 +112,7 @@ local syntax = { Operator = { fg = theme[186] }, Structure = { fg = theme[116] }, + Label = { fg = theme[151], style='bold' }, Statement = { fg = theme[108] }, Conditional = { fg = theme[110] }, Repeat = { fg = theme[68], }, @@ -160,11 +163,9 @@ vim.o.pumblend = 20 -- dark-fg = 252, dark-bg = 237 local plugins = { - -- vim-gitgutter - GitGutterAdd = { fg = theme[108], bg = theme[238] }, - GitGutterChange = { fg = theme[68], bg = theme[238] }, - GitGutterDelete = { fg = theme[161], bg = theme[238] }, - GitGutterChangeDelete = { fg = theme[168], bg = theme[238] }, + GitSignsAdd = { fg = theme[65] }, + GitSignsChange = { fg = theme[108] }, + GitSignsDelete = { fg = theme[161] }, } for group, colors in pairs(plugins) do highlight(group, colors) end diff --git a/.config/nvim/pack/vendor/packages b/.config/nvim/pack/vendor/packages index 72e8ddd..0fb301d 100644 --- a/.config/nvim/pack/vendor/packages +++ b/.config/nvim/pack/vendor/packages @@ -5,8 +5,8 @@ neovim/nvim-lspconfig nvim-neorg/neorg nvim-lua/plenary.nvim nvim-treesitter/nvim-treesitter - TimUntersberger/neogit +lewis6991/gitsigns.nvim junegunn/fzf.vim @@ -17,7 +17,6 @@ tpope/vim-commentary simeji/winresizer adelarsq/vim-matchit -airblade/vim-gitgutter lervag/vimtex plasticboy/vim-markdown diff --git a/.config/nvim/pack/vendor/update b/.config/nvim/pack/vendor/update index 5dabe5c..7b55810 100755 --- a/.config/nvim/pack/vendor/update +++ b/.config/nvim/pack/vendor/update @@ -1,13 +1,32 @@ #!/usr/bin/python import os +import shutil import subprocess from glob import glob if __name__ == "__main__": + # ensure our packages are up-to-date with list + names = set() + with open("packages") as pkgs: + for pkg in pkgs: + if pkg == "\n" or pkg.startswith("["): + continue + name = pkg.split("/")[-1] + names.add(name[0:-1]) + + for repo in glob("opt/*/"): + base = repo.split("/")[-2] + if not base in names: + print(f"> removing {base}") + shutil.rmtree(repo) + + cwd = os.getcwd() procs = [] + + # pull in changes for repo in glob("opt/*/"): os.chdir(repo) procs.append(subprocess.Popen(["git", "pull"])) diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py index 7278331..1a18a43 100644 --- a/.config/qutebrowser/config.py +++ b/.config/qutebrowser/config.py @@ -408,6 +408,7 @@ js_whitelist = [ "*://news.ycombinator.com/*", "*://hn.algolia.com/*", "*://duckduckgo.com/*", + "*://gitlab.com/*", "*://app.slack.com/*", "*://*.youtube.com/*", "*://covid19-scenarios.org/*", @@ -424,9 +425,7 @@ for site in js_whitelist: # redirections redirection = { - "reddit.com": methodcaller('setHost', 'old.reddit.com'), "www.reddit.com": methodcaller('setHost', 'old.reddit.com'), - "twitter.com": methodcaller('setHost', 'mobile.twitter.com'), "www.twitter.com": methodcaller('setHost', 'mobile.twitter.com'), } diff --git a/.config/qutebrowser/quickmarks b/.config/qutebrowser/quickmarks index 325c6c6..99e4bee 100644 --- a/.config/qutebrowser/quickmarks +++ b/.config/qutebrowser/quickmarks @@ -7,3 +7,5 @@ npjl https://cheatsheets.quantecon.org/ vae https://github.com/alecokas/flux-vae/blob/master/conv-vae/main.jl vk https://github.com/vinjn/awesome-vulkan#libraries mmo https://www.reddit.com/r/gamedev/comments/2s74pj/writing_a_game_server_protocol_parts_15_ongoing/ +x11 https://github.com/gamedevtech/X11OpenGLWindow/blob/master/X11.cpp +x11egl https://gist.github.com/jfuerth/82b816510bb2cc063c9945baf1093fd9 diff --git a/.config/sway/config b/.config/sway/config index ee830a9..2e461d9 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -9,7 +9,7 @@ font pango:Inconsolata 14 ### Variables # # Logo key. Use Mod1 for Alt. -set $mod Mod4 +set $mod Mod1 # Home row direction keys, like vim set $left h set $down j |