clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add micro journal

+2392
micro-journal/configs/lazygit/config.yml

This is a binary file and will not be displayed.

+73
micro-journal/configs/nvim/README.md
··· 1 + # Neovim as a WordProcessor 2 + 3 + This config is Neovim configured to act as a classical wordprocessor to write text and especially markdown. 4 + 5 + 6 + 7 + ### Zen Mode 8 + ![](wordprocessor.jpg) 9 + 10 + > **Note**: Activate `zen-mode` with `leader+z` to get into the focus mode. This will center text, hide tmux when active, and many more. 11 + ### Default with Outline 12 + ![](wordprocessor-outline.jpg) 13 + 14 + ### Micro Journal 15 + This markdown optimized config will be used on a [Micro Journal](https://github.com/unkyulee/micro-journal) device, a modern distraction-free type writer. 16 + 17 + ![](micro-journal.webp) 18 + 19 + 20 + ## Font 21 + I was searching for a font for writing and reading optimized, but still compatible with the terminal (mono-space). As I use Iosevka already for programming, I am trying **Iosevka Etoiole**. 22 + 23 + Install 24 + ```sh 25 + # Install Iosevka Etoile Font for Terminal Writing 26 + 27 + # 1. Install required tools 28 + sudo apt update 29 + sudo apt install curl jq unzip 30 + 31 + # 2. Create temporary directory and move to it 32 + mkdir -p ~/temp/fonts && cd ~/temp/fonts 33 + 34 + # 3. Download latest Iosevka Etoile package 35 + curl -s 'https://api.github.com/repos/be5invis/Iosevka/releases/latest' | \ 36 + jq -r ".assets[] | .browser_download_url" | \ 37 + grep PkgTTC-IosevkaEtoile | \ 38 + xargs -n 1 curl -L -O --fail --silent --show-error 39 + 40 + # 4. Extract the font files 41 + unzip PkgTTC-IosevkaEtoile-*.zip 42 + 43 + # 5. Create font directory (user-level installation) 44 + mkdir -p ~/.local/share/fonts/iosevka-etoile 45 + 46 + # 6. Copy font files to your fonts directory 47 + cp ttc/*.ttc ~/.local/share/fonts/iosevka-etoile/ 48 + 49 + # 7. Update the font cache 50 + sudo fc-cache -f -v 51 + 52 + # 8. Verify installation (should show Iosevka in the output) 53 + fc-list | grep Iosevka 54 + 55 + # 9. Clean up temporary files 56 + cd ~ 57 + rm -rf ~/temp/fonts 58 + ``` 59 + 60 + 61 + ### Using in Terminal 62 + - Open your terminal preferences 63 + - Select "Iosevka Etoile" from the font dropdown 64 + - Adjust the size to your preference (recommended: 12-14pt) 65 + ### Why Iosevka Etoile? 66 + Iosevka Etoile offers: 67 + 68 + - Serif-inspired letterforms that are easy on the eyes for long-form writing 69 + - Terminal compatibility with monospaced alignment 70 + - Narrow width allowing more text on screen 71 + - Elegant aesthetic while maintaining technical requirements 72 + 73 + Alternative would be **Iosekvka Aile**.
+1
micro-journal/configs/nvim/init.lua
··· 1 + require("sspaeti")
+58
micro-journal/configs/nvim/lazy-lock.json
··· 1 + { 2 + "aerial.nvim": { "branch": "master", "commit": "2204cf08791449a6a2fd2ef187a29112eeefd989" }, 3 + "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, 4 + "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, 5 + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 6 + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, 7 + "fzf": { "branch": "master", "commit": "923c3a814de39ff906d675834af634252b3d2b3f" }, 8 + "fzf.vim": { "branch": "master", "commit": "245eaf8e50fe440729056ce8d4e7e2bb5b1ff9c9" }, 9 + "github-nvim-theme": { "branch": "main", "commit": "8db454eb272eabb349209ec62ceb63b8eea5f011" }, 10 + "gruvbox-material": { "branch": "master", "commit": "30e9f4b0fa24c25980df1690a8c47c36e40b6673" }, 11 + "gruvbox.nvim": { "branch": "main", "commit": "15958f5ee43e144856cd2084ce6c571bfdb44504" }, 12 + "highlight-undo.nvim": { "branch": "main", "commit": "a5e2e2d43f6d131bf526619baeeeec32397b0789" }, 13 + "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, 14 + "kanagawa-paper.nvim": { "branch": "master", "commit": "f2e4dfdc6e52a83b41c7d910f241735b4d2fe3f7" }, 15 + "kanagawa.nvim": { "branch": "master", "commit": "709018d5af92d2e5780bfb8a6d36e9cad01a6402" }, 16 + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 17 + "lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" }, 18 + "lualine.nvim": { "branch": "master", "commit": "b8b60c7f1d0d95ad74ee215b2291280b30482476" }, 19 + "markdown.nvim": { "branch": "master", "commit": "dfa0d2def6dbf77e9206b16dc90cad4dd23d55d2" }, 20 + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, 21 + "mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" }, 22 + "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, 23 + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, 24 + "neo-tree.nvim": { "branch": "v3.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" }, 25 + "neovim": { "branch": "main", "commit": "7d1b5c7dcd274921f0f58e90a8bf935f6a95fbf3" }, 26 + "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, 27 + "none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" }, 28 + "nordic.nvim": { "branch": "main", "commit": "8627750ece357e9670f9e69853091f7fbb8d6523" }, 29 + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, 30 + "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, 31 + "nvim-highlight-colors": { "branch": "main", "commit": "b08479aaf715c96151171f01ea47fa6e0c6a612b" }, 32 + "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, 33 + "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" }, 34 + "nvim-prose": { "branch": "main", "commit": "38aac8c9c94a5725d152bdfea374d60e07fb93d6" }, 35 + "nvim-treesitter": { "branch": "master", "commit": "f8aaf5ce4e27cd20de917946b2ae5c968a2c2858" }, 36 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" }, 37 + "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, 38 + "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, 39 + "onedark.nvim": { "branch": "master", "commit": "67a74c275d1116d575ab25485d1bfa6b2a9c38a6" }, 40 + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, 41 + "render-markdown.nvim": { "branch": "main", "commit": "9721ffe230ec90e49c49ee33b5ca44c3fc689214" }, 42 + "solarized-osaka.nvim": { "branch": "main", "commit": "e96ec4bb1a622d969d77bb0b4ffd525ccc44b73a" }, 43 + "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, 44 + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, 45 + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, 46 + "undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" }, 47 + "vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" }, 48 + "vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" }, 49 + "vim-lastplace": { "branch": "master", "commit": "e58cb0df716d3c88605ae49db5c4741db8b48aa9" }, 50 + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, 51 + "vim-system-copy": { "branch": "master", "commit": "8abd9ed21016bdc21b458c79da3b9ac0ee25c1ce" }, 52 + "vim-textobj-user": { "branch": "master", "commit": "41a675ddbeefd6a93664a4dc52f302fe3086a933" }, 53 + "vim-tmux-navigator": { "branch": "master", "commit": "791dacfcfc8ccb7f6eb1c853050883b03e5a22fe" }, 54 + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, 55 + "wpm.nvim": { "branch": "main", "commit": "dba1dd57fe744cd0e09c54fb0b2c334eaed777f8" }, 56 + "yazi.nvim": { "branch": "main", "commit": "a438483e00b1f29694b5afee5578b16073471c7c" }, 57 + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } 58 + }
+12
micro-journal/configs/nvim/lua/sspaeti/init.lua
··· 1 + require("sspaeti.lazy") 2 + require("theme.kanagawa") 3 + require("sspaeti.set") 4 + -- markdown specific: run after set above as it should overwrite default settings 5 + require("sspaeti.remap") 6 + require("sspaeti.set_wp") 7 + 8 + --remove in order to set in set_wp.lua 9 + --vim.opt.listchars = { eol = "↵", tab = "→ ", trail = "·", extends = "$" } 10 + --lead = '·', 11 + vim.opt.list = true 12 +
+30
micro-journal/configs/nvim/lua/sspaeti/lazy.lua
··· 1 + --lazy stuff 2 + local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 3 + if not vim.loop.fs_stat(lazypath) then 4 + vim.fn.system({ 5 + "git", 6 + "clone", 7 + "--filter=blob:none", 8 + "https://github.com/folke/lazy.nvim.git", 9 + "--branch=stable", -- latest stable release 10 + lazypath, 11 + }) 12 + end 13 + vim.opt.rtp:prepend(lazypath) 14 + vim.g.mapleader = " " -- make sure to set `mapleader` before lazy so your mappings are correct 15 + 16 + 17 + --lazy stuff 18 + require("lazy").setup({ { import = "sspaeti.plugins" }, { import = "sspaeti.plugins.lsp" } }, { 19 + install = { 20 + colorscheme = { "vim" }, 21 + }, 22 + checker = { 23 + enabled = false, 24 + notify = false, 25 + }, 26 + --autoreload notification 27 + change_detection = { 28 + notify = false, 29 + }, 30 + })
+44
micro-journal/configs/nvim/lua/sspaeti/plugins/_init_lazy.lua
··· 1 + return { 2 + { "christoomey/vim-system-copy", event = "VeryLazy" }, 3 + { "tpope/vim-surround", event = "VeryLazy" }, -- Surrounding ys', 4 + { "nvim-lua/plenary.nvim", event = "VeryLazy" }, -- Needed for obsidian.nvim 5 + 6 + --Text Objects: 7 + --Utilities for user-defined text objects 8 + { "kana/vim-textobj-user", event = "VeryLazy" }, 9 + { "tpope/vim-commentary", event = "VeryLazy" }, 10 + { "tpope/vim-abolish", event = "VeryLazy" }, 11 + 12 + { "kdheepak/lazygit.nvim", event = "VeryLazy" }, 13 + 14 + -- search 15 + { "junegunn/fzf", build = ":call fzf#install()", event = "VeryLazy" }, 16 + { "junegunn/fzf.vim", event = "VeryLazy" }, 17 + { "mbbill/undotree", event = "VeryLazy" }, 18 + { 19 + "tzachar/highlight-undo.nvim", 20 + event = "VeryLazy", 21 + config = function() 22 + require("highlight-undo").setup({ 23 + hlgroup = "HighlightUndo", 24 + duration = 600, 25 + }) 26 + end, 27 + }, 28 + "farmergreg/vim-lastplace", --remember last cursor position 29 + { 30 + "jcdickinson/wpm.nvim", 31 + event = "VeryLazy", 32 + config = function() 33 + require("wpm").setup({ 34 + sections = { 35 + lualine_x = { 36 + require("wpm").wpm, 37 + require("wpm").historic_graph, 38 + }, 39 + }, 40 + }) 41 + end, 42 + }, 43 + 44 + }
+29
micro-journal/configs/nvim/lua/sspaeti/plugins/aerial.lua
··· 1 + return { 2 + "stevearc/aerial.nvim", 3 + event = "VeryLazy", 4 + dependencies = { 5 + "nvim-treesitter/nvim-treesitter", 6 + "nvim-tree/nvim-web-devicons", 7 + }, 8 + config = function() 9 + require('aerial').setup({ 10 + on_attach = function(bufnr) 11 + -- Toggle the aerial window with <leader>a 12 + vim.api.nvim_buf_set_keymap(bufnr, 'n', '<leader>o', '<cmd>AerialToggle!<CR>', {}) 13 + -- -- Jump forwards/backwards with '{' and '}' 14 + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', '{', '<cmd>AerialPrev<CR>', {}) 15 + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', '}', '<cmd>AerialNext<CR>', {}) 16 + -- -- Jump up the tree with '[[' or ']]' 17 + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', '[[', '<cmd>AerialPrevUp<CR>', {}) 18 + -- vim.api.nvim_buf_set_keymap(bufnr, 'n', ']]', '<cmd>AerialNextUp<CR>', {}) 19 + end 20 + 21 + }) 22 + 23 + -- Set up your LSP clients here, using the aerial on_attach method 24 + -- require("lspconfig").vimls.setup{ 25 + -- on_attach = require("aerial").on_attach, 26 + -- } 27 + -- Repeat this for each language server you have configured 28 + end 29 + }
+75
micro-journal/configs/nvim/lua/sspaeti/plugins/alpha-nvim.lua
··· 1 + return { 2 + -- start dashboard 3 + "goolord/alpha-nvim", 4 + lazy = false, 5 + dependencies = { "nvim-tree/nvim-web-devicons" }, 6 + config = function() 7 + local startify = require("alpha.themes.startify") 8 + 9 + -- Overwrite the header text 10 + startify.section.header.val = 11 + { 12 + [[ __ ___________ ___ __ ]], 13 + [[ \ \ / __/ __/ _ \ / _ \___ _/ /____ _ ]], 14 + [[ > >\ \_\ \/ ___/ / // / _ `/ __/ _ `/ ]], 15 + [[ /_/___/___/_/ /____/\_,_/\__/\_,_/ ]], 16 + } 17 + 18 + 19 + -- { 20 + -- [[ ___ ________ ________ ________ ________ ________ _________ ________ ]], 21 + -- [[ |\ \|\ ____\ |\ ____\|\ __ \ |\ ___ \|\ __ \|\___ ___\\ __ \ ]], 22 + -- [[ \ \ \ \ \___|_\ \ \___|\ \ \|\ \ \ \ \_|\ \ \ \|\ \|___ \ \_\ \ \|\ \ ]], 23 + -- [[ \ \ \ \_____ \\ \_____ \ \ ____\ \ \ \ \\ \ \ __ \ \ \ \ \ \ __ \ ]], 24 + -- [[ \/ /\|____|\ \\|____|\ \ \ \___| \ \ \_\\ \ \ \ \ \ \ \ \ \ \ \ \ \ ]], 25 + -- [[ / // ____\_\ \ ____\_\ \ \__\ \ \_______\ \__\ \__\ \ \__\ \ \__\ \__\ ]], 26 + -- [[ /_ // |\_________\\_________\|__| \|_______|\|__|\|__| \|__| \|__|\|__| ]], 27 + -- [[ |__|/ \|_________\|_________| ]], 28 + -- } 29 + 30 + -- { 31 + -- [[ ,-.----. ]], 32 + -- [[ .--.--. .--.--. \ / \ ,---, ___ ]], 33 + -- [[ .--, / / '. / / '. | : \ .' .' `\ ,--.'|_ ]], 34 + -- [[ |\ \ | : /`. /| : /`. / | | .\ : ,---.' \ | | :,' ]], 35 + -- [[ ` \ `; | |--` ; | |--` . : |: | | | .`\ | : : ' : ]], 36 + -- [[ \ \ \ : ;_ | : ;_ | | \ : : : | ' | ,--.--. .;__,' / ,--.--. ]], 37 + -- [[ , \ \ \ `. \ \ `. | : . / | ' ' ; : / \ | | | / \ ]], 38 + -- [[ / /` /`----. \ `----. \; | |`-' ' | ; . |.--. .-. |:__,'| : .--. .-. | ]], 39 + -- [[ ` / / __ \ \ | __ \ \ || | ; | | : | ' \__\/: . . ' : |__ \__\/: . . ]], 40 + -- [[ | . / / /`--' // /`--' /: ' | ' : | / ; ," .--.; | | | '.'| ," .--.; | ]], 41 + -- [[ ./__/ '--'. /'--'. / : : : | | '` ,/ / / ,. | ; : ;/ / ,. | ]], 42 + -- [[ `--'---' `--'---' | | : ; : .' ; : .' \ | , /; : .' \ ]], 43 + -- [[ `---'.| | ,.' | , .-./ ---`-' | , .-./ ]], 44 + -- [[ `---` '---' `--`---' `--`---' ]], 45 + -- [[ ]], 46 + -- } 47 + 48 + -- [[ ++------------------------------------------------------------------------------++ ]], 49 + -- [[ ++------------------------------------------------------------------------------++ ]], 50 + -- [[ || _ ____ ____ _ ______ _____ ____ ____ ___ ____ _____ || ]], 51 + -- [[ || \ \ |_ || _| (_) .' ____ \ |_ _||_ \ / _|.' `.|_ \|_ _| || ]], 52 + -- [[ || \ \ | |__| | __ | (___ \_| | | | \/ | / .-. \ | \ | | || ]], 53 + -- [[ || > > | __ | [ | _.____`. | | | |\ /| | | | | | | |\ \| | || ]], 54 + -- [[ || / / _| | | |_ | | | \____) | _| |_ _| |_\/_| |_\ `-' /_| |_\ |_ || ]], 55 + -- [[ || /_/ |____||____|[___] \______.'|_____||_____||_____|`.___.'|_____|\____| || ]], 56 + -- [[ || ______ ______ _______ ______ _ _________ _ || ]], 57 + -- [[ || .' ____ \ .' ____ \ |_ __ \ |_ _ `. / \ | _ _ | / \ || ]], 58 + -- [[ || | (___ \_|| (___ \_| | |__) | | | `. \ / _ \ |_/ | | \_| / _ \ || ]], 59 + -- [[ || _.____`. _.____`. | ___/ | | | | / ___ \ | | / ___ \ || ]], 60 + -- [[ || | \____) || \____) | _| |_ _| |_.' /_/ / \ \_ _| |_ _/ / \ \_ || ]], 61 + -- [[ || \______.' \______.'|_____| |______.'|____| |____||_____||____| |____| || ]], 62 + -- [[ ++------------------------------------------------------------------------------++ ]], 63 + -- [[ ++------------------------------------------------------------------------------++ ]], 64 + 65 + -- Optionally, set highlight group and other options if needed 66 + startify.section.header.opts = { 67 + position = "left", -- Change the position if needed 68 + hl = "Type", -- Customize highlight group 69 + } 70 + 71 + -- Set up the dashboard with the modified startify config 72 + require("alpha").setup(startify.config) 73 + end, 74 + } 75 +
+22
micro-journal/configs/nvim/lua/sspaeti/plugins/indent-blankline.lua
··· 1 + return { 2 + "lukas-reineke/indent-blankline.nvim", 3 + event = "VeryLazy", 4 + version = "2.20.8", 5 + main = "ibl", 6 + config = function() 7 + vim.cmd [[highlight IndentBlanklineIndent1 guibg=#1F1F28 gui=nocombine]] 8 + vim.cmd [[highlight IndentBlanklineIndent2 guibg=#252535 gui=nocombine]] 9 + require("indent_blankline").setup { 10 + char = "", 11 + char_highlight_list = { 12 + "IndentBlanklineIndent1", 13 + "IndentBlanklineIndent2", 14 + }, 15 + space_char_highlight_list = { 16 + "IndentBlanklineIndent1", 17 + "IndentBlanklineIndent2", 18 + }, 19 + show_trailing_blankline_indent = false, 20 + } 21 + end 22 + }
+41
micro-journal/configs/nvim/lua/sspaeti/plugins/lsp/mason.lua
··· 1 + return { 2 + "williamboman/mason.nvim", 3 + event = "VeryLazy", 4 + dependencies = { 5 + "williamboman/mason-lspconfig.nvim", 6 + "WhoIsSethDaniel/mason-tool-installer.nvim", 7 + }, 8 + config = function() 9 + -- import mason 10 + local mason = require("mason") 11 + 12 + -- import mason-lspconfig 13 + local mason_lspconfig = require("mason-lspconfig") 14 + 15 + local mason_tool_installer = require("mason-tool-installer") 16 + 17 + -- enable mason and configure icons 18 + mason.setup({ 19 + ui = { 20 + icons = { 21 + package_installed = "✓", 22 + package_pending = "➜", 23 + package_uninstalled = "✗", 24 + }, 25 + }, 26 + }) 27 + 28 + mason_lspconfig.setup({ 29 + -- list of servers for mason to install 30 + ensure_installed = { 31 + }, 32 + -- auto-install configured servers (with lspconfig) 33 + automatic_installation = true, -- not the same as ensure_installed 34 + }) 35 + 36 + mason_tool_installer.setup({ 37 + ensure_installed = { 38 + }, 39 + }) 40 + end, 41 + }
+53
micro-journal/configs/nvim/lua/sspaeti/plugins/lsp/none-ls.lua
··· 1 + return { 2 + "nvimtools/none-ls.nvim", --before: jose-elias-alvarez/null-ls.nvim" 3 + lazy = true, 4 + -- event = { "BufReadPre", "BufNewFile" }, -- to enable uncomment this 5 + dependencies = { 6 + "jay-babu/mason-null-ls.nvim", 7 + }, 8 + config = function() 9 + local mason_null_ls = require("mason-null-ls") 10 + local null_ls = require("null-ls") 11 + local null_ls_utils = require("null-ls.utils") 12 + mason_null_ls.setup({ 13 + ensure_installed = { 14 + "write_good", -- only keep write_good 15 + }, 16 + }) 17 + -- for conciseness 18 + local formatting = null_ls.builtins.formatting -- to setup formatters 19 + local diagnostics = null_ls.builtins.diagnostics -- to setup linters 20 + -- to setup format on save 21 + local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) 22 + -- configure null_ls 23 + null_ls.setup({ 24 + -- add package.json as identifier for root (for typescript monorepos) 25 + root_dir = null_ls_utils.root_pattern(".null-ls-root", "Makefile", ".git", "package.json"), 26 + -- setup formatters & linters 27 + sources = { 28 + diagnostics.write_good, -- only write_good for diagnostics 29 + }, 30 + -- configure format on save 31 + on_attach = function(current_client, bufnr) 32 + local filetype = vim.api.nvim_buf_get_option(bufnr, 'filetype') 33 + if current_client.supports_method("textDocument/formatting") then 34 + vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr }) 35 + vim.api.nvim_create_autocmd("BufWritePre", { 36 + group = augroup, 37 + buffer = bufnr, 38 + callback = function() 39 + vim.lsp.buf.format({ 40 + filter = function(client) 41 + -- only use null-ls for formatting instead of lsp server 42 + print("on_attach called for buffer", bufnr) 43 + return client.name == "null-ls" 44 + end, 45 + bufnr = bufnr, 46 + }) 47 + end, 48 + }) 49 + end 50 + end, 51 + }) 52 + end, 53 + }
+157
micro-journal/configs/nvim/lua/sspaeti/plugins/lualine.lua
··· 1 + return { 2 + "nvim-lualine/lualine.nvim", 3 + event = "VeryLazy", 4 + config = function() 5 + local hide_in_width = function(width) 6 + return function() 7 + return vim.fn.winwidth(0) > width 8 + end 9 + end 10 + 11 + local branch = { 12 + "branch", 13 + cond = hide_in_width(80), 14 + } 15 + local diagnostics = { 16 + "diagnostics", 17 + sources = { "nvim_diagnostic" }, 18 + cond = hide_in_width(80), 19 + } 20 + 21 + local diff = { 22 + "diff", 23 + cond = hide_in_width(100), 24 + } 25 + local filetype = { 26 + "filetype", 27 + cond = hide_in_width(100), 28 + } 29 + local filename = { 30 + "filename", 31 + path = 1, 32 + } 33 + local progress = { 34 + "progress", 35 + cond = hide_in_width(100), 36 + } 37 + local location = { 38 + "location", 39 + cond = hide_in_width(40), 40 + } 41 + 42 + local function attached_lsp() 43 + local clients = vim.lsp.get_active_clients() 44 + if #clients > 0 then 45 + return clients[1].name 46 + end 47 + return "" 48 + end 49 + 50 + local active_lsp = { 51 + attached_lsp, 52 + icon = "", 53 + cond = function() 54 + return #vim.lsp.get_active_clients() > 0 and hide_in_width(100)() 55 + end, 56 + } 57 + local prose = require 'nvim-prose' 58 + 59 + --old config 60 + require("lualine").setup({ 61 + options = { 62 + icons_enabled = true, 63 + -- theme = 'nightfox', 64 + component_separators = { left = "|", right = "|" }, 65 + section_separators = { left = "|", right = "|" }, 66 + disabled_filetypes = {}, 67 + always_divide_middle = true, 68 + }, 69 + sections = { 70 + lualine_a = { "mode" }, 71 + lualine_b = {}, 72 + lualine_c = { branch, active_lsp, filename }, 73 + lualine_x = { { prose.word_count, cond = prose.is_available }, 74 + { prose.reading_time, cond = prose.is_available }, 75 + diff, diagnostics 76 + }, 77 + lualine_y = {}, 78 + lualine_z = { progress, location }, 79 + }, 80 + inactive_sections = { 81 + lualine_a = { filename }, 82 + lualine_b = {}, 83 + lualine_c = {}, 84 + lualine_x = {}, 85 + lualine_y = {}, 86 + lualine_z = {}, 87 + }, 88 + tabline = {}, 89 + extensions = {}, 90 + }) 91 + 92 + --non distracting 93 + -- local colors = { 94 + -- fg = "#76787d", 95 + -- bg = "#252829", 96 + -- } 97 + 98 + -- local copilot = function() 99 + -- local buf_clients = vim.lsp.get_active_clients { bufnr = 0 } 100 + -- if #buf_clients == 0 then 101 + -- return "LSP Inactive" 102 + -- end 103 + 104 + -- local buf_ft = vim.bo.filetype 105 + -- local buf_client_names = {} 106 + -- local copilot_active = false 107 + 108 + -- -- add client 109 + -- for _, client in pairs(buf_clients) do 110 + -- if client.name ~= "null-ls" and client.name ~= "copilot" then 111 + -- table.insert(buf_client_names, client.name) 112 + -- end 113 + 114 + -- if client.name == "copilot" then 115 + -- copilot_active = true 116 + -- end 117 + -- end 118 + 119 + -- if copilot_active then 120 + -- return lvim.icons.git.Octoface 121 + -- end 122 + -- return "" 123 + -- end 124 + 125 + -- require'lualine'.setup { 126 + -- options = { 127 + -- theme = { 128 + -- normal = { 129 + -- a = { fg = colors.fg, bg = colors.bg }, 130 + -- b = { fg = colors.fg, bg = colors.bg }, 131 + -- c = { fg = colors.fg, bg = colors.bg }, 132 + -- }, 133 + -- insert = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 134 + -- visual = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 135 + -- command = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 136 + -- replace = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 137 + 138 + -- inactive = { 139 + -- a = { bg = colors.fg, fg = colors.bg }, 140 + -- b = { bg = colors.fg, fg = colors.bg }, 141 + -- c = { bg = colors.fg, fg = colors.bg }, 142 + -- }, 143 + -- } 144 + -- }, 145 + -- sections = { 146 + -- lualine_a = { "branch" }, 147 + -- lualine_b = { "filename" }, 148 + -- lualine_c = { 149 + -- diagnostics, 150 + -- }, 151 + -- lualine_x = { location }, 152 + -- lualine_y = { copilot, filetype }, 153 + -- lualine_z = { "progress" }, 154 + -- }, 155 + -- } 156 + end, 157 + }
+114
micro-journal/configs/nvim/lua/sspaeti/plugins/markdown.lua
··· 1 + return { 2 + { 3 + --add handy markdown commands, and set default masOS cmd-keybindings 4 + "tadmccorkle/markdown.nvim", 5 + ft = "markdown", -- or 'event = "VeryLazy"' 6 + opts = { 7 + on_attach = function(bufnr) 8 + local function toggle(key) 9 + return "<Esc>gv<Cmd>lua require'markdown.inline'" 10 + .. ".toggle_emphasis_visual'" .. key .. "'<CR>" 11 + end 12 + end, 13 + -- Any other options you want to set can go here 14 + }, 15 + }, 16 + { --nice markdown inline rendering 17 + 'MeanderingProgrammer/render-markdown.nvim', 18 + event = "VeryLazy", 19 + priority = 1000, 20 + ft = { "markdown" }, 21 + opts = {}, 22 + dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons 23 + keys = { 24 + { "<leader>mr", ":RenderMarkdown toggle<CR>", desc = "Markdown Render Toggle" } 25 + }, 26 + config = function() 27 + require("render-markdown").setup({ 28 + heading = { 29 + sign = false, 30 + position = "inline", 31 + icons = { '# ', '## ', '### ', '#### ', '##### ', '###### ' }, 32 + width = 'block', 33 + left_pad = 2, 34 + right_pad = 4, 35 + }, 36 + code = { 37 + sign = false, 38 + left_pad = 2, 39 + right_pad = 4, 40 + border = "thick", 41 + }, 42 + bullet = { right_pad = 2 }, 43 + }) 44 + end, 45 + }, 46 + -- { 47 + --"iamcco/markdown-preview.nvim", -- preview with a Browser 48 + --event = "VeryLazy", 49 + --build = function() 50 + -- vim.fn["mkdp#util#install"]() 51 + --end, 52 + --config = function() 53 + -- --VimWiki 54 + -- vim.cmd([[ 55 + -- set nocompatible 56 + -- let g:vimwiki_list = [{'path': '~/Simon/SecondBrain', 'syntax': 'markdown', 'ext': '.md'}] 57 + -- let g:vimwiki_global_ext = 0 " o 58 + -- ]]) 59 + 60 + -- -- Outline Shortcut 61 + -- vim.cmd("autocmd FileType markdown,vimwiki nmap <leader>o :SymbolsOutline<CR>") 62 + 63 + -- -- create WikiLink and paste clipboard as link when in visual mode 64 + -- vim.cmd('autocmd FileType markdown vnoremap <leader>K <Esc>`<i[<Esc>`>la](<Esc>"*]pa)<Esc>') 65 + 66 + -- -- create empty wikilink when in normal mode 67 + -- vim.cmd("autocmd FileType markdown nmap <leader>K i[]()<Esc>hhi") 68 + 69 + -- -- Open file in Obsidian vault 70 + -- vim.cmd( 71 + -- "command! IO execute \"silent !open 'obsidian://open?vault=SecondBrain&file=\" . expand('%:r') . \"'\"" 72 + -- ) 73 + -- vim.keymap.set("n", "<leader>io", ":IO<CR>", { noremap = true, silent = true }) 74 + 75 + -- -- Turn off autocomplete for Markdown 76 + -- vim.cmd("au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown") 77 + 78 + -- -- Highlights for headers in markdown -> doesn't really work 79 + -- vim.cmd([[ 80 + -- highlight htmlH1 guifg=#50fa7b gui=bold 81 + -- highlight htmlH2 guifg=#ff79c6 gui=bold 82 + -- highlight htmlH3 guifg=#ffb86c gui=bold 83 + -- highlight htmlH4 guifg=#8be9fd gui=bold 84 + -- highlight htmlH5 guifg=#f1fa8c gui=bold 85 + -- ]]) 86 + --end, 87 + -- }, 88 + --{ 89 + -- --connect with vimwiki with Obsidian Second Brain (see obsidian.lua for native plugin) 90 + -- --vim.opt.nocompatible = true --Recommende for VimWiki 91 + -- "vimwiki/vimwiki", 92 + -- config = function() 93 + -- vim.g.vimwiki_list = { 94 + -- { 95 + -- path = "~/Simon/SecondBrain", 96 + -- syntax = "markdown", 97 + -- ext = ".md", 98 + -- }, 99 + -- } 100 + -- vim.g.vimwiki_global_ext = 0 --only mark files in the second brain as vim viki, rest are standard markdown 101 + -- end, 102 + --}, 103 + -- , Replaced by markdown.nvim?? 104 + -- { -- needed by 'preservim/vim-markdown' 105 + -- "godlygeek/tabular", 106 + -- event = "VeryLazy", 107 + -- }, 108 + -- { 109 + -- -- use({ "iamcco/markdown-preview.nvim", build = "cd app && npm install", setup = function() vim.g.mkdp_filetypes = { "markdown" } end, ft = { "markdown" }, }) 110 + -- -- (optional) recommended for syntax highlighting, folding, etc if you're not using nvim-treesitter: 111 + -- "preservim/vim-markdown", 112 + -- event = "VeryLazy", 113 + -- }, 114 + }
+52
micro-journal/configs/nvim/lua/sspaeti/plugins/neo-tree.lua
··· 1 + return { 2 + "nvim-neo-tree/neo-tree.nvim", 3 + branch = "v3.x", 4 + dependencies = { 5 + "nvim-lua/plenary.nvim", 6 + "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended 7 + "MunifTanjim/nui.nvim", 8 + }, 9 + event = "VeryLazy", 10 + config = function() 11 + vim.g.neo_tree_remove_legacy_commands = 1 12 + 13 + require("neo-tree").setup({ 14 + enable_git_status = true, 15 + enable_diagnostics = false, 16 + position = "right", 17 + filesystem = { 18 + follow_current_file = { 19 + enabled = true, -- This will find and focus the file in the active buffer every time 20 + -- -- the current file is changed while the tree is open. 21 + leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal` 22 + }, 23 + }, 24 + window = { 25 + mappings = { 26 + ["S"] = "open_vsplit", 27 + ["s"] = "", 28 + ["E"] = "open_split", 29 + ["-"] = "navigate_up", 30 + ["h"] = function(state) 31 + local node = state.tree:get_node() 32 + if node.type == 'directory' and node:is_expanded() then 33 + require 'neo-tree.sources.filesystem'.toggle_directory(state, node) 34 + else 35 + require 'neo-tree.ui.renderer'.focus_node(state, node:get_parent_id()) 36 + end 37 + end, 38 + ["l"] = function(state) 39 + local node = state.tree:get_node() 40 + if node.type == 'directory' then 41 + if not node:is_expanded() then 42 + require 'neo-tree.sources.filesystem'.toggle_directory(state, node) 43 + elseif node:has_children() then 44 + require 'neo-tree.ui.renderer'.focus_node(state, node:get_child_ids()[1]) 45 + end 46 + end 47 + end, 48 + } 49 + } 50 + }) 51 + end 52 + }
+52
micro-journal/configs/nvim/lua/sspaeti/plugins/noice.lua
··· 1 + return 2 + { 3 + "folke/noice.nvim", 4 + lazy = false, 5 + priority = 1005, 6 + -- if activated, recording mode will not show 7 + -- event = { "VeryLazy"}, 8 + opts = { 9 + -- add any options here 10 + messages = { 11 + -- NOTE: If you enable messages, then the cmdline is enabled automatically. 12 + -- This is a current Neovim limitation. 13 + view = "mini", --show default operation in lover right corner. Warn/Errors are still as popu (notify). options: notify, split, vsplit, popup, mini, cmdline, cmdline_popup, cmdline_output, messages, confirm, hover, popupmenu 14 + }, 15 + routes = { 16 + { --this turns off notification in neo-tree that are distracting 17 + view = 'mini', 18 + filter = { 19 + event = 'notify', 20 + any = { 21 + { find = 'hidden' }, 22 + { find = 'clipboard' }, 23 + { find = 'Deleted' }, 24 + { find = 'Renamed' }, 25 + }, 26 + }, 27 + } 28 + } 29 + 30 + }, 31 + keys = { 32 + { "<leader>mm", ":Noice<CR>", desc = "Show recent messages" }, 33 + { "<leader>lm", ":Noice<CR>", desc = "Show recent messages" }, 34 + }, 35 + 36 + dependencies = { 37 + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries 38 + "MunifTanjim/nui.nvim", 39 + -- OPTIONAL: 40 + -- `nvim-notify` is only needed, if you want to use the notification view. 41 + -- If not available, we use `mini` as the fallback 42 + "rcarriga/nvim-notify", 43 + } 44 + -- , 45 + -- { "rcarriga/nvim-notify", 46 + -- config = function() 47 + -- require("notify").setup({ 48 + -- background_color = "#000000", 49 + -- }) 50 + -- end 51 + -- } 52 + }
+58
micro-journal/configs/nvim/lua/sspaeti/plugins/nvim-cmp.lua
··· 1 + return { 2 + -- Autocompletion 3 + 'hrsh7th/nvim-cmp', 4 + event = 'InsertEnter', 5 + dependencies = { 6 + -- Adds LSP completion capabilities 7 + "hrsh7th/cmp-buffer", -- source for text in buffer 8 + "hrsh7th/cmp-path", -- source for file system paths 9 + { "antosha417/nvim-lsp-file-operations", config = true }, 10 + }, 11 + config = function() 12 + local cmp = require("cmp") 13 + 14 + cmp.setup({ 15 + window = { 16 + completion = cmp.config.window.bordered(), 17 + documentation = cmp.config.window.bordered(), 18 + }, 19 + completion = { 20 + completeopt = "menu,menuone,preview,noselect", 21 + }, 22 + mapping = cmp.mapping.preset.insert({ 23 + ["<C-k>"] = cmp.mapping.select_prev_item(), -- previous suggestion 24 + ["<C-j>"] = cmp.mapping.select_next_item(), -- next suggestion 25 + ["<C-p>"] = cmp.mapping.select_prev_item(), 26 + ["<C-n>"] = cmp.mapping.select_next_item(), 27 + ["<C-d>"] = cmp.mapping.scroll_docs(4), 28 + ["<C-u>"] = cmp.mapping.scroll_docs(-4), 29 + ["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions 30 + ["<C-e>"] = cmp.mapping.abort(), -- close completion window 31 + -- ["<C-e>"] = cmp.mapping.close(), 32 + ["<C-y>"] = cmp.mapping.confirm({ select = false }), 33 + ["<C-x>"] = cmp.mapping.confirm({ select = false }), 34 + ["<CR>"] = cmp.mapping.confirm({ select = false }), 35 + -- disable completion with tab this helps with copilot setup 36 + ["<Tab>"] = nil, 37 + ["<S-Tab>"] = nil 38 + }), 39 + -- sources for autocompletion 40 + sources = cmp.config.sources({ 41 + { name = "nvim_lsp", priority = 1 }, 42 + { name = "path" }, 43 + { name = "obsidian" }, 44 + { name = "obsidian_new" }, 45 + { name = "nvim_lsp:lua_ls" }, 46 + { name = "dictionary", keyword_length = 3, priority = 5, keyword_pattern = [[\w\+]] }, -- from uga-rosa/cmp-dictionary plug 47 + }), 48 + }) 49 + 50 + -- Setup autocompletion for vim-dadbod 51 + cmp.setup.filetype({ "sql" }, { 52 + sources = { 53 + { name = "vim-dadbod-completion" }, 54 + { name = "buffer" }, 55 + }, 56 + }) 57 + end, 58 + }
+10
micro-journal/configs/nvim/lua/sspaeti/plugins/nvim-highlight-colors.lua
··· 1 + return { 2 + "brenoprata10/nvim-highlight-colors", 3 + event = "VeryLazy", 4 + config = function() 5 + require("nvim-highlight-colors").setup({ 6 + render = "background", -- or 'foreground' or 'first_column' 7 + enable_named_colors = true, 8 + }) 9 + end, 10 + }
+13
micro-journal/configs/nvim/lua/sspaeti/plugins/nvim-prose.lua
··· 1 + return { 2 + "skwee357/nvim-prose", 3 + config = function() 4 + require('nvim-prose').setup { 5 + wpm = 200.0, 6 + filetypes = { 'markdown', 'asciidoc' }, 7 + placeholders = { 8 + words = 'words', 9 + minutes = 'min' 10 + } 11 + } 12 + end 13 + }
+55
micro-journal/configs/nvim/lua/sspaeti/plugins/obsidian.lua
··· 1 + return { 2 + "epwalsh/obsidian.nvim", 3 + version = "*", -- recommended, use latest release instead of latest commit 4 + lazy = true, 5 + ft = "markdown", 6 + -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: 7 + -- event = { 8 + -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. 9 + -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" 10 + -- "BufReadPre path/to/my-vault/**.md", 11 + -- "BufNewFile path/to/my-vault/**.md", 12 + -- }, 13 + dependencies = { 14 + -- Required. 15 + "nvim-lua/plenary.nvim", 16 + 17 + -- see below for full list of optional dependencies 👇 18 + }, 19 + opts = { 20 + workspaces = { 21 + { 22 + name = "SecondBrain", 23 + path = "~/microjournal/documents/SecondBrain", 24 + } 25 + }, 26 + templates = { 27 + --TODO: create dedicated templates for neovim with {date} placeholder instead of Templator syntax 28 + folder = "💡 Resources/🛠 Templates/Markdown/", 29 + date_format = "%Y-%m-%d-%a", 30 + time_format = "%H:%M", 31 + }, 32 + 33 + -- Optional, alternatively you can customize the frontmatter data. 34 + ---@return table 35 + note_frontmatter_func = function(note) 36 + -- Add the title of the note as an alias. 37 + if note.title then 38 + note:add_alias(note.title) 39 + end 40 + 41 + --remove default id, aliases and tags: { id = note.id, aliases = note.aliases, tags = note.tags } 42 + local out = { } 43 + 44 + -- `note.metadata` contains any manually added fields in the frontmatter. 45 + -- So here we just make sure those fields are kept in the frontmatter. 46 + if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then 47 + for k, v in pairs(note.metadata) do 48 + out[k] = v 49 + end 50 + end 51 + 52 + return out 53 + end, 54 + }, 55 + }
+85
micro-journal/configs/nvim/lua/sspaeti/plugins/telescope.lua
··· 1 + return 2 + { 3 + "nvim-telescope/telescope.nvim", 4 + -- event = "VeryLazy", 5 + lazy = false, 6 + priority = 1000, 7 + tag = "0.1.5", 8 + dependencies = { "nvim-lua/plenary.nvim" }, 9 + keys = { 10 + { "<leader>ft", "<cmd>Telescope resume<cr>", desc = "Resume Telescope" }, 11 + -- { 12 + -- "<leader>ff", 13 + -- function() require("telescope.builtin").find_files({}) end, 14 + -- desc = "Find Plugin File", 15 + -- }, 16 + { 17 + "sp", --> fzf: c-p see in remap.lua 18 + function() 19 + local is_git = os.execute('git') == 0 20 + if is_git then 21 + require("telescope.builtin").git_files() 22 + else 23 + require("telescope.builtin").find_files() 24 + end 25 + end, 26 + desc = "Find Open Files", 27 + }, 28 + { 29 + "<leader>fw", 30 + function() require("telescope.builtin").grep_string({ search = vim.fn.input("Grep > ") }) end, 31 + desc = "Grep Word/String under Cursor", 32 + }, 33 + { 34 + "<leader>?", 35 + function() require("telescope.builtin").keymaps({}) end, 36 + desc = "Telescope: Grep Keymaps", 37 + }, 38 + { "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Telescope Help Tags" }, 39 + ----lsp 40 + --{"gr", function() require("telescope.builtin").lsp_references() end, desc = "Telescope LSP References" }, 41 + --{"gC", function() require("telescope.builtin").lsp_document_symbols() end, desc = "Telescope LSP Document Symbols" }, 42 + }, 43 + opts = {}, 44 + config = function() 45 + require("telescope").setup({ 46 + defaults = { 47 + vimgrep_arguments = { 48 + 'rg', 49 + '--color=never', 50 + '--no-heading', 51 + '--with-filename', 52 + '--line-number', 53 + '--column', 54 + '--smart-case' 55 + }, 56 + }, 57 + }) 58 + 59 + local builtin = require 'telescope.builtin' 60 + 61 + -- Slightly advanced example of overriding default behavior and theme 62 + vim.keymap.set('n', '<leader>/', function() 63 + -- You can pass additional configuration to telescope to change theme, layout, etc. 64 + builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { 65 + winblend = 10, 66 + previewer = true, 67 + }) 68 + end, { desc = '[/] Fuzzily search in current buffer' }) 69 + 70 + -- Also possible to pass additional configuration options. 71 + -- See `:help telescope.builtin.live_grep()` for information about particular keys 72 + vim.keymap.set('n', '<leader>f/', function() 73 + builtin.live_grep { 74 + grep_open_files = true, 75 + prompt_title = 'Live Grep in Open Files', 76 + } 77 + end, { desc = '[S]earch [/] in Open Files' }) 78 + 79 + 80 + -- Shortcut for searching your neovim configuration files 81 + vim.keymap.set('n', '<leader>fn', function() 82 + builtin.find_files { cwd = vim.fn.stdpath 'config' } 83 + end, { desc = '[S]earch [N]eovim files' }) 84 + end, 85 + }
+32
micro-journal/configs/nvim/lua/sspaeti/plugins/themes.lua
··· 1 + --color scheme, themes, 2 + return { 3 + { "rebelot/kanagawa.nvim", lazy = false }, 4 + { "ellisonleao/gruvbox.nvim", lazy = false, event = "VeryLazy" }, 5 + { "sainnhe/gruvbox-material", lazy = false, event = "VeryLazy", version = "*" }, 6 + { 7 + "rose-pine/neovim", 8 + lazy = false, 9 + priority = 1000, 10 + config = function() 11 + require("rose-pine").setup({ 12 + variant = "auto", -- auto, main, moon, or dawn 13 + dark_variant = "main" -- main, moon, or dawn 14 + }) 15 + end 16 + }, 17 + { "AlexvZyl/nordic.nvim", lazy = false, priority = 1000 }, 18 + { "navarasu/onedark.nvim", event = "VeryLazy" }, 19 + { "catppuccin/nvim", name = "catppuccin", event = "VeryLazy" }, --light theme 20 + { "craftzdog/solarized-osaka.nvim", lazy = false, priority = 1000 }, 21 + { "projekt0n/github-nvim-theme", event = "VeryLazy", version = "*" }, 22 + { "sho-87/kanagawa-paper.nvim" , lazy = false, priority = 1000, opts = {}, } 23 + -- { "ColorMyPencil", 24 + -- function ColorMyPencils(color) 25 + -- color = color or "kanagawa" 26 + -- vim.cmd.colorscheme(color) 27 + 28 + -- vim.api.nvim_set_hl(0, "Normal", { bg = "none" }) 29 + -- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" }) 30 + -- end 31 + -- } 32 + }
+47
micro-journal/configs/nvim/lua/sspaeti/plugins/treesitter.lua
··· 1 + return { 2 + { 3 + "nvim-treesitter/nvim-treesitter", 4 + event = { 'BufReadPre' }, 5 + ft = { 'markdown' }, 6 + cmd = { 'TSInstallInfo', 'TSInstall' }, 7 + build = ':TSUpdate', 8 + dependencies = { 9 + 'nvim-treesitter/nvim-treesitter-textobjects', 10 + }, 11 + config = function() 12 + local status_ok, treesitter = pcall(require, 'nvim-treesitter.configs') 13 + 14 + if not status_ok then 15 + return 16 + end 17 + treesitter.setup { 18 + ensure_installed = { "markdown", "markdown_inline"}, 19 + sync_install = false, 20 + auto_install = false, 21 + highlight = { 22 + enable = true, -- false will disable the whole extension 23 + additional_vim_regex_highlighting = false, 24 + -- disable = { "css" }, -- list of language that will be disabled 25 + }, 26 + autopairs = { 27 + enable = true, 28 + }, 29 + -- indent = { enable = true, disable = { "yaml", "python" } }, 30 + -- rainbow is no longer maintained 31 + rainbow = { 32 + enable = true, 33 + -- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for 34 + extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean 35 + max_file_lines = nil, -- Do not enable for files with more than n lines, int 36 + -- colors = {}, -- table of hex strings 37 + -- termcolors = {} -- table of colour name strings 38 + }, 39 + autotag = { 40 + enable = true, 41 + }, 42 + ignore_install = {}, 43 + modules = {} 44 + } 45 + end 46 + } 47 + }
+24
micro-journal/configs/nvim/lua/sspaeti/plugins/trouble.lua
··· 1 + return { 2 + { 3 + "folke/trouble.nvim", --nice diagnostic errors 4 + dependencies = "nvim-tree/nvim-web-devicons", 5 + event = { "VeryLazy"}, 6 + keys = { 7 + -- document_diagnostics needed, otherwise todo-comments below breaks it: https://github.com/folke/todo-comments.nvim/issues/158 8 + { 9 + "<leader>lt", ":Trouble diagnostics toggle<CR>", desc = "Trouble Open Diagnostics", noremap = true, silent = true, 10 + }, 11 + }, 12 + opts = {} 13 + }, 14 + { 15 + "folke/todo-comments.nvim", 16 + event = { "VeryLazy"}, 17 + dependencies = "nvim-lua/plenary.nvim", 18 + keys = { 19 + { "<leader>tt", ":TodoTrouble<CR>", desc = "TodoTrouble", noremap = true, silent = true }, 20 + { "<leader>tc", ":TodoTelescope<CR>", desc = "TodoTelescope", noremap = true, silent = true }, 21 + }, 22 + opts = {} --needed! 23 + }, 24 + }
+18
micro-journal/configs/nvim/lua/sspaeti/plugins/vim-tmux-navigator.lua
··· 1 + return { 2 + "christoomey/vim-tmux-navigator", 3 + lazy = false, 4 + cmd = { 5 + "TmuxNavigateLeft", 6 + "TmuxNavigateDown", 7 + "TmuxNavigateUp", 8 + "TmuxNavigateRight", 9 + "TmuxNavigatePrevious", 10 + }, 11 + keys = { 12 + { "<c-h>", "<C-U>TmuxNavigateLeft<cr>" }, 13 + { "<c-j>", "<C-U>TmuxNavigateDown<cr>" }, 14 + { "<c-k>", "<C-U>TmuxNavigateUp<cr>" }, 15 + { "<c-l>", "<C-U>TmuxNavigateRight<cr>" }, 16 + { "<c-\\>","<C-U>TmuxNavigatePrevious<cr>" }, 17 + }, 18 + }
+22
micro-journal/configs/nvim/lua/sspaeti/plugins/which-key.lua
··· 1 + return { 2 + "folke/which-key.nvim", 3 + event = "VeryLazy", 4 + init = function() 5 + vim.o.timeout = true 6 + vim.o.timeoutlen = 300 7 + end, 8 + config = function() 9 + vim.o.timeout = true 10 + vim.o.timeoutlen = 300 11 + require("which-key").setup({ 12 + -- your configuration comes here 13 + -- or leave it empty to use the default settings 14 + -- refer to the configuration section below 15 + -- triggers_blacklist = { 16 + -- n = { "s" }, 17 + -- v = { "s" }, 18 + -- i = { "<leader>" }, 19 + -- }, 20 + }) 21 + end, 22 + }
+39
micro-journal/configs/nvim/lua/sspaeti/plugins/yazi.lua
··· 1 + return 2 + { 3 + "mikavilpas/yazi.nvim", 4 + event = "VeryLazy", 5 + keys = { 6 + -- 👇 in this section, choose your own keymappings! 7 + { 8 + "<leader>-", 9 + "<cmd>Yazi<cr>", 10 + desc = "Open yazi at the current file", 11 + }, 12 + { 13 + "<leader>r", 14 + "<cmd>Yazi<cr>", 15 + desc = "Open yazi at the current file", 16 + }, 17 + { 18 + -- Open in the current working directory 19 + "-", 20 + "<cmd>Yazi cwd<cr>", 21 + desc = "Open the file manager in nvim's working directory" , 22 + }, 23 + { 24 + -- NOTE: this requires a version of yazi that includes 25 + -- https://github.com/sxyazi/yazi/pull/1305 from 2024-07-18 26 + '<c-up>', 27 + "<cmd>Yazi toggle<cr>", 28 + desc = "Resume the last yazi session", 29 + }, 30 + }, 31 + ---@type YaziConfig 32 + opts = { 33 + -- if you want to open yazi instead of netrw, see below for more info 34 + open_for_directories = false, 35 + keymaps = { 36 + show_help = '<f1>', 37 + }, 38 + }, 39 + }
+28
micro-journal/configs/nvim/lua/sspaeti/plugins/zen.lua
··· 1 + return { 2 + "folke/zen-mode.nvim", 3 + lazy = false, 4 + priority = 1000, 5 + config = function() 6 + require("zen-mode").setup({ 7 + on_open = function(_) 8 + vim.fn.system([[tmux set status off]]) 9 + vim.fn.system( 10 + [[tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z]]) 11 + end, 12 + on_close = function(_) 13 + vim.fn.system([[tmux set status on]]) 14 + vim.fn.system( 15 + [[tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z]]) 16 + end, 17 + window = { 18 + -- backdrop = 1, 19 + -- width = 0.66, 20 + width = 97, --98, 21 + options = { 22 + relativenumber = false, 23 + signcolumn = "no", 24 + }, 25 + }, 26 + }) 27 + end, 28 + }
+366
micro-journal/configs/nvim/lua/sspaeti/remap.lua
··· 1 + --general 2 + -- 3 + vim.keymap.set("n", "<leader>e", ":Explore<CR>") 4 + -- vim.keymap.set("n", "-", require("oil").open, { desc = "Open parent directory" }) 5 + 6 + -- s-shortcuts is for search -> without leader, directly with s 7 + vim.keymap.set('n', 'sb', ':Buffers<CR>') 8 + vim.keymap.set('n', 's/', ':History/<CR>') 9 + vim.keymap.set('n', 's;', ':Commands<CR>') 10 + vim.keymap.set('n', 'sa', ':Ag<CR>') 11 + vim.keymap.set('n', 'sB', ':BLines<CR>') 12 + vim.keymap.set('n', 'sb', ':Buffers<CR>') 13 + vim.keymap.set('n', 'sc', ':Commits<CR>') 14 + -- vim.keymap.set('n', 'sC', ':BCommits<CR>') --> changed to lsp symbol/class name search (see lsp.lua) 15 + vim.keymap.set('n', 'sg', ':GFiles<CR>') 16 + vim.keymap.set('n', 'sG', ':GFiles?<CR>') 17 + vim.keymap.set('n', 'sr', ':History<CR>') 18 + vim.keymap.set('n', 's:', ':History:<CR>') 19 + vim.keymap.set('n', 's/', ':History/<CR>') 20 + vim.keymap.set('n', 'sL', ':Lines<CR>') 21 + vim.keymap.set('n', 'sn', ':enew<CR>') 22 + vim.keymap.set('n', 'sM', ':Maps<CR>') 23 + vim.keymap.set('n', 'st', ':Neotree position=float toggle=true reveal<CR>') 24 + vim.keymap.set('n', 'se', ':Neotree position=right toggle=true reveal<CR>') 25 + -- this will include hidden files and work on none git directories. Also fuzzy search works better than telecope 26 + vim.keymap.set('n', '<c-p>', ':Files<CR>') --> sp is in telecope.lua 27 + vim.keymap.set('n', 'sz', ':Helptags<CR>') 28 + vim.keymap.set('n', 'sZ', ':Tags<CR>') 29 + vim.keymap.set('n', 'su', ':UndotreeToggle<CR>') 30 + vim.keymap.set('n', 'sS', ':Colors<CR>') 31 + vim.keymap.set('n', 'sF', ':Rg<CR>') 32 + vim.keymap.set('n', 'sf', ':Telescope live_grep<CR>') --search for typing string 33 + vim.keymap.set('n', 'sw', ':Telescope grep_string<CR>') --search for word/string under cursor 34 + 35 + vim.keymap.set('n', 'sT', ':BTags<CR>') 36 + vim.keymap.set('n', 'sd', ':Windows<CR>') 37 + vim.keymap.set('n', 'sy', ':Filetypes<CR>') 38 + vim.keymap.set('n', 'sz', ':FZF<CR>') 39 + -- si and sm are mapped to harpoon 40 + -- vim.keymap.set(' sm :Marms<CR> 41 + -- vim.keymap.set(' ss :Snippets<CR> 42 + 43 + -- zoom vim split views 44 + vim.api.nvim_set_keymap('n', 'Zz', '<C-w>_| <C-w>|', {noremap = true}) 45 + vim.api.nvim_set_keymap('n', 'Zo', '<C-w>=', {noremap = true}) 46 + 47 + vim.keymap.set("i", "jk", "<Esc>") 48 + vim.keymap.set("i", "kj", "<Esc>") 49 + 50 + -- Split window 51 + vim.keymap.set("n", "ss", ":split<Return>") 52 + vim.keymap.set("n", "sv", ":vsplit<Return>") 53 + 54 + --Move window 55 + vim.keymap.set("n", "sh", "<C-w>h") 56 + vim.keymap.set("n", "sk", "<C-w>k") 57 + vim.keymap.set("n", "sj", "<C-w>j") 58 + vim.keymap.set("n", "sl", "<C-w>l") 59 + 60 + --search and replace 61 + vim.keymap.set("n", "S", ":%s//g<Left><Left>") --used for lazy. 62 + vim.keymap.set("n", "<leader>s", ":%s//g<Left><Left>") 63 + vim.keymap.set("n", "<leader>S", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]]) 64 + 65 + --ciq (change in quotes) 66 + vim.keymap.set("n", "ciq", "ci\"") 67 + --cib (change in brackets) 68 + vim.keymap.set("n", "cib", "ci(") 69 + 70 + --improve cmd line completion (: mode or wildmenu) - allow c-j and c-n to accept completion (tab) 71 + -- Map Ctrl+n to wildmenu completion in command mode 72 + vim.keymap.set('c', '<C-n>', '<C-z>', { noremap = true }) 73 + vim.keymap.set('c', '<C-j>', '<C-z>', { noremap = true }) 74 + vim.keymap.set('c', '<C-p>', '<S-Tab>', { noremap = true }) 75 + vim.keymap.set('c', '<C-k>', '<S-Tab>', { noremap = true }) 76 + 77 + -- Optional: Enhance command-line completion behavior 78 + vim.opt.wildmode = "longest:full,full" 79 + vim.opt.wildmenu = true 80 + 81 + --remove commands 82 + -- 83 + --remove empty line 84 + -- vim.keymap.set("n", "<leader>rl", ":%s/^$\n*//g") 85 + vim.api.nvim_set_keymap('n', '<leader>rl', ':%s/^$\\n*//<CR>', { noremap = true, silent = true }) 86 + 87 + 88 + --vim.keymap.set("n", "<Leader>lf", "vim.lsp.buf.format()<CR>") 89 + vim.keymap.set("n", "<Leader>li", ":Mason<CR>") 90 + vim.keymap.set("n", "<Leader>ll", ":Lazy<CR>") 91 + 92 + -- closing buffers "https://stackoverflow.com/a/8585343/5246670 93 + vim.keymap.set("n", "<C-w>q", ":bp<bar>sp<bar>bn<bar>bd<CR>") 94 + --vim.keymap.set("n", "<leader>q", ":bp<bar>sp<bar>bn<bar>bd<CR>") 95 + ----close buffers except current 96 + vim.keymap.set("n", "<leader>q", "<cmd>%bd|e#|bd#<cr>|'<cr>", { desc = "Delete surrounding buffers" }) 97 + -- Close current window 98 + vim.keymap.set("n", "<leader>x", "<C-w>c") 99 + 100 + --color themes 101 + vim.keymap.set("n", "<leader>ts", ":Telescope colorscheme<CR>") 102 + 103 + --GIT: Start 104 + -- 105 + -- LazyGit 106 + vim.api.nvim_set_keymap('n', '<leader>gg', ':LazyGit<CR>', {noremap = true, silent = true}) 107 + vim.api.nvim_set_keymap('n', '<leader>lg', ':LazyGit<CR>', {noremap = true, silent = true}) 108 + --Blamer 109 + vim.api.nvim_set_keymap('n', '<leader>gb', ':BlamerToggle<CR>', {noremap = true, silent = true}) 110 + --Diffview.nvim 111 + vim.api.nvim_set_keymap('n', '<leader>go', ':DiffviewOpen<CR>', {noremap = true, silent = true}) 112 + vim.api.nvim_set_keymap('n', '<leader>gc', ':DiffviewClose<CR>', {noremap = true, silent = true}) 113 + vim.api.nvim_set_keymap('n', '<leader>gh', ':DiffviewFileHistory<CR>', {noremap = true, silent = true}) 114 + vim.api.nvim_set_keymap('n', '<leader>gf', ':DiffviewFileHistory %<CR>', {noremap = true, silent = true}) 115 + 116 + --Fugitive 117 + --vim.keymap.set("n", "<leader>gs", vim.cmd.Git) 118 + --Browse to GitHub page 119 + vim.api.nvim_set_keymap('n', '<leader>gw', ':GBrowse<CR>', {noremap = true, silent = false}) 120 + --END: git 121 + 122 + 123 + --databaes 124 + vim.keymap.set("n", "<leader>dd", ":DBUIToggle<CR>") 125 + 126 + -- close all buffers execpt current one 127 + -- nnoremap <leader>wa :%bd|e#<Return> 128 + 129 + 130 + --Markdown 131 + -- Writing / Markdown (see also markdown.lua) 132 + vim.keymap.set("n", "<leader>mp", ":MarkdownPreview<CR>") 133 + 134 + -- Set shortcut to switch between showing markdown formatting level (conceallevel) 135 + vim.api.nvim_set_keymap('n', '<leader>m0', ':set conceallevel=0<CR>', { noremap = true, silent = true }) 136 + vim.api.nvim_set_keymap('n', '<leader>m1', ':set conceallevel=1<CR>', { noremap = true, silent = true }) 137 + vim.api.nvim_set_keymap('n', '<leader>m2', ':set conceallevel=2<CR>', { noremap = true, silent = true }) 138 + vim.api.nvim_set_keymap('n', '<leader>m3', ':set conceallevel=3<CR>', { noremap = true, silent = true }) 139 + 140 + -- Function to toggle conceallevel 141 + function ToggleConceallevel() 142 + if vim.wo.conceallevel == 0 then 143 + vim.wo.conceallevel = 2 144 + else 145 + vim.wo.conceallevel = 0 146 + end 147 + end 148 + 149 + -- Shortcut to toggle conceallevel 150 + vim.api.nvim_set_keymap('n', '<leader>mt', ':lua ToggleConceallevel()<CR>', { noremap = true, silent = true }) 151 + 152 + 153 + -- Zenmode 154 + vim.keymap.set("n", "<leader>z", ":ZenMode<CR>") 155 + 156 + --! the plugin markdown.nvim has all the mappings, but they are used with `gs{motion}{style}`, where `{style}` 157 + -- is the key corresponding to the style to toggle (by default "i", "b", "s", or "c") 158 + -- Bold text (works on word in normal mode, or selection in visual mode) 159 + vim.api.nvim_set_keymap('n', '<leader>b', 'ciw**<C-r>"**<Esc>', {desc = "Bold Word", noremap = true}) 160 + vim.api.nvim_set_keymap('v', '<leader>b', 'c**<C-r>"**<Esc>', {desc = "Bold Selection", noremap = true}) 161 + 162 + -- Italic text 163 + vim.api.nvim_set_keymap('n', '<leader>i', 'ciw*<C-r>"*<Esc>', {desc = "Italic Word", noremap = true}) 164 + vim.api.nvim_set_keymap('v', '<leader>i', 'c*<C-r>"*<Esc>', {desc = "Italic Selection", noremap = true}) 165 + 166 + -- Links 167 + vim.api.nvim_set_keymap('n', '<leader>l', 'ciw[<C-r>"]()<Esc>T)i', {desc = "Link Word", noremap = true}) 168 + vim.api.nvim_set_keymap('v', '<leader>l', 'c[<C-r>"]()<Esc>T)i', {desc = "Link Selection", noremap = true}) 169 + --End: Markdown 170 + 171 + -- Spell checker 172 + vim.keymap.set("n", "<leader>so", "<c-o>:set spell<cr>") 173 + vim.keymap.set("n", "<leader>so", ":set spell<cr>") 174 + vim.keymap.set("n", "<leader>sc", "<c-o>:set nospell<cr>") 175 + vim.keymap.set("n", "<leader>sc", ":set nospell<cr>") 176 + 177 + --Aerial 178 + vim.keymap.set("n", "<leader>o", ":AerialToggle<CR>", { noremap = true, silent = true }) 179 + --preview 180 + 181 + 182 + -- moving blocks with automatically indenting 183 + vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") 184 + vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv") 185 + --yank to the end of line 186 + vim.keymap.set("n", "Y", "y$") 187 + 188 + -- join lines without moving the cursor out of the way 189 + vim.keymap.set("n", "J", "mzJ`z") 190 + 191 + -- pasting without losing the pasted text 192 + vim.keymap.set("x", "<leader>p", [["_dP]]) 193 + 194 + -- Alternate way to save 195 + vim.keymap.set("n", "<c>s", ":w<CR>") 196 + vim.keymap.set("n", "<c>a", "gg<S-v>G") 197 + 198 + -- Better tabbing 199 + vim.keymap.set("v", "<", "<gv") 200 + vim.keymap.set("v", ">", ">gv") 201 + 202 + -- better scrolling and searching with centered always 203 + vim.keymap.set("n", "<c-d>", "<C-d>zz") 204 + vim.keymap.set("n", "<c-u>", "<C-u>zz") 205 + vim.keymap.set("n", "<n>", "nzzzv") 206 + vim.keymap.set("n", "<N>", "Nzzzv") 207 + 208 + -- Use control-c instead of escape 209 + vim.keymap.set("n", "c-c", "<Esc>") 210 + 211 + --tab navigation 212 + vim.keymap.set("n", "gt", ":bnext<CR>") 213 + vim.keymap.set("n", "gT", ":bprevious<CR>") 214 + 215 + -- ! do not set tab, it will also change ctrl+i due to keyboard inputs are handled. Ctrl+i is used for jumping back in history 216 + -- vim.keymap.set("n", "<Tab>", ":bnext<CR>") 217 + -- vim.keymap.set("n", "<S-Tab>", ":bprevious<CR>") 218 + 219 + --macro recordings 220 + vim.keymap.set("n", "Q", "@qj") --apply macro on q and jump a line done, so you do not need to add line donw at the end 221 + vim.keymap.set("x", "Q", ":norm @q<CR>") --applyies saved macro on q on selected lines 222 + 223 + 224 + -- Quickfix toggle function 225 + local toggle_qf = function() 226 + local qf_exists = false 227 + for _, win in pairs(vim.fn.getwininfo()) do 228 + if win["quickfix"] == 1 then 229 + qf_exists = true 230 + end 231 + end 232 + if qf_exists then 233 + vim.cmd "cclose" 234 + else 235 + if not vim.tbl_isempty(vim.fn.getqflist()) then 236 + vim.cmd "copen" 237 + end 238 + end 239 + end 240 + 241 + vim.keymap.set("n", "<Leader>cc", toggle_qf) 242 + vim.keymap.set("n", "<Leader>co", ":copen<CR>") 243 + vim.keymap.set("n", "<Leader>cq", ":cclose<CR>") 244 + vim.keymap.set("n", "<Leader>cn", ":cnext<CR>") 245 + vim.keymap.set("n", "<Leader>cp", ":cprevious<CR>") 246 + vim.keymap.set("n", "]q", ":cnext<CR>") 247 + vim.keymap.set("n", "[q", ":cprevious<CR>") 248 + vim.keymap.set("n", "<Leader>wc", ":%s///gn<CR>") --first search a term with / 249 + 250 + --<TAB>: completion -> still needed? 251 + --inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>" 252 + -- switching between tmux session from vim 253 + --vim.keymap.set("n", "<leader>ss", "<cmd>silent !tmux neww tmux-sessionizer<CR>") 254 + 255 + --folding 256 + -- vim.keymap.set("n", "z1", "za") 257 + -- vim.keymap.set("v", "z1", "zf") 258 + -- vim.keymap.set("n", "z2", ":set foldlevel=0<CR><Esc>") 259 + vim.keymap.set('n', 'z1', ':set foldlevel=1<CR><Esc>', {silent = true}) 260 + vim.keymap.set('n', 'z2', ':set foldlevel=2<CR><Esc>', {silent = true}) 261 + vim.keymap.set('n', 'z3', ':set foldlevel=3<CR><Esc>', {silent = true}) 262 + vim.keymap.set('n', 'z4', ':set foldlevel=4<CR><Esc>', {silent = true}) 263 + vim.keymap.set('n', 'z5', ':set foldlevel=5<CR><Esc>', {silent = true}) 264 + vim.keymap.set('n', 'z6', ':set foldlevel=6<CR><Esc>', {silent = true}) 265 + vim.keymap.set('n', 'z7', ':set foldlevel=7<CR><Esc>', {silent = true}) 266 + vim.keymap.set('n', 'z8', ':set foldlevel=8<CR><Esc>', {silent = true}) 267 + vim.keymap.set("n", "z9", "zR") 268 + 269 + -- netwr explorer 270 + vim.g.netrw_banner = 0 -- disable annoying banner 271 + vim.g.netrw_browser_split = 4 -- open in previous window 272 + vim.g.netrw_altv = 1 -- open splits to the right 273 + 274 + 275 + -- 276 + --below: converted from old_configs.vim (with ChatGPT - caughtion if something does not work) 277 + --2023-07-18 278 + -- find in a specific repo 279 + -- I'm not converting this command because Lua doesn't handle vim commands yet as of my knowledge cut-off in September 2021 280 + vim.cmd[[ 281 + command! -bang -nargs=* Rg2 282 + \ call fzf#vim#grep("rg --column --line-number --no-heading --color=always --smart-case ".<q-args>, 1, {'dir': system('git -C '.expand('%:p:h').' rev-parse --show-toplevel 2> /dev/null')[:-2]}, <bang>0) 283 + ]] 284 + -- 285 + -- fzf: ctrl f for find files 286 + -- vim.keymap.set('n', '<c-P>', ':Files<CR>') 287 + vim.keymap.set('n', '<leader>fw', ":call fzf#vim#files('.', fzf#vim#with_preview({'options': ['--query', expand('<cword>')]}))<cr>") 288 + vim.keymap.set('n', '<silent> <Leader>fr', ':Rg<CR>') 289 + vim.keymap.set('n', '<silent> <Leader>fb', ':Buffers<CR>') 290 + vim.keymap.set('n', '<silent> <Leader>f/', ':BLines<CR>') 291 + vim.keymap.set('n', '<silent> <Leader>fm', ':Marks<CR>') 292 + vim.keymap.set('n', '<silent> <Leader>fc', ':Commits<CR>') 293 + vim.keymap.set('n', '<silent> <Leader>fH', ':Helptags<CR>') 294 + vim.keymap.set('n', '<silent> <Leader>fg', ':Rg2 search folder') 295 + 296 + -- Resize window ABSOLUTE (doing it the same direction wheter in right or left split) 297 + vim.keymap.set('n', '<C-w>l', function() if vim.fn.winnr() == vim.fn.winnr('$') then vim.cmd('vertical resize -10') else vim.cmd('vertical resize +10') end end) 298 + vim.keymap.set('n', '<C-w>h', function() if vim.fn.winnr() == 1 then vim.cmd('vertical resize -10') else vim.cmd('vertical resize +10') end end) 299 + 300 + -- resize window RELATIVE (Haven't found a absoulte way) 301 + vim.keymap.set('n', '<C-w>k', ':resize -10<CR>') 302 + vim.keymap.set('n', '<C-w>j', ':resize +10<CR>') 303 + 304 + -- Open current directory 305 + vim.keymap.set('n', 'te', ':tabedit') 306 + vim.keymap.set('n', '<leader>tn', ':tabnew<Return>') 307 + -- vim.keymap.set('n', '<S-Tab>', ':tabprev<Return>') 308 + 309 + -- undo break points 310 + vim.keymap.set('i', ',', ',<c-g>u') 311 + vim.keymap.set('i', '.', '.<c-g>u') 312 + vim.keymap.set('i', '[', '[<c-g>u') 313 + vim.keymap.set('i', '(', '(<c-g>u') 314 + 315 + -- word count 316 + vim.keymap.set('n', '<leader>cw', 'g<c-g><CR>', {desc="count words"}) 317 + 318 + -- jumplist mutations 319 + -- These mappings are not directly convertible to Lua since they involve an expression. 320 + -- Until Neovim's Lua API provides a method to create expression-based mappings, you'll have to use vim.cmd 321 + -- vim.cmd[[ 322 + -- nnoremap <expr> k (v:count > 5 ? "m'" . v:count : "") . 'k' 323 + -- nnoremap <expr> j (v:count > 5 ? "m'" . v:count : "") . 'j' 324 + -- nnoremap <expr> j v:count ? (v:count > 5 ? "m'" . v:count : '') . 'j' : 'gj' 325 + -- nnoremap <expr> k v:count ? (v:count > 5 ? "m'" . v:count : '') . 'k' : 'gk' 326 + -- ]] 327 + 328 + --TODO:count on each keypress above seems to be slow, let's try this for a while: 329 + vim.api.nvim_set_keymap('n', 'j', 'gj', {noremap = true, silent = true}) 330 + vim.api.nvim_set_keymap('n', 'k', 'gk', {noremap = true, silent = true}) 331 + 332 + -- 333 + -- 334 + -- vim.cmd[[ 335 + -- nnoremap <expr> k v:count > 5 ? 'k' : 'gk' 336 + -- nnoremap <expr> j v:count > 5 ? 'j' : 'gj' 337 + -- ]] 338 + 339 + --copy path of current file into clipboard 340 + vim.keymap.set('n', '<leader>y', ':let @+=expand("%:p")<CR>') 341 + 342 + --! jumping forth and back: Needed, if I remove, c-o and c-i are not working anylonger 343 + -- vim.keymap.set("n", "<leader>O", "<C-o>", { noremap = true }) 344 + -- vim.keymap.set("n", "<leader>I", "<C-i>", { noremap = true }) 345 + -- -- needed for c-o and c-i to work in Kitty (?): 346 + -- vim.api.nvim_set_keymap('n', '<C-i>', '\x1b[105;5u', { noremap = true }) 347 + -- vim.api.nvim_set_keymap('n', '<C-o>', '\x1b[111;5u', { noremap = true }) 348 + 349 + -- vim.api.nvim_set_keymap('n', '<C-o>', '<C-S-O>', { noremap = true, silent = true }) 350 + -- test with `:verbose map <C-o>` 351 + -- 352 + -- 353 + 354 + vim.api.nvim_set_keymap('n', '<C-o>', '<C-O>', { noremap = true }) 355 + 356 + 357 + -- Debug key codes 358 + -- vim.api.nvim_set_keymap('n', '<C-o>', ':lua print("C-o pressed")<CR><C-o>', {silent = false}) 359 + -- vim.api.nvim_set_keymap('n', '<C-i>', ':lua print("C-i pressed")<CR><C-i>', {sjilent = false}) 360 + 361 + 362 + -- needed for c-o and c-i to work in Kitty (?): 363 + -- vim.api.nvim_set_keymap('n', '<C-i>', '\x1b[105;5u', { noremap = true }) 364 + -- vim.api.nvim_set_keymap('n', '<C-o>', '\x1b[111;5u', { noremap = true }) 365 + -- potentially add to kitty: 366 + -- map ctrl+i send_text all \x1b[105;5u
+145
micro-journal/configs/nvim/lua/sspaeti/set.lua
··· 1 + -- setup must be called before loading 2 + 3 + -- vim.opt.completeopt = { "menuone", "noselect", "noinsert" } 4 + vim.opt.completeopt = { "menu" } 5 + vim.opt.shortmess = vim.opt.shortmess + { c = true } 6 + 7 + -- set undofile to keep undo history unlimited (even if buffer is closed) 8 + vim.opt.undodir = "~/.undodir" 9 + vim.opt.undofile = true 10 + vim.opt.swapfile = false --instead have unlimited undo's 11 + vim.opt.backup = false --instead have unlimited undo's 12 + vim.opt.clipboard = "unnamedplus" --" Copy paste between vim and everything else -> inserts all into system clipboard 13 + 14 + -- vim.opt.relativenumber = true 15 + vim.opt.number = false 16 + vim.opt.colorcolumn = "100" 17 + 18 + -- vim.opt.numberwidth = 2 -- Minimal number of columns to use for the line number 19 + 20 + --set `filetype` in lua 21 + vim.cmd("filetype plugin indent on") 22 + 23 + vim.opt.ruler = true -- show the cursor position all the time 24 + vim.opt.showcmd = true -- display incomplete commands 25 + vim.opt.laststatus = 3 -- 3: Only show global status line in acitve window 2: Always display the status line 26 + 27 + --foldlevel settings 28 + vim.opt.foldmethod = "indent" 29 + vim.opt.foldlevel = 5 30 + vim.wo.foldmethod = "expr" 31 + vim.wo.foldexpr = "nvim_treesitter#foldexpr()" 32 + 33 + -- search related 34 + vim.opt.hlsearch = true 35 + vim.opt.incsearch = true 36 + vim.opt.ignorecase = true 37 + 38 + vim.opt.updatetime = 400 -- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable delays and poor user experience. 39 + 40 + --language settings 41 + -- vim.opt.spelllang = "en_us,de_ch" 42 + 43 + -- Ignore files 44 + vim.opt.wildignore = "*.pyc,*_build/*,**/coverage/*,**/.git/*,**/__pycache__/*" 45 + 46 + vim.opt.tabstop = 2 -- Insert 2 spaces for a tab 47 + vim.opt.shiftwidth = 2 -- Change the number of space characters inserted for indentation 48 + vim.opt.softtabstop = 2 --Number of spaces that a <Tab> counts for while performing editing operations, like inserting a <Tab> or using <BS> 49 + 50 + 51 + --handlebar files should be treated as html 52 + vim.cmd('autocmd BufRead,BufNewFile *.hbs set filetype=html') 53 + 54 + vim.opt.expandtab = true -- Converts tabs to spaces 55 + vim.opt.smarttab = true -- Makes tabbing smarter will realize you have 2 vs 4 56 + vim.opt.smartindent = true -- Makes indenting smart 57 + vim.opt.autoindent = true -- Good auto indent 58 + vim.opt.splitbelow = true -- Horizontal splits will automatically be below 59 + vim.opt.splitright = true -- Vertical splits will automatically be to the right 60 + -- vim.opt.t_Co=256 -- Support 256 colors 61 + vim.opt.termguicolors = true -- True color support 62 + vim.opt.cmdheight = 2 -- More space for displaying messages 63 + vim.opt.pumheight = 10 -- Makes popup menu smaller 64 + vim.opt.hidden = true -- Required to keep multiple buffers open multiple buffers 65 + -- also see whcih-key.lua, which sets up the same config 66 + vim.opt.timeoutlen = 300 -- By default timeoutlen is 1000 ms 67 + 68 + vim.opt.scrolloff = 8 69 + 70 + vim.opt.encoding = "utf8" 71 + 72 + 73 + 74 + 75 + -- MISC 76 + --> autocmd and buff 77 + 78 + -- Highlight what I yanked 79 + vim.cmd("autocmd TextYankPost * silent! lua vim.highlight.on_yank { higroup='IncSearch', timeout=500 }") 80 + 81 + --set filetype bash when file ending wih .shrc 82 + vim.cmd('autocmd BufNewFile,BufRead *.shrc,.secrets,.secrets_airbyte set filetype=bash') 83 + 84 + -- auto create a folder if we save a file in a non existing folder 85 + vim.cmd([[ 86 + augroup Mkdir 87 + autocmd! 88 + autocmd BufWritePre * call mkdir(expand("<afile>:p:h"), "p") 89 + augroup END 90 + ]]) 91 + 92 + 93 + -- Automatically set activated virtual environment for Python 94 + vim.g.python3_host_prog = vim.fn.expand("$HOME/.venvs/nvim/bin/python3") 95 + 96 + -- Register a command in Neovim to format JSON using jq 97 + vim.api.nvim_create_user_command('Formatj', function() 98 + vim.cmd('%!jq .') 99 + end, {}) 100 + 101 + -- Register a command to "unformat" JSON using jq 102 + vim.api.nvim_create_user_command('Unformatj', function() 103 + vim.cmd('%!jq -c .') 104 + end, {}) 105 + 106 + 107 + -- vim.cmd([[ 108 + -- debug mode with -i 109 + -- "FileType settings {{{ 110 + -- augroup mb_filetype 111 + -- autocmd! 112 + -- autocmd FileType brainfuck xmap <buffern R "xygv*;%s;;<c-r>x;g<left><left> 113 + -- autocmd FileType yaml nnoremap <buffer> <CR> :AnsibleDoc<CR> 114 + -- autocmd FileType python iabbrev <buffer> im import 115 + -- autocmd FileType python iabbrev <buffer> rt return 116 + -- autocmd FileType python iabbrev <buffer> yl yield 117 + -- autocmd FileType python iabbrev <buffer> fa False 118 + -- autocmd FileType python iabbrev <buffer> tr True 119 + -- autocmd FileType python iabbrev <buffer> br break 120 + -- autocmd FileType python nnoremap <buffer> <cr> :silent w<bar>only<bar>vsp<bar>term ipython3 -i %<cr> 121 + -- augroup 122 + -- "}}} 123 + -- ]]) 124 + 125 + 126 + -- move window with christoomey/vim-tmux-navigator to align tmux and nvim 127 + vim.g.tmux_navigator_no_mappings = 1 128 + vim.g.tmux_navigator_preserve_zoom = 1 129 + 130 + -- Replace `$EDITOR` candidate with this command to open the selected file 131 + vim.g.rnvimr_edit_cmd = 'drop' 132 + 133 + -- let blame default be on 134 + vim.g.blamer_enabled = 1 135 + 136 + --TODO: not sure if that works yet 137 + --disable match parentes as it's super slow on larger files (e.g. log files) 138 + vim.g.loaded_matchparen = 1 139 + 140 + 141 + -- Custom surrounds 142 + vim.cmd[[ 143 + let w:surround_{char2nr('w')} = "```\r```" 144 + let b:surround_{char2nr('b')} = "**\r**" 145 + ]]
+63
micro-journal/configs/nvim/lua/sspaeti/set_wp.lua
··· 1 + -- this settings are additional for wordprocessor config, optimized for markdown 2 + -- overwriting default settings 3 + 4 + vim.opt.listchars = { tab = "→ ", trail = "·", extends = "$" } 5 + 6 + --markdown 7 + vim.opt.syntax = "on" -- Enables syntax highlighing 8 + vim.opt.smartcase = true -- Do not ignore case with capitals 9 + vim.opt.conceallevel = 2 -- Markdown files behave like Obsidian, *italic*, **bold** and even [links](https...) are hidden. Amaziing! 10 + 11 + -- vim.opt.textwidth = 80 12 + 13 + vim.opt.wrap = true 14 + vim.opt.linebreak = true -- Break lines at word boundaries. Avoids cuting words at end of the line 15 + vim.opt.breakindent = true -- Preserve indentation of virtual lines 16 + vim.opt.breakindentopt = "shift:1" -- Add extra indent for wrapped lines 17 + vim.opt.showbreak = " " -- Show a symbol at the start of wrapped lines 18 + 19 + 20 + -- Custom fold text function 21 + vim.opt.foldtext = [[substitute(getline(v:foldstart),'\\t',repeat('\ ',&tabstop),'g').' ']] 22 + vim.opt.fillchars = { fold = " " } -- Remove the default fold characters 23 + vim.opt.foldcolumn = "0" -- Hide the fold column 24 + 25 + --Hide tab status 26 + vim.opt.showtabline = 1 27 + 28 + 29 + --enter text vertically to maximize focus on current line 30 + vim.opt.scrolloff = 5 --default: 8 31 + 32 + 33 + -- This removes the currly underline below a Markdown link, but keeps the color and icon effect 34 + vim.defer_fn(function() 35 + -- Get current highlight attributes 36 + local current_hl = vim.api.nvim_get_hl(0, { name = "@string.special.url" }) 37 + 38 + -- Create new highlight with same colors but no underline 39 + local new_hl = { 40 + fg = current_hl.fg, 41 + bg = current_hl.bg, 42 + sp = current_hl.sp, 43 + bold = current_hl.bold, 44 + italic = current_hl.italic, 45 + underline = false -- Explicitly remove underline 46 + } 47 + 48 + -- Apply the modified highlight 49 + vim.api.nvim_set_hl(0, "@string.special.url", new_hl) 50 + end, 100) 51 + 52 + 53 + --set vim colorscheme as it works with bold and other markdown highlights 54 + vim.cmd("colorscheme vim") 55 + 56 + ---- Auto-enable ZenMode on startup with a slight delay 57 + --vim.api.nvim_create_autocmd("VimEnter", { 58 + -- callback = function() 59 + -- vim.defer_fn(function() 60 + -- vim.cmd("ZenMode") 61 + -- end, 0.1) -- delay to ensure plugin is loaded 62 + -- end 63 + --})
+12
micro-journal/configs/nvim/lua/theme/kanagawa.lua
··· 1 + vim.opt.laststatus = 3 2 + vim.opt.fillchars:append({ 3 + horiz = '━', 4 + horizup = '┻', 5 + horizdown = '┳', 6 + vert = '┃', 7 + vertleft = '┨', 8 + vertright = '┣', 9 + verthoriz = '╋', 10 + }) 11 + --require'kanagawa'.setup({ globalStatus = true, ... }) 12 +
+95
micro-journal/configs/nvim/micro-journal-scripts/Makefile
··· 1 + # Makefile for Raspberry Pi Pico Typewriter Syncing 2 + 3 + # Path definitions for Pi 4 + PI_WRITING_DIR = $(HOME)/microjournal/writing 5 + PI_NVIM_CONFIG_DIR = $(HOME)/config/nvim 6 + PI_CONFIG_DIR = $(HOME)/microjournal/config 7 + PI_SECONDBRAIN_DIR = $(HOME)/microjournal/SecondBrain 8 + 9 + # Mac connection details 10 + MAC_USER = your_mac_username 11 + MAC_HOST = your_mac_hostname_or_ip 12 + 13 + # Path definitions for Mac (remote) 14 + MAC_NVIM_CONFIG_GIT = $(MAC_USER)@$(MAC_HOST):$(HOME)/Documents/git/general/dotfiles/nvim-wp 15 + MAC_TYPEWRITER_CONFIG = $(MAC_USER)@$(MAC_HOST):$(HOME)/Documents/git/general/dotfiles/nvim-wp/micro-journal-scripts 16 + MAC_WRITING_DIR = $(MAC_USER)@$(MAC_HOST):$(HOME)/Simon/SecondBrain/⚛️\ Areas/✍🏻\ Writing/micro-journal 17 + MAC_SECONDBRAIN_DIR = $(MAC_USER)@$(MAC_HOST):$(HOME)/Simon/SecondBrain 18 + 19 + # Default target 20 + .PHONY: help 21 + help: 22 + @echo "Typewriter Sync Makefile" 23 + @echo "========================" 24 + @echo "Available targets:" 25 + @echo " to-mac : Sync writing from Pi to Mac" 26 + @echo " from-mac : Sync configs and SecondBrain from Mac to Pi" 27 + @echo " sync-all : Run both to-mac and from-mac syncs" 28 + @echo " install : Install required packages from wp-packages.txt" 29 + @echo " network-on : Start network connection" 30 + @echo " network-off : Stop network connection" 31 + @echo " time-sync : Synchronize system time" 32 + @echo " help : Show this help information" 33 + 34 + # Network management 35 + .PHONY: network-on 36 + network-on: 37 + @echo "Starting network connection..." 38 + @./startnetwork.sh 39 + @echo "Waiting for network connection..." 40 + @for i in $$(seq 1 15); do \ 41 + if ping -c 1 google.com > /dev/null 2>&1; then \ 42 + echo "Network is ready."; \ 43 + break; \ 44 + fi; \ 45 + if [ $$i -eq 15 ]; then \ 46 + echo "WARNING: Network may not be fully ready, but continuing..."; \ 47 + fi; \ 48 + sleep 1; \ 49 + done 50 + 51 + .PHONY: network-off 52 + network-off: 53 + @echo "Stopping network connection..." 54 + @./stopnetwork.sh 55 + 56 + # Time synchronization 57 + .PHONY: time-sync 58 + time-sync: network-on 59 + @echo "Synchronizing system time..." 60 + @sudo ./time.sh 61 + 62 + # Sync from Pi to Mac 63 + .PHONY: to-mac 64 + to-mac: network-on time-sync 65 + @echo "=== Starting Pi to Mac sync process ===" 66 + @echo "Syncing writing files - writing..." 67 + @rsync -avz --delete "$(PI_WRITING_DIR)/" "$(MAC_WRITING_DIR)/" 68 + @echo "Syncing nvim-wp files..." 69 + @rsync -avz --delete "$(PI_NVIM_CONFIG_DIR)/" "$(MAC_NVIM_CONFIG_GIT)/" 70 + @echo "Writing files sync completed!" 71 + @make -s network-off 72 + @echo "=== Pi to Mac sync process completed successfully! ===" 73 + 74 + # Sync from Mac to Pi 75 + .PHONY: from-mac 76 + from-mac: network-on time-sync 77 + @echo "=== Starting Mac to Pi sync process ===" 78 + 79 + @echo "Syncing SecondBrain contents..." 80 + @rsync -avz "$(MAC_SECONDBRAIN_DIR)/" "$(PI_SECONDBRAIN_DIR)/" 81 + @echo "SecondBrain contents sync completed!" 82 + 83 + @make -s network-off 84 + @echo "=== Mac to Pi sync process completed successfully! ===" 85 + 86 + # Complete sync in both directions 87 + .PHONY: sync-all 88 + sync-all: network-on time-sync to-mac from-mac network-off 89 + 90 + # Install packages 91 + .PHONY: install 92 + install: 93 + @echo "Installing required packages..." 94 + @cd install && ./install-wp.sh 95 + @echo "Installation complete!"
+10
micro-journal/configs/nvim/micro-journal-scripts/README.md
··· 1 + 2 + # Micro Journal Scripts 3 + 4 + 5 + ## Prepare scripts for syncing 6 + 7 + > I wrote one script to turn on the network (`startnetwork.sh`) and a second to sync the clock to my timezone (`stopnetwork.sh`). 8 + > 9 + > I run those scripts via the terminal and then **activate Syncthing** (I might run a `rsync` script). It connects up to my other devices and grabs new files, versions, etc. Then I kill Syncthing and the network. Whole process takes a minute. *[Reddit](https://sh.reddit.com/r/writerDeck/comments/1j0pe1h/comment/mfpu1e5/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button), thanks to u/corycaea.* 10 +
+21
micro-journal/configs/nvim/micro-journal-scripts/install/install-wp.sh
··· 1 + #!/bin/bash 2 + 3 + # Simple installation script for Pi Pico typewriter setup 4 + # Usage: ./install-wp.sh 5 + 6 + # Install all packages listed in wp-packages.txt 7 + echo "Installing packages..." 8 + cat wp-packages.txt | grep -v "^#" | xargs sudo apt install -y 9 + 10 + # Create symlink for fd (Debian packages fd as fdfind) 11 + if [ -f "/usr/bin/fdfind" ] && [ ! -f "/usr/local/bin/fd" ]; then 12 + sudo ln -s $(which fdfind) /usr/local/bin/fd 13 + fi 14 + 15 + # Configure zoxide (better cd command) 16 + if ! grep -q "zoxide init" ~/.bashrc; then 17 + echo 'eval "$(zoxide init bash)"' >> ~/.bashrc 18 + echo "Added zoxide to bashrc" 19 + fi 20 + 21 + echo "Installation complete!"
+12
micro-journal/configs/nvim/micro-journal-scripts/install/wp-packages.txt
··· 1 + neovim 2 + yazi 3 + ripgrep 4 + fd-find 5 + fzf 6 + zoxide 7 + jq 8 + poppler-utils 9 + # Heavier packages - uncomment if needed 10 + # imagemagick 11 + # p7zip-full 12 + # ffmpeg
+8
micro-journal/configs/nvim/micro-journal-scripts/startnetwork.sh
··· 1 + #!/bin/bash 2 + 3 + #Start NetworkManager 4 + 5 + sudo systemctl start NetworkManager 6 + 7 + 8 + # connect to wifi with: `nmcli` device wifi connect "YourNetworkName" password "YourPassword"
+5
micro-journal/configs/nvim/micro-journal-scripts/stopnetwork.sh
··· 1 + #!/bin/bash 2 + 3 + #Stop NetworkManager 4 + 5 + sudo systemctl stop NetworkManager
+37
micro-journal/configs/nvim/micro-journal-scripts/time.sh
··· 1 + #!/bin/bash 2 + 3 + # Script to sync system time with internet time (Eastern US timezone) 4 + # No additional software required 5 + 6 + # Check if running as root 7 + if [ "$(id -u)" -ne 0 ]; then 8 + echo "This script must be run as root. Please use sudo." 9 + exit 1 10 + fi 11 + 12 + echo "Fetching current internet time..." 13 + 14 + # Get the HTTP date header from Google 15 + RAW_DATE=$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | sed 's/Date: //') 16 + 17 + # Remove carriage return if present 18 + RAW_DATE=$(echo "$RAW_DATE" | tr -d '\r') 19 + 20 + if [ -z "$RAW_DATE" ]; then 21 + echo "Failed to retrieve time from internet. Check your connection." 22 + exit 1 23 + fi 24 + 25 + echo "Internet time (GMT): $RAW_DATE" 26 + 27 + # Set the system time to GMT first 28 + echo "Setting system clock to GMT time..." 29 + date -s "$RAW_DATE" 30 + 31 + # Now set the timezone to Eastern 32 + echo "Setting timezone to Eastern US..." 33 + export TZ="America/New_York" 34 + 35 + echo "System time is now set to: $(date)" 36 + 37 + echo "Time synchronization complete!"
micro-journal/configs/nvim/micro-journal.webp

This is a binary file and will not be displayed.

+1
micro-journal/configs/nvim/spell/en.utf-8.add
··· 1 + dbt
micro-journal/configs/nvim/spell/en.utf-8.add.spl

This is a binary file and will not be displayed.

micro-journal/configs/nvim/wordprocessor-outline.jpg

This is a binary file and will not be displayed.

micro-journal/configs/nvim/wordprocessor.jpg

This is a binary file and will not be displayed.

micro-journal/configs/nvim/~/.undodir/%home%microjournal%.config%nvim%lua%sspaeti%plugins%noice.lua

This is a binary file and will not be displayed.

micro-journal/configs/nvim/~/.undodir/%home%microjournal%.config%nvim%lua%sspaeti%plugins%obsidian.lua

This is a binary file and will not be displayed.

micro-journal/configs/nvim/~/.undodir/%home%microjournal%.config%nvim%lua%sspaeti%set.lua

This is a binary file and will not be displayed.

+2
micro-journal/configs/ranger/rifle.conf
··· 1 + ext wg = wordgrinder "$@" 2 + ext sh = bash "$@"
+3
micro-journal/configs/yazi/flavor.toml
··· 1 + [flavor] 2 + dark = "dracula" 3 + dark = "dracula"
+4
micro-journal/configs/yazi/keymap.toml
··· 1 + [manager] 2 + prepend_keymap = [ 3 + { on = "?", run = "help", desc = "Help"}, 4 + ]
+1
micro-journal/configs/yazi/theme.toml
··· 1 + [flavor]
+3
micro-journal/configs/yazi/yazi.toml
··· 1 + [opener] 2 + edit = [{run='nvim "$@"', block = true}] 3 +
+41
micro-journal/dotfiles/.aliases.shrc
··· 1 + 2 + alias vim=nvim 3 + alias v=nvim 4 + alias wp=nvim 5 + alias z=zoxide 6 + alias lg=lazygit 7 + 8 + 9 + # when closing ranger it will be at the path you were 10 + alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"' 11 + 12 + # same as ranger above, leaves you at currrent directory when quitting 13 + function y() { 14 + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" 15 + yazi "$@" --cwd-file="$tmp" 16 + if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then 17 + builtin cd -- "$cwd" 18 + fi 19 + rm -f -- "$tmp" 20 + } 21 + 22 + alias r=y 23 + #alias ranger=y 24 + 25 + 26 + 27 + #git 28 + alias gs="git status" 29 + alias gl="git log" 30 + alias gm="git commit -m" 31 + alias ga="git add" 32 + alias gp="git push" 33 + alias gpu="git pull" 34 + alias gd="git diff" 35 + 36 + # show hidden files by default 37 + alias ll='ls -la' 38 + function chpwd() { 39 + emulate -L zsh 40 + ll 41 + }
+134
micro-journal/dotfiles/.bashrc
··· 1 + # ~/.bashrc: executed by bash(1) for non-login shells. 2 + # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) 3 + # for examples 4 + 5 + # If not running interactively, don't do anything 6 + case $- in 7 + *i*) ;; 8 + *) return;; 9 + esac 10 + 11 + # don't put duplicate lines or lines starting with space in the history. 12 + # See bash(1) for more options 13 + HISTCONTROL=ignoreboth 14 + 15 + # append to the history file, don't overwrite it 16 + shopt -s histappend 17 + 18 + # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) 19 + HISTSIZE=1000 20 + HISTFILESIZE=2000 21 + 22 + # check the window size after each command and, if necessary, 23 + # update the values of LINES and COLUMNS. 24 + shopt -s checkwinsize 25 + 26 + # If set, the pattern "**" used in a pathname expansion context will 27 + # match all files and zero or more directories and subdirectories. 28 + #shopt -s globstar 29 + 30 + # make less more friendly for non-text input files, see lesspipe(1) 31 + #[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" 32 + 33 + # set variable identifying the chroot you work in (used in the prompt below) 34 + if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 35 + debian_chroot=$(cat /etc/debian_chroot) 36 + fi 37 + 38 + # set a fancy prompt (non-color, unless we know we "want" color) 39 + case "$TERM" in 40 + xterm-color|*-256color) color_prompt=yes;; 41 + esac 42 + 43 + # uncomment for a colored prompt, if the terminal has the capability; turned 44 + # off by default to not distract the user: the focus in a terminal window 45 + # should be on the output of commands, not on the prompt 46 + force_color_prompt=yes 47 + 48 + if [ -n "$force_color_prompt" ]; then 49 + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 50 + # We have color support; assume it's compliant with Ecma-48 51 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 52 + # a case would tend to support setf rather than setaf.) 53 + color_prompt=yes 54 + else 55 + color_prompt= 56 + fi 57 + fi 58 + 59 + if [ "$color_prompt" = yes ]; then 60 + PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] ' 61 + else 62 + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 63 + fi 64 + unset color_prompt force_color_prompt 65 + 66 + # If this is an xterm set the title to user@host:dir 67 + case "$TERM" in 68 + xterm*|rxvt*) 69 + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" 70 + ;; 71 + *) 72 + ;; 73 + esac 74 + 75 + # enable color support of ls and also add handy aliases 76 + if [ -x /usr/bin/dircolors ]; then 77 + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 78 + alias ls='ls --color=auto' 79 + #alias dir='dir --color=auto' 80 + #alias vdir='vdir --color=auto' 81 + 82 + alias grep='grep --color=auto' 83 + alias fgrep='fgrep --color=auto' 84 + alias egrep='egrep --color=auto' 85 + fi 86 + 87 + # colored GCC warnings and errors 88 + #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' 89 + 90 + # some more ls aliases 91 + #alias ll='ls -l' 92 + #alias la='ls -A' 93 + #alias l='ls -CF' 94 + 95 + # Alias definitions. 96 + # You may want to put all your additions into a separate file like 97 + # ~/.bash_aliases, instead of adding them here directly. 98 + # See /usr/share/doc/bash-doc/examples in the bash-doc package. 99 + 100 + if [ -f ~/.bash_aliases ]; then 101 + . ~/.bash_aliases 102 + fi 103 + 104 + # enable programmable completion features (you don't need to enable 105 + # this, if it's already enabled in /etc/bash.bashrc and /etc/profile 106 + # sources /etc/bash.bashrc). 107 + if ! shopt -oq posix; then 108 + if [ -f /usr/share/bash-completion/bash_completion ]; then 109 + . /usr/share/bash-completion/bash_completion 110 + elif [ -f /etc/bash_completion ]; then 111 + . /etc/bash_completion 112 + fi 113 + fi 114 + 115 + # sspaeti customized properties 116 + # 117 + source ~/.aliases.shrc 118 + source ~/.secrets.shrc 119 + 120 + #set vim mode 121 + #set -o vi 122 + 123 + export EDITOR="nvim" 124 + 125 + #path 126 + export sync=~/microjournal/documents/sync/ 127 + 128 + #eval "$(zoxide init bash)" 129 + 130 + # Startup app - ranger 131 + cd ~/microjournal 132 + y 133 + 134 +
+95
micro-journal/scripts/Makefile
··· 1 + # Makefile for Raspberry Pi Pico Typewriter Syncing 2 + 3 + # Path definitions for Pi 4 + PI_WRITING_DIR = $(HOME)/microjournal/writing 5 + PI_NVIM_CONFIG_DIR = $(HOME)/config/nvim 6 + PI_CONFIG_DIR = $(HOME)/microjournal/config 7 + PI_SECONDBRAIN_DIR = $(HOME)/microjournal/SecondBrain 8 + 9 + # Mac connection details 10 + MAC_USER = your_mac_username 11 + MAC_HOST = your_mac_hostname_or_ip 12 + 13 + # Path definitions for Mac (remote) 14 + MAC_NVIM_CONFIG_GIT = $(MAC_USER)@$(MAC_HOST):$(HOME)/Documents/git/general/dotfiles/nvim-wp 15 + MAC_TYPEWRITER_CONFIG = $(MAC_USER)@$(MAC_HOST):$(HOME)/Documents/git/general/dotfiles/nvim-wp/micro-journal-scripts 16 + MAC_WRITING_DIR = $(MAC_USER)@$(MAC_HOST):$(HOME)/Simon/SecondBrain/⚛️\ Areas/✍🏻\ Writing/micro-journal 17 + MAC_SECONDBRAIN_DIR = $(MAC_USER)@$(MAC_HOST):$(HOME)/Simon/SecondBrain 18 + 19 + # Default target 20 + .PHONY: help 21 + help: 22 + @echo "Typewriter Sync Makefile" 23 + @echo "========================" 24 + @echo "Available targets:" 25 + @echo " to-mac : Sync writing from Pi to Mac" 26 + @echo " from-mac : Sync configs and SecondBrain from Mac to Pi" 27 + @echo " sync-all : Run both to-mac and from-mac syncs" 28 + @echo " install : Install required packages from wp-packages.txt" 29 + @echo " network-on : Start network connection" 30 + @echo " network-off : Stop network connection" 31 + @echo " time-sync : Synchronize system time" 32 + @echo " help : Show this help information" 33 + 34 + # Network management 35 + .PHONY: network-on 36 + network-on: 37 + @echo "Starting network connection..." 38 + @./startnetwork.sh 39 + @echo "Waiting for network connection..." 40 + @for i in $$(seq 1 15); do \ 41 + if ping -c 1 google.com > /dev/null 2>&1; then \ 42 + echo "Network is ready."; \ 43 + break; \ 44 + fi; \ 45 + if [ $$i -eq 15 ]; then \ 46 + echo "WARNING: Network may not be fully ready, but continuing..."; \ 47 + fi; \ 48 + sleep 1; \ 49 + done 50 + 51 + .PHONY: network-off 52 + network-off: 53 + @echo "Stopping network connection..." 54 + @./stopnetwork.sh 55 + 56 + # Time synchronization 57 + .PHONY: time-sync 58 + time-sync: network-on 59 + @echo "Synchronizing system time..." 60 + @sudo ./time.sh 61 + 62 + # Sync from Pi to Mac 63 + .PHONY: to-mac 64 + to-mac: network-on time-sync 65 + @echo "=== Starting Pi to Mac sync process ===" 66 + @echo "Syncing writing files - writing..." 67 + @rsync -avz --delete "$(PI_WRITING_DIR)/" "$(MAC_WRITING_DIR)/" 68 + @echo "Syncing nvim-wp files..." 69 + @rsync -avz --delete "$(PI_NVIM_CONFIG_DIR)/" "$(MAC_NVIM_CONFIG_GIT)/" 70 + @echo "Writing files sync completed!" 71 + @make -s network-off 72 + @echo "=== Pi to Mac sync process completed successfully! ===" 73 + 74 + # Sync from Mac to Pi 75 + .PHONY: from-mac 76 + from-mac: network-on time-sync 77 + @echo "=== Starting Mac to Pi sync process ===" 78 + 79 + @echo "Syncing SecondBrain contents..." 80 + @rsync -avz "$(MAC_SECONDBRAIN_DIR)/" "$(PI_SECONDBRAIN_DIR)/" 81 + @echo "SecondBrain contents sync completed!" 82 + 83 + @make -s network-off 84 + @echo "=== Mac to Pi sync process completed successfully! ===" 85 + 86 + # Complete sync in both directions 87 + .PHONY: sync-all 88 + sync-all: network-on time-sync to-mac from-mac network-off 89 + 90 + # Install packages 91 + .PHONY: install 92 + install: 93 + @echo "Installing required packages..." 94 + @cd install && ./install-wp.sh 95 + @echo "Installation complete!"
+4
micro-journal/scripts/config.sh
··· 1 + sudo systemctl start NetworkManager.service 2 + sudo raspi-config 3 + sudo systemctl stop NetworkManager.service 4 +
+1
micro-journal/scripts/font.sh
··· 1 + sudo dpkg-reconfigure console-setup
+7
micro-journal/scripts/newfile.sh
··· 1 + #!/bin/bash 2 + 3 + # Get the current date and time in the format YYYY.MM.DD-HHMM 4 + filename=$(date +"%Y.%m.%d-%H%M.wg") 5 + 6 + # Run WordGrinder with the generated filename 7 + wordgrinder "documents/$filename"
+27
micro-journal/scripts/share.sh
··· 1 + #!/bin/bash 2 + 3 + # Function to run when Ctrl + C (SIGINT) is detected 4 + cleanup() { 5 + echo "Disabling NetworkManager.service..." 6 + sudo systemctl stop NetworkManager.service 7 + echo "NetworkManager.service disabled." 8 + exit 0 9 + } 10 + 11 + # Trap Ctrl + C (SIGINT) and call the cleanup function 12 + trap cleanup SIGINT 13 + 14 + sudo systemctl start NetworkManager.service 15 + sleep 10 16 + echo "########################################" 17 + echo "Open http://$(hostname -I | awk '{print $1}'):8080 in your web browser" 18 + echo "Ctrl + C to exit" 19 + echo "########################################" 20 + 21 + # Start the file browser, suppressing output 22 + filebrowser -r ~/microjournal/documents -a 0.0.0.0 --noauth -d ~/file.db > /dev/null 2>&1 23 + 24 + # Wait indefinitely until Ctrl + C is pressed 25 + while true; do 26 + sleep 1 27 + done
+1
micro-journal/scripts/shutdown.sh
··· 1 + sudo shutdown now
+8
micro-journal/scripts/startnetwork.sh
··· 1 + #!/bin/bash 2 + 3 + #Start NetworkManager 4 + 5 + sudo systemctl start NetworkManager 6 + 7 + 8 + # connect to wifi with: `nmcli` device wifi connect "YourNetworkName" password "YourPassword"
+5
micro-journal/scripts/stopnetwork.sh
··· 1 + #!/bin/bash 2 + 3 + #Stop NetworkManager 4 + 5 + sudo systemctl stop NetworkManager
+37
micro-journal/scripts/time.sh
··· 1 + #!/bin/bash 2 + 3 + # Script to sync system time with internet time (Eastern US timezone) 4 + # No additional software required 5 + 6 + # Check if running as root 7 + if [ "$(id -u)" -ne 0 ]; then 8 + echo "This script must be run as root. Please use sudo." 9 + exit 1 10 + fi 11 + 12 + echo "Fetching current internet time..." 13 + 14 + # Get the HTTP date header from Google 15 + RAW_DATE=$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | sed 's/Date: //') 16 + 17 + # Remove carriage return if present 18 + RAW_DATE=$(echo "$RAW_DATE" | tr -d '\r') 19 + 20 + if [ -z "$RAW_DATE" ]; then 21 + echo "Failed to retrieve time from internet. Check your connection." 22 + exit 1 23 + fi 24 + 25 + echo "Internet time (GMT): $RAW_DATE" 26 + 27 + # Set the system time to GMT first 28 + echo "Setting system clock to GMT time..." 29 + date -s "$RAW_DATE" 30 + 31 + # Now set the timezone to Eastern 32 + echo "Setting timezone to Eastern US..." 33 + export TZ="America/New_York" 34 + 35 + echo "System time is now set to: $(date)" 36 + 37 + echo "Time synchronization complete!"