Adopt nvim config. Remove passwds from mail setup

This commit is contained in:
Jan Eitzinger 2024-04-26 14:31:04 +02:00
parent f3a93169b4
commit b4107ea0b5
15 changed files with 1352 additions and 1408 deletions

View File

@ -27,13 +27,15 @@ local o = vim.opt
o.encoding = "utf-8"
o.backspace = "indent,eol,start" -- backspace works on every char in insert mode
o.completeopt = { 'menu', 'menuone', 'noselect' }
o.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
o.history = 1000
o.startofline = true
o.title = true
o.clipboard = 'unnamedplus'
o.mouse = "a" -- Enable mouse mode
-- Mapping waiting time
o.timeoutlen = 200
o.timeoutlen = 300
o.ttimeoutlen = 0
-- Spellchecker
@ -45,19 +47,22 @@ o.thesaurus = HOME .. '/.vim/thesaurus/english.txt'
-- Display
o.showmatch = true -- show matching brackets
o.colorcolumn = '90'
o.confirm = true -- Confirm to save changes before exiting modified buffer
o.cursorline = true
o.scrolloff = 8 -- always show 3 rows from edge of the screen
o.scrolloff = 4 -- always show 3 rows from edge of the screen
o.splitbelow = true
o.splitkeep = "screen"
o.splitright = true
o.virtualedit = 'block'
o.synmaxcol = 300 -- stop syntax highlight after x lines for performance
o.laststatus = 2 -- always show status line
o.list = false -- do not display white characters
o.laststatus = 3 -- always show status line
o.list = true -- do not display white characters
o.termguicolors = true
o.background = "dark"
o.wrap = false --do not wrap lines even if very long
o.eol = false -- show if there's no eol char
o.showbreak = '↪' -- character to show when line is broken
o.pumblend = 10 -- Popup blend
o.pumheight = 10 -- Maximum number of entries in a popup
-- Folding
-- o.foldenable = true
@ -85,32 +90,37 @@ o.ruler = false
o.showmode = false
-- Search
o.grepformat = "%f:%l:%c:%m"
o.grepprg = "rg --vimgrep"
o.incsearch = true -- starts searching as soon as typing, without enter needed
o.hlsearch = true -- highlighting of search matches
o.ignorecase = true -- ignore letter case when searching
o.smartcase = true -- case insentive unless capitals used in search
o.wildignorecase = true
o.inccommand = "nosplit" -- preview incremental substitute
o.matchtime = 2 -- delay before showing matching paren
o.mps = vim.o.mps .. ",<:>"
-- White characters
o.smartindent = true
o.breakindent = true
o.tabstop = 4
o.shiftwidth = 4 -- indentation rule
o.softtabstop = 4
o.tabstop = 2
o.shiftwidth = 2 -- indentation rule
o.softtabstop = 2
o.expandtab = true -- expand tab to spaces
o.smarttab = true
o.shiftround = true -- Round indent
-- Shortmess
o.shortmess = o.shortmess
+ {
A = true, -- don't give the "ATTENTION" message when an existing swap file is found.
-- A = true, -- don't give the "ATTENTION" message when an existing swap file is found.
I = true, -- don't give the intro message when starting Vim |:intro|.
W = true, -- don't give "written" or "[w]" when writing a file
c = true, -- don't give |ins-completion-menu| messages
m = true, -- use "[+]" instead of "[Modified]"
C = true, -- don't give |ins-completion-menu| messages
-- m = true, -- use "[+]" instead of "[Modified]"
}
-- Format options
@ -121,6 +131,17 @@ o.formatoptions = o.formatoptions
r = true, -- Pressing Enter will continue comments
}
o.fillchars = {
foldopen = "",
foldclose = "",
-- fold = "⸱",
fold = " ",
foldsep = " ",
diff = "",
eob = " ",
}
o.wildmode = "longest:full,full" -- Command-line completion mode
-- Backup files
o.hidden = true
o.autowrite = true
@ -129,6 +150,8 @@ o.backup = true -- use backup files
o.writebackup = false
o.swapfile = false -- do not use swap file
o.undofile = true
o.undolevels = 10000
o.updatetime = 200 -- Save swap file and trigger CursorHold
o.undodir = HOME .. '/.local/share/nvim/dirs/undo//' -- undo files
o.backupdir = HOME .. '/.local/share/nvim/dirs/backup//' -- backups
@ -141,6 +164,7 @@ vim.cmd([[
au BufRead,BufNewFile *.md set tw=80 syntax=markdown
]])
vim.g.markdown_recommended_style = 0
vim.api.nvim_create_user_command('ReloadConfig', 'source $MYVIMRC', {})
local group = vim.api.nvim_create_augroup('user_cmds', { clear = true })
@ -206,12 +230,16 @@ map('n', '<leader>q', '<cmd>bdelete<CR>')
-- Easier in-file navigation with Tab and S-Tab
map('n', '<S-Tab>', '<C-U>')
map('n', '<Tab>', '<C-D>')
map("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
-- Easy buffer navigation
map('n', '<C-h>', '<C-w>h')
map('n', '<C-j>', '<C-w>j')
map('n', '<C-k>', '<C-w>k')
map('n', '<C-l>', '<C-w>l')
map("n", "[b", "<cmd>bprevious<cr>", { desc = "Prev buffer" })
map("n", "]b", "<cmd>bnext<cr>", { desc = "Next buffer" })
map("n", "<leader>bb", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
map('n', '<up>', '<cmd>resize -2<CR>')
map('n', '<down>', '<cmd>resize +2<CR>')
@ -224,6 +252,5 @@ map("n", "<leader>wd", "<C-W>c", { desc = "Delete window", remap = true })
map("n", "<leader>-", "<C-W>s", { desc = "Split window below", remap = true })
map("n", "<leader>|", "<C-W>v", { desc = "Split window right", remap = true })
{{ else }}
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")
{{ end }}

View File

@ -150,14 +150,6 @@ return {
})
end
},
{{ else }}
{
"hrsh7th/nvim-cmp",
opts = function(_, opts)
local cmp = require("cmp")
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "neorg" } }))
end,
},
{{ end }}
{
"windwp/nvim-autopairs",

View File

@ -7,6 +7,15 @@ return {
version = false, -- last release is way too old and doesn't work on Windows
build = ":TSUpdate",
event = { "VeryLazy" },
init = function(plugin)
-- PERF: add nvim-treesitter queries to the rtp and it's custom query predicates early
-- This is needed because a bunch of plugins no longer `require("nvim-treesitter")`, which
-- no longer trigger the **nvim-treesitter** module to be loaded in time.
-- Luckily, the only things that those plugins need are the custom queries, which we make available
-- during startup.
require("lazy.core.loader").add_to_rtp(plugin)
require("nvim-treesitter.query_predicates")
end,
dependencies = {
{
"nvim-treesitter/nvim-treesitter-textobjects",
@ -35,7 +44,7 @@ return {
end,
},
},
cmd = { "TSUpdateSync" },
cmd = { "TSUpdateSync", "TSUpdate", "TSInstall" },
keys = {
{ "<c-space>", desc = "Increment selection" },
{ "<bs>", desc = "Decrement selection", mode = "x" },
@ -60,6 +69,7 @@ return {
"python",
"query",
"regex",
"svelte",
"toml",
"tsx",
"typescript",

View File

@ -369,6 +369,7 @@ return {
})
end,
},
{
"yamatsum/nvim-nonicons",
dependencies = { "nvim-tree/nvim-web-devicons" },
@ -377,7 +378,6 @@ return {
-- ui components
{ "MunifTanjim/nui.nvim", lazy = true },
{{ else }}
-- change lualine
{
@ -397,6 +397,7 @@ return {
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "Visual" })
end,
},
{
"NvChad/nvim-colorizer.lua",
opts = function(_, opts)
@ -416,6 +417,7 @@ return {
}
end,
},
{
"nvimdev/dashboard-nvim",
event = "VimEnter",
@ -511,10 +513,9 @@ return {
return opts
end,
},
{
"stevearc/oil.nvim",
opts = {},
-- Optional dependencies
dependencies = { "nvim-tree/nvim-web-devicons" },
},
}

View File

@ -0,0 +1,5 @@
syncthing -no-browser -home="/home/jan/.config/syncthing" &
unclutter -root -idle 2 -noevents &
xidle -timeout 300 -program "/usr/local/bin/slock" &
feh --no-fehbg --bg-center '/home/jan/.config/background.png'
tint2&

64
dot_mbsyncrc Normal file
View File

@ -0,0 +1,64 @@
#################################
###### Account moebius ##########
#################################
IMAPAccount moebius
Host mail.moebiusband.org
User jan
PassCmd "keepassxc-cli show /home/jan/doc/private/Passwords.kdbx server/moebiusband.org -a password"
SSLType IMAPS
SSLVersions TLSv1.2
CertificateFile /etc/ssl/cert.pem
# Remote storage
IMAPStore moebius-remote
Account moebius
# Local storage
MaildirStore moebius-local
Path ~/.mail/moebius/
Inbox ~/.mail/moebius/INBOX
Channel moebius-inbox
Far :moebius-remote:"INBOX"
Near :moebius-local:INBOX
Create Both
Expunge Both
Channel moebius-archive
Far :moebius-remote:"Archive"
Near :moebius-local:archive
Create Both
Expunge Both
Channel moebius-drafts
Far :moebius-remote:"Drafts"
Near :moebius-local:drafts
Create Both
Expunge Both
Channel moebius-sent
Far :moebius-remote:"Sent"
Near :moebius-local:sent
Create Both
Expunge Both
Channel moebius-trash
Far :moebius-remote:"Trash"
Near :moebius-local:trash
Create Both
Expunge Both
#Channel moebius-junk
#Master :moebius-remote:"Junk"
#Slave :moebius-local:junk
#Create Both
#Expunge Both
Group moebius
Channel moebius-inbox
Channel moebius-archive
Channel moebius-drafts
Channel moebius-sent
Channel moebius-trash
#Channel moebius-junk

14
dot_msmtprc Normal file
View File

@ -0,0 +1,14 @@
defaults
auth on
tls on
tls_trust_file /etc/ssl/cert.pem
logfile ~/.local/state/msmtp/msmtp.log
account moebius
host mail.moebiusband.org
port 587
user jan
passwordeval "keepassxc-cli show /home/jan/doc/private/Passwords.kdbx server/moebiusband.org -a password"
from jan@moebiusband.org
account default : moebius

View File

@ -3,6 +3,7 @@ set -g prefix C-a
bind C-a send-prefix
set -g base-index 1
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m' # undercurl support
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0

View File

@ -69,5 +69,5 @@ export XDG_CONFIG_HOME="$HOME/.config"
export PATH=/opt/homebrew/bin:$PATH
{{- end }}
{{- end }}
eval "$(atuin init zsh)"
{{- end }}
eval "$(atuin init zsh)"

View File

@ -26,13 +26,6 @@ xinput set-prop /dev/wsmouse 'WS Pointer Wheel Emulation Timeout' 500
export LC_CTYPE="en_US.UTF-8"
export HOME=/home/jan
export PATH=$HOME/.local/bin:/usr/local/bin:$HOME/go/bin:$PATH
{{- if eq .chezmoi.os "openbsd" }}
syncthing -no-browser -home="/home/jan/.config/syncthing" &
unclutter -root -idle 2 -noevents &
xidle -timeout 300 -program "/usr/local/bin/slock" &
{{- end }}
xrdb -merge $HOME/.Xresources
/home/jan/.fehbg&
exec openbox-session

View File

@ -1,142 +0,0 @@
#################################
###### Account moebius ##########
#################################
IMAPAccount moebius
Host mail.moebiusband.org
User jan
Pass {{ (keepassxc "moebiusband.org").Password }}
SSLType IMAPS
SSLVersions TLSv1.2
CertificateFile /etc/ssl/cert.pem
# Remote storage
IMAPStore moebius-remote
Account moebius
# Local storage
MaildirStore moebius-local
Path ~/.mail/moebius/
Inbox ~/.mail/moebius/INBOX
Channel moebius-inbox
Master :moebius-remote:"INBOX"
Slave :moebius-local:INBOX
Create Both
Expunge Both
Channel moebius-archive
Master :moebius-remote:"Archive"
Slave :moebius-local:archive
Create Both
Expunge Both
Channel moebius-drafts
Master :moebius-remote:"Drafts"
Slave :moebius-local:drafts
Create Both
Expunge Both
Channel moebius-sent
Master :moebius-remote:"Sent"
Slave :moebius-local:sent
Create Both
Expunge Both
Channel moebius-trash
Master :moebius-remote:"Trash"
Slave :moebius-local:trash
Create Both
Expunge Both
#Channel moebius-junk
#Master :moebius-remote:"Junk"
#Slave :moebius-local:junk
#Create Both
#Expunge Both
Group moebius
Channel moebius-inbox
Channel moebius-archive
Channel moebius-drafts
Channel moebius-sent
Channel moebius-trash
#Channel moebius-junk
#################################
######## Account fau ############
#################################
IMAPAccount fau
Host groupware.fau.de
User fauad\\unrz254
Pass {{ (keepassxc "IDM FAU").Password }}
SSLType STARTTLS
SSLVersions TLSv1.2
CertificateFile /etc/ssl/cert.pem
# Remote storage
IMAPStore fau-remote
Account fau
# Local storage
MaildirStore fau-local
Path ~/.mail/fau/
Inbox ~/.mail/fau/INBOX
Channel fau
Master :fau-remote:
Slave :fau-local:
Patterns * !Calendar !Contacts "!Suggested Contacts"
Create Both
SyncState *
#################################
####### Account gmail ###########
#################################
IMAPAccount gmail
Host imap.gmail.com
User jan.treibig@gmail.com
PassCmd "keepassxc-cli show /home/jan/doc/private/Passwords.kdbx sso/Google -a password"
SSLType IMAPS
CertificateFile /etc/ssl/cert.pem
IMAPStore gmail-remote
Account gmail
MaildirStore gmail-local
Subfolders Verbatim
Path ~/.mail/gmail/
Inbox ~/.mail/gmail/INBOX
Channel sync-googlemail-default
Master :gmail-remote:
Slave :gmail-local:
Patterns "INBOX"
Create Slave
Channel sync-googlemail-sent
Master :gmail-remote:"[Gmail]/Sent Mail"
Slave :gmail-local:sent
Create Slave
Channel sync-googlemail-archive
Master :gmail-remote:"[Gmail]/All Mail"
Slave :gmail-local:archive
Create Slave
# Get all the channels together into a group.
Group gmail
Channel sync-googlemail-default
Channel sync-googlemail-sent
Channel sync-googlemail-archive
#Channel gmail
#Master :gmail-remote:
#Slave :gmail-local:
#Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"
#Sync Pull
#Create Slave
#SyncState *

View File

@ -1,21 +0,0 @@
defaults
auth on
tls on
tls_trust_file /etc/ssl/cert.pem
logfile ~/.msmtp.log
account moebius
host mail.moebiusband.org
port 587
user jan
password {{ (keepassxc "moebiusband.org").Password }}
from jan@moebiusband.org
account fau
host groupware.fau.de
port 587
user unrz254
password {{ (keepassxc "IDM FAU").Password }}
from jan.eitzinger@fau.de
account default : moebius