fixes, new bindings for telescope with git
This commit is contained in:
parent
88f559539a
commit
291250092b
4 changed files with 54 additions and 9 deletions
22
README.md
22
README.md
|
@ -89,7 +89,8 @@ function nvim() {
|
||||||
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
||||||
fi
|
fi
|
||||||
# make sure there is a folder for sessions on default path
|
# 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 "Files mount options: ${MOUNT_FILE[*]}"
|
||||||
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
||||||
|
@ -98,6 +99,7 @@ function nvim() {
|
||||||
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
||||||
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \
|
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \
|
||||||
-v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions: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_FILE[@]}" \
|
||||||
"${MOUNT_FOLDER[@]}" \
|
"${MOUNT_FOLDER[@]}" \
|
||||||
neovim:latest "$@"
|
neovim:latest "$@"
|
||||||
|
@ -138,7 +140,8 @@ function nvim_project() {
|
||||||
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
local MOUNT_FOLDER=(--workdir "/data$base_path" -v "$base_path:/data$base_path:rw")
|
||||||
fi
|
fi
|
||||||
# make sure there is a folder for sessions on default path
|
# 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 "Files mount options: ${MOUNT_FILE[*]}"
|
||||||
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
echo "Folder mount options: ${MOUNT_FOLDER[*]}"
|
||||||
|
@ -147,6 +150,7 @@ function nvim_project() {
|
||||||
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
-e WAYLAND_DISPLAY="$WAYLAND_DISPLAY" \
|
||||||
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \
|
-v "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/runtime_dir/$WAYLAND_DISPLAY:rw" \
|
||||||
-v ~/.local/share/nvim/sessions:/root/.local/share/nvim/sessions: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_FILE[@]}" \
|
||||||
"${MOUNT_FOLDER[@]}" \
|
"${MOUNT_FOLDER[@]}" \
|
||||||
--entrypoint bash \
|
--entrypoint bash \
|
||||||
|
@ -251,9 +255,12 @@ All that is saved in image, so that is why image is so heavy.
|
||||||
|\<leader\>fg| Live grep|
|
|\<leader\>fg| Live grep|
|
||||||
|\<leader\>fb| Buffers|
|
|\<leader\>fb| Buffers|
|
||||||
|\<leader\>fh |Help tags|
|
|\<leader\>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+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+u | Scroll preview up|
|
||||||
|Ctrl+d | Scroll preview down|
|
|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+x |Open selection as a split|
|
||||||
|Ctrl+v | Open selection as a vsplit|
|
|Ctrl+v | Open selection as a vsplit|
|
||||||
|Ctrl+t | Open selection in new tab |
|
|Ctrl+t | Open selection in new tab |
|
||||||
|
@ -278,6 +285,17 @@ Ctrl+g show current code chunk changes
|
||||||
|\<leader\>hR| reset whole buffer|
|
|\<leader\>hR| reset whole buffer|
|
||||||
|\<leader\>td| toggle deleted |
|
|\<leader\>td| toggle deleted |
|
||||||
|
|
||||||
|
##### Telescope git stuff
|
||||||
|
|
||||||
|
Commands: `:Telescope git_*`
|
||||||
|
|
||||||
|
Bindings:
|
||||||
|
|keys|action|
|
||||||
|
|----|----|
|
||||||
|
|<leader>gs|git_status|
|
||||||
|
|<leader>gc|git_commits|
|
||||||
|
|<leader>gb|git_branches|
|
||||||
|
|
||||||
Genreal git commands:
|
Genreal git commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -34,7 +34,10 @@ function switch_virtual_text()
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
map("n", "<leader>vt", ":lua switch_virtual_text()<CR>")
|
map("n", "<leader>vt", ":lua switch_virtual_text()<CR>")
|
||||||
map("t", "<C-r>", ":Telescope command_history<CR>")
|
map("c", "<C-r>", ":Telescope command_history<CR>")
|
||||||
|
map("n", "<leader>gs", ":Telescope git_status<CR>")
|
||||||
|
map("n", "<leader>gc", ":Telescope git_commits<CR>")
|
||||||
|
map("n", "<leader>gb", ":Telescope git_branches<CR>")
|
||||||
|
|
||||||
-- tab lines in normal and visual mode
|
-- tab lines in normal and visual mode
|
||||||
map("n", "<Tab>", ">>")
|
map("n", "<Tab>", ">>")
|
||||||
|
|
|
@ -114,7 +114,8 @@ require("lazy").setup({
|
||||||
{ 'stephpy/vim-yaml' }, -- for proper sls syntax highlighting when jinja
|
{ 'stephpy/vim-yaml' }, -- for proper sls syntax highlighting when jinja
|
||||||
{
|
{
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
'lukas-reineke/indent-blankline.nvim',
|
||||||
opts = require('plugins.indent-blankline').config
|
main = "ibl",
|
||||||
|
init = require('plugins.indent-blankline').init
|
||||||
},
|
},
|
||||||
{ 'MunifTanjim/nui.nvim' },
|
{ 'MunifTanjim/nui.nvim' },
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,30 @@
|
||||||
return {
|
function init()
|
||||||
config = {
|
local highlight = {
|
||||||
space_char_blankline = " ",
|
"RainbowRed",
|
||||||
show_current_context = true,
|
"RainbowYellow",
|
||||||
show_current_context_start = true,
|
"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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue