clone of my dotfiles.ssp.sh
1
fork

Configure Feed

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

stow: nvim-wp

sspaeti 0abf1c2e 56156393

+1888
+74
nvim/.config/nvim-wp/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 + Move this config to `~/.config/nvim` after you installed neovim (see `make install` in [/install](/install) directory). 6 + 7 + 8 + 9 + ### Zen Mode 10 + ![](wordprocessor.jpg) 11 + 12 + > **Note**: Activate `zen-mode` with `leader+z` to get into the focus mode. This will center text, hide tmux when active, and many more. 13 + ### Default with Outline 14 + ![](wordprocessor-outline.jpg) 15 + 16 + ### Micro Journal 17 + 18 + Debian, low-power and tty (low color) nvim dotfiles are in [micro-journal/configs/nvim](../micro-journal/configs/nvim). This folder here `nvim-wp` is the wordprocessor on a high-power or normal laptop. 19 + 20 + 21 + ## Font 22 + 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**. 23 + 24 + Install 25 + ```sh 26 + # Install Iosevka Etoile Font for Terminal Writing 27 + 28 + # 1. Install required tools 29 + sudo apt update 30 + sudo apt install curl jq unzip 31 + 32 + # 2. Create temporary directory and move to it 33 + mkdir -p ~/temp/fonts && cd ~/temp/fonts 34 + 35 + # 3. Download latest Iosevka Etoile package 36 + curl -s 'https://api.github.com/repos/be5invis/Iosevka/releases/latest' | \ 37 + jq -r ".assets[] | .browser_download_url" | \ 38 + grep PkgTTC-IosevkaEtoile | \ 39 + xargs -n 1 curl -L -O --fail --silent --show-error 40 + 41 + # 4. Extract the font files 42 + unzip PkgTTC-IosevkaEtoile-*.zip 43 + 44 + # 5. Create font directory (user-level installation) 45 + mkdir -p ~/.local/share/fonts/iosevka-etoile 46 + 47 + # 6. Copy font files to your fonts directory 48 + cp ttc/*.ttc ~/.local/share/fonts/iosevka-etoile/ 49 + 50 + # 7. Update the font cache 51 + sudo fc-cache -f -v 52 + 53 + # 8. Verify installation (should show Iosevka in the output) 54 + fc-list | grep Iosevka 55 + 56 + # 9. Clean up temporary files 57 + cd ~ 58 + rm -rf ~/temp/fonts 59 + ``` 60 + 61 + 62 + ### Using in Terminal 63 + - Open your terminal preferences 64 + - Select "Iosevka Etoile" from the font dropdown 65 + - Adjust the size to your preference (recommended: 12-14pt) 66 + ### Why Iosevka Etoile? 67 + Iosevka Etoile offers: 68 + 69 + - Serif-inspired letterforms that are easy on the eyes for long-form writing 70 + - Terminal compatibility with monospaced alignment 71 + - Narrow width allowing more text on screen 72 + - Elegant aesthetic while maintaining technical requirements 73 + 74 + Alternative would be **Iosekvka Aile**.
+1
nvim/.config/nvim-wp/init.lua
··· 1 + require("sspaeti")
+58
nvim/.config/nvim-wp/lazy-lock.json
··· 1 + { 2 + "aerial.nvim": { "branch": "master", "commit": "3284a2cb858ba009c79da87d5e010ccee3c99c4d" }, 3 + "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, 4 + "catppuccin": { "branch": "main", "commit": "7ab1a6ec70a664ecb95d84669efc20aaf4f4ed1b" }, 5 + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 6 + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, 7 + "fzf": { "branch": "master", "commit": "3ba82b6d87348b119f9a7fd168ad8a597a18b4b2" }, 8 + "fzf.vim": { "branch": "master", "commit": "f06bd1e69b7e5c77dbdef40ca8d31292fc926d3c" }, 9 + "github-nvim-theme": { "branch": "main", "commit": "8db454eb272eabb349209ec62ceb63b8eea5f011" }, 10 + "gruvbox-material": { "branch": "master", "commit": "30e9f4b0fa24c25980df1690a8c47c36e40b6673" }, 11 + "gruvbox.nvim": { "branch": "main", "commit": "089b60e92aa0a1c6fa76ff527837cd35b6f5ac81" }, 12 + "highlight-undo.nvim": { "branch": "main", "commit": "a5e2e2d43f6d131bf526619baeeeec32397b0789" }, 13 + "indent-blankline.nvim": { "branch": "master", "commit": "9637670896b68805430e2f72cf5d16be5b97a22a" }, 14 + "kanagawa-paper.nvim": { "branch": "master", "commit": "984256ecb54874f021341c972482b81e326acd06" }, 15 + "kanagawa.nvim": { "branch": "master", "commit": "cfd67b0e1eeaa04302b8c7eb072253d24bf22d84" }, 16 + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 17 + "lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" }, 18 + "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, 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": "e96fd85bf18bc345dab332b345098fa5460dffac" }, 25 + "neovim": { "branch": "main", "commit": "7718965bdd1526b233f082da17e88b8bde7a7e6e" }, 26 + "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, 27 + "none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" }, 28 + "nordic.nvim": { "branch": "main", "commit": "62acfd4eb008153180670daf81874eb47dd37739" }, 29 + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, 30 + "nvim-cmp": { "branch": "main", "commit": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3" }, 31 + "nvim-highlight-colors": { "branch": "main", "commit": "a770df5fbd98abbb0fc1a95d9a3f2bb1e51e3e2c" }, 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": "8bc635a25f581d42b0a0e5ba8870bd73244dcdea" }, 36 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ab0950c53d1ae04da8e488aa762b450d5241dca2" }, 37 + "nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" }, 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": "1cd546e96cb8520a148610ca86596ed238eeb936" }, 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": "2556c6800b210b2096b55b66e74b4cc1d9ebbe4f" }, 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": "f445d7b99d049839fa536dcfb7dc893648e0f67a" }, 57 + "zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" } 58 + }
nvim/.config/nvim-wp/lua/.DS_Store

This is a binary file and will not be displayed.

+15
nvim/.config/nvim-wp/lua/sspaeti/custom.lua
··· 1 + --custom function to set colortheme based on session session_name 2 + --please make sure that the theme isn't loaded lazy when set as initial theme 3 + function SetThemeBasedOnTmuxSession(sessionThemes) 4 + local handle = io.popen("tmux display-message -p '#S'") 5 + local session_name = handle:read("*a") 6 + handle:close() 7 + 8 + session_name = session_name:gsub("%s+", "") 9 + 10 + local theme = sessionThemes[session_name] or sessionThemes["default"] 11 + vim.cmd("colorscheme " .. theme) 12 + 13 + -- Call the transparency function after setting the colorscheme 14 + -- require("sspaeti.transparency").set_transparency() 15 + end
+13
nvim/.config/nvim-wp/lua/sspaeti/init.lua
··· 1 + require("sspaeti.custom") 2 + require("sspaeti.lazy") 3 + require("theme.kanagawa") 4 + require("sspaeti.set") 5 + -- markdown specific: run after set above as it should overwrite default settings 6 + require("sspaeti.remap") 7 + require("sspaeti.set_wp") 8 + 9 + --remove in order to set in set_wp.lua 10 + --vim.opt.listchars = { eol = "↵", tab = "→ ", trail = "·", extends = "$" } 11 + --lead = '·', 12 + vim.opt.list = true 13 +
+48
nvim/.config/nvim-wp/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 + -- define colorscheme based on session name 18 + local sessionThemes = { 19 + ["work"] = "gruvbox-material", 20 + ["dotfiles"] = "kanagawa-paper", --also "solarizev-osaka", 21 + ["de-projects"] = "rose-pine", 22 + ["DEDP"] = "rose-pine", 23 + ["default"] = "kanagawa", --required: default theme 24 + } 25 + 26 + 27 + --lazy stuff 28 + require("lazy").setup({ { import = "sspaeti.plugins" }, { import = "sspaeti.plugins.lsp" } }, { 29 + install = { 30 + colorscheme = { sessionThemes["default"] }, 31 + }, 32 + checker = { 33 + enabled = false, 34 + notify = false, 35 + }, 36 + --autoreload notification 37 + change_detection = { 38 + notify = false, 39 + }, 40 + }) 41 + 42 + -- Set color scheme based on tmux session name dynamically. See `sessionThemes` above 43 + vim.api.nvim_create_autocmd("VimEnter", { 44 + pattern = "*", 45 + callback = function() 46 + SetThemeBasedOnTmuxSession(sessionThemes) 47 + end 48 + })
+44
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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 + }
+181
nvim/.config/nvim-wp/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 + --get python virtual env 60 + function split(input, delimiter) 61 + local arr = {} 62 + string.gsub(input, "[^" .. delimiter .. "]+", function(w) 63 + table.insert(arr, w) 64 + end) 65 + return arr 66 + end 67 + 68 + local function get_venv() 69 + local venv = vim.env.VIRTUAL_ENV 70 + if venv then 71 + local params = split(venv, "/") 72 + return "venv:" .. params[table.getn(params)] .. "" 73 + else 74 + return "" 75 + end 76 + end 77 + 78 + --word per minute 79 + local wpm = require("wpm") 80 + 81 + --old config 82 + require("lualine").setup({ 83 + options = { 84 + icons_enabled = true, 85 + -- theme = 'nightfox', 86 + component_separators = { left = "", right = "" }, 87 + section_separators = { left = "", right = "" }, 88 + disabled_filetypes = {}, 89 + always_divide_middle = true, 90 + }, 91 + sections = { 92 + lualine_a = { "mode" }, 93 + lualine_b = {}, 94 + lualine_c = { branch, active_lsp, filename }, 95 + lualine_x = { { prose.word_count, cond = prose.is_available }, 96 + { prose.reading_time, cond = prose.is_available }, 97 + wpm.historic_graph, 98 + diff, diagnostics, 99 + { get_venv, color = { gui = "bold" } } 100 + }, 101 + lualine_y = {}, 102 + lualine_z = { progress, location }, 103 + }, 104 + inactive_sections = { 105 + lualine_a = { filename }, 106 + lualine_b = {}, 107 + lualine_c = {}, 108 + lualine_x = {}, 109 + lualine_y = {}, 110 + lualine_z = {}, 111 + }, 112 + tabline = {}, 113 + extensions = {}, 114 + }) 115 + 116 + --non distracting 117 + -- local colors = { 118 + -- fg = "#76787d", 119 + -- bg = "#252829", 120 + -- } 121 + 122 + -- local copilot = function() 123 + -- local buf_clients = vim.lsp.get_active_clients { bufnr = 0 } 124 + -- if #buf_clients == 0 then 125 + -- return "LSP Inactive" 126 + -- end 127 + 128 + -- local buf_ft = vim.bo.filetype 129 + -- local buf_client_names = {} 130 + -- local copilot_active = false 131 + 132 + -- -- add client 133 + -- for _, client in pairs(buf_clients) do 134 + -- if client.name ~= "null-ls" and client.name ~= "copilot" then 135 + -- table.insert(buf_client_names, client.name) 136 + -- end 137 + 138 + -- if client.name == "copilot" then 139 + -- copilot_active = true 140 + -- end 141 + -- end 142 + 143 + -- if copilot_active then 144 + -- return lvim.icons.git.Octoface 145 + -- end 146 + -- return "" 147 + -- end 148 + 149 + -- require'lualine'.setup { 150 + -- options = { 151 + -- theme = { 152 + -- normal = { 153 + -- a = { fg = colors.fg, bg = colors.bg }, 154 + -- b = { fg = colors.fg, bg = colors.bg }, 155 + -- c = { fg = colors.fg, bg = colors.bg }, 156 + -- }, 157 + -- insert = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 158 + -- visual = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 159 + -- command = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 160 + -- replace = { a = { fg = colors.fg, bg = colors.bg }, b = { fg = colors.fg, bg = colors.bg } }, 161 + 162 + -- inactive = { 163 + -- a = { bg = colors.fg, fg = colors.bg }, 164 + -- b = { bg = colors.fg, fg = colors.bg }, 165 + -- c = { bg = colors.fg, fg = colors.bg }, 166 + -- }, 167 + -- } 168 + -- }, 169 + -- sections = { 170 + -- lualine_a = { "branch" }, 171 + -- lualine_b = { "filename" }, 172 + -- lualine_c = { 173 + -- diagnostics, 174 + -- }, 175 + -- lualine_x = { wpm.historic_graph, {get_venv, color={gui='bold'}}, location }, 176 + -- lualine_y = { copilot, filetype }, 177 + -- lualine_z = { "progress" }, 178 + -- }, 179 + -- } 180 + end, 181 + }
+114
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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 + }
+43
nvim/.config/nvim-wp/lua/sspaeti/plugins/noice.lua
··· 1 + return { 2 + "folke/noice.nvim", 3 + lazy = false, 4 + priority = 1005, 5 + -- if activated, recording mode will not show 6 + -- event = { "VeryLazy"}, 7 + opts = { 8 + -- add any options here 9 + messages = { 10 + -- NOTE: If you enable messages, then the cmdline is enabled automatically. 11 + -- This is a current Neovim limitation. 12 + 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 13 + }, 14 + routes = { 15 + { --this turns off notification in neo-tree that are distracting 16 + view = 'mini', 17 + filter = { 18 + event = 'notify', 19 + any = { 20 + { find = 'hidden' }, 21 + { find = 'clipboard' }, 22 + { find = 'Deleted' }, 23 + { find = 'Renamed' }, 24 + }, 25 + }, 26 + } 27 + } 28 + 29 + }, 30 + keys = { 31 + { "<leader>mm", ":Noice<CR>", desc = "Show recent messages" }, 32 + { "<leader>lm", ":Noice<CR>", desc = "Show recent messages" }, 33 + }, 34 + 35 + dependencies = { 36 + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries 37 + "MunifTanjim/nui.nvim", 38 + -- OPTIONAL: 39 + -- `nvim-notify` is only needed, if you want to use the notification view. 40 + -- If not available, we use `mini` as the fallback 41 + "rcarriga/nvim-notify", 42 + } 43 + }
+58
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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 + }
+14
nvim/.config/nvim-wp/lua/sspaeti/plugins/nvim-prose.lua
··· 1 + return { 2 + "skwee357/nvim-prose", 3 + event = "VeryLazy", 4 + config = function() 5 + require('nvim-prose').setup { 6 + wpm = 200.0, 7 + filetypes = { 'markdown', 'asciidoc' }, 8 + placeholders = { 9 + words = 'words', 10 + minutes = 'min' 11 + } 12 + } 13 + end 14 + }
+59
nvim/.config/nvim-wp/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 = "personal", 23 + path = "~/Simon/SecondBrain", 24 + } 25 + -- { 26 + -- name = "work", 27 + -- path = "~/vaults/work", 28 + -- }, 29 + }, 30 + templates = { 31 + --TODO: create dedicated templates for neovim with {date} placeholder instead of Templator syntax 32 + folder = "💡 Resources/🛠 Templates/Markdown/", 33 + date_format = "%Y-%m-%d-%a", 34 + time_format = "%H:%M", 35 + }, 36 + 37 + -- Optional, alternatively you can customize the frontmatter data. 38 + ---@return table 39 + note_frontmatter_func = function(note) 40 + -- Add the title of the note as an alias. 41 + if note.title then 42 + note:add_alias(note.title) 43 + end 44 + 45 + --remove default id, aliases and tags: { id = note.id, aliases = note.aliases, tags = note.tags } 46 + local out = { } 47 + 48 + -- `note.metadata` contains any manually added fields in the frontmatter. 49 + -- So here we just make sure those fields are kept in the frontmatter. 50 + if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then 51 + for k, v in pairs(note.metadata) do 52 + out[k] = v 53 + end 54 + end 55 + 56 + return out 57 + end, 58 + }, 59 + }
+85
nvim/.config/nvim-wp/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 = false, 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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/lua/sspaeti/plugins/treesitter.lua
··· 1 + return { 2 + { 3 + "nvim-treesitter/nvim-treesitter", 4 + event = { 'BufReadPre', 'BufNewFile' }, 5 + cmd = { 'TSInstallInfo', 'TSInstall' }, 6 + build = ':TSUpdate', 7 + dependencies = { 8 + 'nvim-treesitter/nvim-treesitter-textobjects', 9 + }, 10 + config = function() 11 + local status_ok, treesitter = pcall(require, 'nvim-treesitter.configs') 12 + 13 + if not status_ok then 14 + return 15 + end 16 + treesitter.setup { 17 + -- ensure_installed = { "vimdoc", "python", "markdown", "markdown_inline", "css", "html", "javascript", "yaml", "bash", "json", "lua", "regex", "sql", "toml", "vim", "rust", "glimmer" }, -- one of "all" or a list of languages 18 + ensure_installed = { "markdown", "markdown_inline" }, 19 + sync_install = false, 20 + auto_install = true, 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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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 = 120, --98, 21 + options = { 22 + relativenumber = false, 23 + signcolumn = "no", 24 + }, 25 + }, 26 + }) 27 + end, 28 + }
+366
nvim/.config/nvim-wp/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
nvim/.config/nvim-wp/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 = os.getenv("HOME") .. "/.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 + ]]
+62
nvim/.config/nvim-wp/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 + vim.opt.relativenumber = false 29 + 30 + 31 + --enter text vertically to maximize focus on current line 32 + vim.opt.scrolloff = 5 --default: 8 33 + 34 + 35 + -- This removes the currly underline below a Markdown link, but keeps the color and icon effect 36 + vim.defer_fn(function() 37 + -- Get current highlight attributes 38 + local current_hl = vim.api.nvim_get_hl(0, { name = "@string.special.url" }) 39 + 40 + -- Create new highlight with same colors but no underline 41 + local new_hl = { 42 + fg = current_hl.fg, 43 + bg = current_hl.bg, 44 + sp = current_hl.sp, 45 + bold = current_hl.bold, 46 + italic = current_hl.italic, 47 + underline = false -- Explicitly remove underline 48 + } 49 + 50 + -- Apply the modified highlight 51 + vim.api.nvim_set_hl(0, "@string.special.url", new_hl) 52 + end, 100) 53 + 54 + 55 + -- -- Auto-enable ZenMode on startup with a slight delay 56 + -- vim.api.nvim_create_autocmd("VimEnter", { 57 + -- callback = function() 58 + -- vim.defer_fn(function() 59 + -- vim.cmd("ZenMode") 60 + -- end, 0.1) -- delay to ensure plugin is loaded 61 + -- end 62 + -- })
+12
nvim/.config/nvim-wp/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 +
nvim/.config/nvim-wp/micro-journal.webp

This is a binary file and will not be displayed.

+4
nvim/.config/nvim-wp/spell/en.utf-8.add
··· 1 + SaaS 2 + laggy 3 + Kubernetes 4 + BigQuery
nvim/.config/nvim-wp/spell/en.utf-8.add.spl

This is a binary file and will not be displayed.

nvim/.config/nvim-wp/wordprocessor-outline.jpg

This is a binary file and will not be displayed.

nvim/.config/nvim-wp/wordprocessor.jpg

This is a binary file and will not be displayed.