From e5240615187db474a124da74e22f086730a9eefe Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Sun, 29 Oct 2023 07:07:14 +0100 Subject: [PATCH 1/5] Update ssh and nvim config --- dot_config/nvim/lua/plugins/notes.lua | 15 +++++++-------- dot_ssh/config | 10 ++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/dot_config/nvim/lua/plugins/notes.lua b/dot_config/nvim/lua/plugins/notes.lua index 2dffbf3..be1da5c 100644 --- a/dot_config/nvim/lua/plugins/notes.lua +++ b/dot_config/nvim/lua/plugins/notes.lua @@ -7,12 +7,12 @@ return { "renerocksai/calendar-vim", }, opts = { - home = vim.fn.expand("~/doc/zettelkasten"), take_over_my_home = true, auto_set_filetype = true, - -- dailies = home .. '/' .. 'daily', - -- weeklies = home .. '/' .. 'weekly', - -- templates = home .. '/' .. 'templates', + home = "/Users/jan/doc/zettelkasten", + dailies = "/Users/jan/doc/zettelkasten/daily", + weeklies = "/Users/jan/doc/zettelkasten/weekly", + templates = "/Users/jan/doc/zettelkasten/templates", image_subdir = "img", extension = ".md", new_note_filename = "uuid-title", @@ -25,15 +25,15 @@ return { -- template for new notes (new_note, follow_link) -- set to `nil` or do not specify if you do not want a template - -- template_new_note = home .. '/' .. 'templates/new_note.md', + template_new_note = "/Users/jan/doc/zettelkasten/templates/new_note.md", -- template for newly created daily notes (goto_today) -- set to `nil` or do not specify if you do not want a template - -- template_new_daily = home .. '/' .. 'templates/daily.md', + template_new_daily = "/Users/jan/doc/zettelkasten/templates/daily.md", -- template for newly created weekly notes (goto_thisweek) -- set to `nil` or do not specify if you do not want a template - -- template_new_weekly= home .. '/' .. 'templates/weekly.md', + template_new_weekly = "/Users/jan/doc/zettelkasten/templates/weekly.md", -- image link style -- wiki: ![[image name]] @@ -78,7 +78,6 @@ return { vim.api.nvim_set_hl(0, "tkBrackets", { fg = "gray", bg = "gray" }) end, }, - { "nvim-neorg/neorg", build = ":Neorg sync-parsers", diff --git a/dot_ssh/config b/dot_ssh/config index 731e1e1..61c555a 100644 --- a/dot_ssh/config +++ b/dot_ssh/config @@ -12,6 +12,16 @@ Hostname cshpc.rrze.uni-erlangen.de ForwardAgent no User unrz254 +Host moodle +Hostname moodle.nhr.fau.de +ForwardAgent no +User moodle + +Host moebiusband +Hostname server.moebiusband.org +ForwardAgent no +User jan + Host fritz HostName fritz ForwardAgent no From 799afe0afb74f4d862472bd193f9b46cad4a0642 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Tue, 31 Oct 2023 07:06:37 +0100 Subject: [PATCH 2/5] Update tmux config --- dot_tmux.conf.tmpl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dot_tmux.conf.tmpl b/dot_tmux.conf.tmpl index fc0bcd9..e09694c 100644 --- a/dot_tmux.conf.tmpl +++ b/dot_tmux.conf.tmpl @@ -24,9 +24,14 @@ bind -n M-4 select-window -t 4 bind -n M-5 select-window -t 5 bind -n M-6 select-window -t 6 -# Linux system clipboard +{{- if eq .chezmoi.os "darwin" }} +bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' +bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' +bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' +{{- else }} bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard" +{{- end }} # enable vi mode setw -g mode-keys vi From ddaf2d72336462861a02ab30e8f33aff46c5e924 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Tue, 14 Nov 2023 15:51:49 +0100 Subject: [PATCH 3/5] Update ignores for nvim on Macos --- .chezmoiignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chezmoiignore b/.chezmoiignore index 3921257..8ba4048 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -8,7 +8,7 @@ LICENSE .Xresources .xsession .config/openbox/* -.config/nvim/after +.config/nvim/after/* {{ else }} lazyvim.json stylua.toml From 4b140ef5189a163a1e5019064754b2ee33479642 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 15 Nov 2023 15:57:38 +0100 Subject: [PATCH 4/5] Adapt ignore file. Update config. --- .chezmoiignore | 2 +- dot_config/nvim/lua/config/options.lua | 2 +- dot_ssh/config | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.chezmoiignore b/.chezmoiignore index 8ba4048..3921257 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -8,7 +8,7 @@ LICENSE .Xresources .xsession .config/openbox/* -.config/nvim/after/* +.config/nvim/after {{ else }} lazyvim.json stylua.toml diff --git a/dot_config/nvim/lua/config/options.lua b/dot_config/nvim/lua/config/options.lua index d95943a..94c8568 100644 --- a/dot_config/nvim/lua/config/options.lua +++ b/dot_config/nvim/lua/config/options.lua @@ -5,5 +5,5 @@ if vim.g.neovide then vim.g.neovide_cursor_animation_length = 0 vim.o.guifont = "BrutalistMono Nerd Font Regular:h16" - vim.g.neovide_theme = "auto" + vim.g.neovide_theme = "dark" end diff --git a/dot_ssh/config b/dot_ssh/config index 61c555a..bffca0d 100644 --- a/dot_ssh/config +++ b/dot_ssh/config @@ -62,6 +62,13 @@ Host gondor Hostname 192.168.178.60 ForwardAgent no +Host rohan +HostName rohan +ForwardAgent no +User jan +ProxyJump cshpc + +ProxyJump cshpc Host gitolite Hostname moebiusband.org ForwardAgent no From e27d2ef1609afe2b8447297f229c66bf380593ae Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Fri, 17 Nov 2023 20:15:04 +0100 Subject: [PATCH 5/5] Fix tmux undercurl. Add neorg config to nvim --- dot_config/nvim/lua/config/autocmds.lua | 7 +++++++ dot_config/nvim/lua/config/options.lua | 12 ++++++++++++ dot_config/nvim/lua/plugins/notes.lua | 19 +++++++++++++++++-- dot_tmux.conf.tmpl | 6 +++--- 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/dot_config/nvim/lua/config/autocmds.lua b/dot_config/nvim/lua/config/autocmds.lua index 27e9e06..5f87d5a 100644 --- a/dot_config/nvim/lua/config/autocmds.lua +++ b/dot_config/nvim/lua/config/autocmds.lua @@ -1,3 +1,10 @@ -- Autocmds are automatically loaded on the VeryLazy event -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Add any additional autocmds here +vim.api.nvim_create_autocmd("FileType", { + pattern = { "norg" }, + callback = function() + vim.opt_local.wrap = true + vim.opt_local.spell = true + end, +}) diff --git a/dot_config/nvim/lua/config/options.lua b/dot_config/nvim/lua/config/options.lua index 94c8568..0bd805a 100644 --- a/dot_config/nvim/lua/config/options.lua +++ b/dot_config/nvim/lua/config/options.lua @@ -6,4 +6,16 @@ if vim.g.neovide then vim.g.neovide_cursor_animation_length = 0 vim.o.guifont = "BrutalistMono Nerd Font Regular:h16" vim.g.neovide_theme = "dark" + vim.keymap.set("n", "", ":w") -- Save + vim.keymap.set("v", "", '"+y') -- Copy + vim.keymap.set("n", "", '"+P') -- Paste normal mode + vim.keymap.set("v", "", '"+P') -- Paste visual mode + vim.keymap.set("c", "", "+") -- Paste command mode + vim.keymap.set("i", "", 'l"+Pli') -- Paste insert mode end + +-- Allow clipboard copy paste in neovim +vim.api.nvim_set_keymap("", "", "+p", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("!", "", "+", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("t", "", "+", { noremap = true, silent = true }) +vim.api.nvim_set_keymap("v", "", "+", { noremap = true, silent = true }) diff --git a/dot_config/nvim/lua/plugins/notes.lua b/dot_config/nvim/lua/plugins/notes.lua index be1da5c..cff6e3a 100644 --- a/dot_config/nvim/lua/plugins/notes.lua +++ b/dot_config/nvim/lua/plugins/notes.lua @@ -81,17 +81,32 @@ return { { "nvim-neorg/neorg", build = ":Neorg sync-parsers", - dependencies = { "nvim-lua/plenary.nvim" }, + dependencies = { { "nvim-lua/plenary.nvim" }, { "nvim-neorg/neorg-telescope" } }, opts = { load = { ["core.defaults"] = {}, - ["core.concealer"] = {}, -- Adds pretty icons to your documents + ["core.concealer"] = {}, + ["core.completion"] = { + config = { + engine = "nvim-cmp", + name = "[Norg]", + }, + }, + ["core.integrations.nvim-cmp"] = {}, + ["core.integrations.telescope"] = {}, + ["core.esupports.metagen"] = { + config = { + type = "auto", + }, + }, ["core.dirman"] = { -- Manages Neorg workspaces config = { workspaces = { notes = "~/doc/notes/private", work = "~/doc/notes/work", }, + default_workspace = "work", + index = "index.norg", }, }, }, diff --git a/dot_tmux.conf.tmpl b/dot_tmux.conf.tmpl index e09694c..e0898ce 100644 --- a/dot_tmux.conf.tmpl +++ b/dot_tmux.conf.tmpl @@ -3,8 +3,8 @@ set -g prefix C-a bind C-a send-prefix set -g base-index 1 -set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' -set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' +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 # Basic functions bind -n M-n new-window @@ -52,7 +52,7 @@ set -g display-time 4000 set -g status-interval 5 # upgrade $TERM -set -g default-terminal "screen-256color" +set -g default-terminal "tmux-256color" set-option -sa terminal-features ',{{ .term }}:RGB' # emacs key bindings in tmux command prompt (prefix + :) are better than