add persistence
This commit is contained in:
@@ -40,6 +40,10 @@ vim.filetype.add({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
vim.keymap.set("n", "<leader>qs", function() require("persistence").load() end, { desc = "Restore Session" })
|
||||||
|
vim.keymap.set("n", "<leader>ql", function() require("persistence").load({ last = true }) end, { desc = "Restore Last Session" })
|
||||||
|
vim.keymap.set("n", "<leader>qd", function() require("persistence").stop() end, { desc = "Don't Save Current Session" })
|
||||||
|
|
||||||
require("config.opts")
|
require("config.opts")
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ vim.api.nvim_create_autocmd("BufWritePre", {
|
|||||||
callback = function()
|
callback = function()
|
||||||
for _, client in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do
|
for _, client in pairs(vim.lsp.get_active_clients({ bufnr = 0 })) do
|
||||||
if client.supports_method("textDocument/formatting") then
|
if client.supports_method("textDocument/formatting") then
|
||||||
vim.lsp.buf.format({ async = false })
|
vim.lsp.buf.format({ async = true, timeout_ms=5000 })
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -62,4 +62,10 @@ return {
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"folke/persistence.nvim",
|
||||||
|
event = "BufReadPre",
|
||||||
|
opts = {
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-3
@@ -16,9 +16,6 @@ alias la='ls -lha'
|
|||||||
alias gs='git status'
|
alias gs='git status'
|
||||||
alias v='nvim'
|
alias v='nvim'
|
||||||
|
|
||||||
[ -f ~/.zshrc.local ] && source ~/.zshrc.local
|
|
||||||
[ -f /etc/profile.d/vulkan-sdk.sh ] && source /etc/profile.d/vulkan-sdk.sh
|
|
||||||
|
|
||||||
export CC=/usr/bin/clang
|
export CC=/usr/bin/clang
|
||||||
export CXX=/usr/bin/clang++
|
export CXX=/usr/bin/clang++
|
||||||
export HOSTNAME=$(hostname)
|
export HOSTNAME=$(hostname)
|
||||||
@@ -26,3 +23,8 @@ export HOSTNAME=$(hostname)
|
|||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
. "$HOME/.local/bin/env"
|
. "$HOME/.local/bin/env"
|
||||||
|
|
||||||
|
[ -f ~/.zshrc.local ] && source ~/.zshrc.local
|
||||||
|
[ -f /etc/profile.d/vulkan-sdk.sh ] && source /etc/profile.d/vulkan-sdk.sh
|
||||||
|
|
||||||
|
export PATH="/home/caio/.pixi/bin:$PATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user