diff --git a/README.md b/README.md index cf13bf1..f8b0021 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,8 @@ function nvim() { local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw") fi # make sure there is a folder for sessions on default path - mkdir -p ~/.local/share/nvim/sessions + mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada/ + touch ~/.local/state/nvim/shada/main.shada echo "Files mount options: ${MOUNT_FILE[*]}" echo "Folder mount options: ${MOUNT_FOLDER[*]}" @@ -98,6 +99,7 @@ function nvim() { -e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \ -v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \ -v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions:rw \ + -v ~/.local/state/nvim/shada/main.shada:/root/.local/state/nvim/shada/main.shada:rw \ "${MOUNT_FILE[@]}" \ "${MOUNT_FOLDER[@]}" \ neovim:latest "$@" @@ -138,7 +140,8 @@ function nvim_project() { local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw") fi # make sure there is a folder for sessions on default path - mkdir -p ~/.local/share/nvim/sessions + mkdir -p ~/.local/share/nvim/sessions ~/.local/state/nvim/shada/ + touch ~/.local/state/nvim/shada/main.shada echo "Files mount options: ${MOUNT_FILE[*]}" echo "Folder mount options: ${MOUNT_FOLDER[*]}" @@ -147,6 +150,7 @@ function nvim_project() { -e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \ -v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \ -v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions:rw \ + -v ~/.local/state/nvim/shada/main.shada:/root/.local/state/nvim/shada/main.shada:rw \ "${MOUNT_FILE[@]}" \ "${MOUNT_FOLDER[@]}" \ --entrypoint bash \ @@ -251,9 +255,12 @@ All that is saved in image, so that is why image is so heavy. |\fg| Live grep| |\fb| Buffers| |\fh |Help tags| +|Ctrl+/|Show mappings for picker actions (insert mode)| |Ctrl+q| Open search result list as a dedicated split (quickfix list) (will overwrite previous one created this way in current tab)| |Ctrl+u | Scroll preview up| |Ctrl+d | Scroll preview down| +|Ctrl+f|Scroll left in preview window| +|Ctrl+k|Scroll right in preview window| |Ctrl+x |Open selection as a split| |Ctrl+v | Open selection as a vsplit| |Ctrl+t | Open selection in new tab | @@ -278,6 +285,17 @@ Ctrl+g show current code chunk changes |\hR| reset whole buffer| |\td| toggle deleted | +##### Telescope git stuff + +Commands: `:Telescope git_*` + +Bindings: +|keys|action| +|----|----| +|gs|git_status| +|gc|git_commits| +|gb|git_branches| + Genreal git commands: ```bash diff --git a/lua/general.lua b/lua/general.lua index 16b4b41..145262f 100644 --- a/lua/general.lua +++ b/lua/general.lua @@ -34,7 +34,10 @@ function switch_virtual_text() }) end map("n", "vt", ":lua switch_virtual_text()") -map("t", "", ":Telescope command_history") +map("c", "", ":Telescope command_history") +map("n", "gs", ":Telescope git_status") +map("n", "gc", ":Telescope git_commits") +map("n", "gb", ":Telescope git_branches") -- tab lines in normal and visual mode map("n", "", ">>") diff --git a/lua/lazy-load.lua b/lua/lazy-load.lua index 483489c..f41cae3 100644 --- a/lua/lazy-load.lua +++ b/lua/lazy-load.lua @@ -114,7 +114,8 @@ require("lazy").setup({ { 'stephpy/vim-yaml' }, -- for proper sls syntax highlighting when jinja { 'lukas-reineke/indent-blankline.nvim', - opts = require('plugins.indent-blankline').config + main = "ibl", + init = require('plugins.indent-blankline').init }, { 'MunifTanjim/nui.nvim' }, { diff --git a/lua/plugins/indent-blankline.lua b/lua/plugins/indent-blankline.lua index 1440ae6..598e5a0 100644 --- a/lua/plugins/indent-blankline.lua +++ b/lua/plugins/indent-blankline.lua @@ -1,7 +1,30 @@ -return { - config = { - space_char_blankline = " ", - show_current_context = true, - show_current_context_start = true, +function init() + local highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", } + + local hooks = require "ibl.hooks" + -- create the highlight groups in the highlight setup hook, so they are reset + -- every time the colorscheme changes + hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) + vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) + vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) + vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) + vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) + vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) + vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) + end) + + require("ibl").setup { indent = { highlight = highlight } } +end + +return { + init = init }