From 2bc8f2ed5d27f873aa2cbd531a15005f92ff9d75 Mon Sep 17 00:00:00 2001 From: Ihar Hancharenka Date: Thu, 2 May 2024 15:21:03 +0300 Subject: [PATCH] m --- os/editors/neovim/dist/nvchad/cfg.txt | 32 ++++++++++++++++++++++++ os/editors/neovim/dist/nvchad/nvchad.txt | 7 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/os/editors/neovim/dist/nvchad/cfg.txt b/os/editors/neovim/dist/nvchad/cfg.txt index afe9e2f28..781749b4d 100644 --- a/os/editors/neovim/dist/nvchad/cfg.txt +++ b/os/editors/neovim/dist/nvchad/cfg.txt @@ -1,5 +1,10 @@ https://nvchad.com/docs/features/ +~/.local/share/nvim/ + +cloned +https://github.com/NvChad/NvChad + ~/.config/nvim/ lua/ plugins @@ -46,3 +51,30 @@ https://github.com/creativenull/dotfiles/blob/main/config/nvim/init.lua#L70 end end, }) + +at my rhino: +~/.config/nvim/lua/custom/init.lua +-- local autocmd = vim.api.nvim_create_autocmd + +-- Auto resize panes when resizing nvim window +-- autocmd("VimResized", { +-- pattern = "*", +-- command = "tabdo wincmd =", +-- }) + +-- --- +-- When editing a file, always jump to the last known cursor position. +-- Don't do it when the position is invalid, when inside an event handler +-- (happens when dropping a file on gvim) and for a commit message (it's +-- likely a different one than last time). +vim.api.nvim_create_autocmd('BufReadPost', { + -- group = vim.g.user.event, + callback = function(args) + local valid_line = vim.fn.line([['"]]) >= 1 and vim.fn.line([['"]]) < vim.fn.line('$') + local not_commit = vim.b[args.buf].filetype ~= 'commit' + + if valid_line and not_commit then + vim.cmd([[normal! g`"]]) + end + end, +}) diff --git a/os/editors/neovim/dist/nvchad/nvchad.txt b/os/editors/neovim/dist/nvchad/nvchad.txt index 903358178..9cdfa2cad 100644 --- a/os/editors/neovim/dist/nvchad/nvchad.txt +++ b/os/editors/neovim/dist/nvchad/nvchad.txt @@ -3,9 +3,14 @@ https://nvchad.github.io/ https://github.com/NvChad/NvChad https://github.com/NvChad/NvChad/discussions +https://nvchad.com/docs/quickstart/install/ + Update + :Lazy sync + https://nvchad.github.io/features https://nvchad.github.io/config/walkthrough -https://nvchad.github.io/getting-started/setup + !!! +https://nvchad.com/docs/features#statusline https://docs.rockylinux.org/books/nvchad/nvchad_ui/plugins_manager/ !