feat(nvim+tmux): fetch and reload config
This commit is contained in:
parent
622e6b478e
commit
74270c1516
@ -29,7 +29,7 @@ multiplier = 3
|
||||
|
||||
[window]
|
||||
dynamic_title = true
|
||||
opacity = 0.87
|
||||
opacity = 0.8
|
||||
|
||||
[window.dimensions]
|
||||
columns = 150
|
||||
|
||||
@ -140,6 +140,23 @@ map("n", "<Leader>pm", "<cmd>Mason<CR>",
|
||||
{desc = "LSP Manager"})
|
||||
|
||||
|
||||
local function reload_config()
|
||||
vim.cmd.source('~/.config/nvim/init.lua')
|
||||
vim.notify('Config reloaded...', vim.log.levels.INFO)
|
||||
end
|
||||
|
||||
local function fetch_and_reload_config()
|
||||
vim.fn.system('git -C ~/dotfiles pull')
|
||||
reload_config()
|
||||
end
|
||||
|
||||
map("n", "<Leader>pr", reload_config,
|
||||
{desc = "Reload config"})
|
||||
|
||||
map("n", "<Leader>pR", fetch_and_reload_config,
|
||||
{desc = "Fetch and reload config"})
|
||||
|
||||
|
||||
vim.cmd(
|
||||
[[
|
||||
menu Encoding.koi8-r :e ++enc=koi8-r ++ff=unix<CR>
|
||||
|
||||
@ -50,6 +50,7 @@ bind l confirm-before -p "lock tmux? (y/n)" lock-session
|
||||
|
||||
# Reload config
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded..."
|
||||
bind R if-shell "git -C ~/dotfiles pull" "source-file '$HOME/.config/tmux/tmux.conf' \; display-message 'Config reloaded...'" "display-message 'Error while fetching config'"
|
||||
|
||||
|
||||
# Panes navigation
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user