From 3c5a2f75087a596f28f8b10afbcc8fb82937e137 Mon Sep 17 00:00:00 2001 From: dlsaldanas Date: Thu, 5 Feb 2026 09:17:13 -0300 Subject: [PATCH] latest --- README.md | 2 +- lua/custom/plugins/init.lua | 8 +-- lua/lazy-plugins.lua | 2 +- lua/options.lua | 24 +++++++++ session.vim | 99 +++++++++++++++++++++++++++++++++++++ 5 files changed, 127 insertions(+), 8 deletions(-) create mode 100644 session.vim diff --git a/README.md b/README.md index ce8cceda..e127e8d3 100644 --- a/README.md +++ b/README.md @@ -257,7 +257,7 @@ available methods being discussed
Bob [Bob](https://github.com/MordechaiHadad/bob) is a Neovim version manager for -all platforms. Simply install +all plattforms. Simply install [rustup](https://rust-lang.github.io/rustup/installation/other.html), and run the following commands: diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 2b020f06..0c7f0b97 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -9,10 +9,8 @@ vim.g.netrw_banner = '0' -- disable topbar -- vim.g.netrw_browse_split = 4 -- open in prior buffer/window -- -- vim.g.netrw_altv = 1 -- open fle splits to the right vim.g.netrw_liststyle = 3 -- tree view --- vim.g.netrw_winsize = 25 -- length of the window vim.diagnostic.config { virtual_text = { - -- source = "always", -- Or "if_many" prefix = '●', -- Could be '■', '▎', 'x' }, severity_sort = true, @@ -32,14 +30,12 @@ vim.keymap.set('n', 'yb', 'let @+ = expand("%")', { desc = 'yan vim.opt.completeopt = { 'menuone', 'fuzzy', 'noinsert', 'preview' } vim.o.omnifunc = 'v:lua.vim.lsp.omnifunc' --- vim.diagnostic.config { --- virtual_text = false, --- } -- never use tabs vim.o.expandtab = true +-- evitar folds +vim.o.foldlevelstart = 99 local set = vim.opt_local set.shiftwidth = 2 vim.o.shiftwidth = 2 -vim.keymap.set('n', 'yb', 'let @+ = expand("%")', { desc = 'yank to plus register current relative path' }) return {} diff --git a/lua/lazy-plugins.lua b/lua/lazy-plugins.lua index ba002784..ae319fda 100644 --- a/lua/lazy-plugins.lua +++ b/lua/lazy-plugins.lua @@ -155,7 +155,7 @@ require('lazy').setup({ -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, {}) -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/options.lua b/lua/options.lua index a636e355..cb3f5e79 100644 --- a/lua/options.lua +++ b/lua/options.lua @@ -38,5 +38,29 @@ vim.o.completeopt = 'menuone,noselect' -- NOTE: You should make sure your terminal supports this vim.o.termguicolors = true +-- Sets how neovim will display certain whitespace characters in the editor. +-- See `:help 'list'` +-- and `:help 'listchars'` +-- +-- Notice listchars is set using `vim.opt` instead of `vim.o`. +-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables. +-- See `:help lua-options` +-- and `:help lua-guide-options` +vim.o.list = true +vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } + +-- Preview substitutions live, as you type! +vim.o.inccommand = 'split' + +-- Show which line your cursor is on +vim.o.cursorline = true + +-- Minimal number of screen lines to keep above and below the cursor. +vim.o.scrolloff = 10 + +-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), +-- instead raise a dialog asking if you wish to save the current file(s) +-- See `:help 'confirm'` +vim.o.confirm = true -- vim: ts=2 sts=2 sw=2 et diff --git a/session.vim b/session.vim new file mode 100644 index 00000000..5ff6c16f --- /dev/null +++ b/session.vim @@ -0,0 +1,99 @@ +let SessionLoad = 1 +let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 +let v:this_session=expand(":p") +silent only +silent tabonly +cd ~/.config/nvim +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +let s:shortmess_save = &shortmess +if &shortmess =~ 'A' + set shortmess=aoOA +else + set shortmess=aoO +endif +badd +6 lua/kickstart/plugins/treesitter.lua +badd +1 ~/.local/share/nvim/lazy/nvim-treesitter/lua/nvim-treesitter.lua +badd +126 lua/kickstart/plugins/lspconfig.lua +argglobal +%argdel +edit ~/.local/share/nvim/lazy/nvim-treesitter/lua/nvim-treesitter.lua +let s:save_splitbelow = &splitbelow +let s:save_splitright = &splitright +set splitbelow splitright +wincmd _ | wincmd | +vsplit +1wincmd h +wincmd w +let &splitbelow = s:save_splitbelow +let &splitright = s:save_splitright +wincmd t +let s:save_winminheight = &winminheight +let s:save_winminwidth = &winminwidth +set winminheight=0 +set winheight=1 +set winminwidth=0 +set winwidth=1 +exe 'vert 1resize ' . ((&columns * 77 + 77) / 155) +exe 'vert 2resize ' . ((&columns * 77 + 77) / 155) +argglobal +balt lua/kickstart/plugins/treesitter.lua +setlocal foldmethod=expr +setlocal foldexpr=v:lua.vim.treesitter.foldexpr() +setlocal foldmarker={{{,}}} +setlocal foldignore=# +setlocal foldlevel=99 +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal nofoldenable +let s:l = 1 - ((0 * winheight(0) + 20) / 40) +if s:l < 1 | let s:l = 1 | endif +keepjumps exe s:l +normal! zt +keepjumps 1 +normal! 0 +wincmd w +argglobal +if bufexists(fnamemodify("lua/kickstart/plugins/lspconfig.lua", ":p")) | buffer lua/kickstart/plugins/lspconfig.lua | else | edit lua/kickstart/plugins/lspconfig.lua | endif +if &buftype ==# 'terminal' + silent file lua/kickstart/plugins/lspconfig.lua +endif +balt ~/.local/share/nvim/lazy/nvim-treesitter/lua/nvim-treesitter.lua +setlocal foldmethod=expr +setlocal foldexpr=v:lua.vim.treesitter.foldexpr() +setlocal foldmarker={{{,}}} +setlocal foldignore=# +setlocal foldlevel=99 +setlocal foldminlines=1 +setlocal foldnestmax=20 +setlocal nofoldenable +let s:l = 126 - ((18 * winheight(0) + 20) / 40) +if s:l < 1 | let s:l = 1 | endif +keepjumps exe s:l +normal! zt +keepjumps 126 +normal! 09| +wincmd w +2wincmd w +exe 'vert 1resize ' . ((&columns * 77 + 77) / 155) +exe 'vert 2resize ' . ((&columns * 77 + 77) / 155) +tabnext 1 +if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal' + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 +let &shortmess = s:shortmess_save +let &winminheight = s:save_winminheight +let &winminwidth = s:save_winminwidth +let s:sx = expand(":p:r")."x.vim" +if filereadable(s:sx) + exe "source " . fnameescape(s:sx) +endif +let &g:so = s:so_save | let &g:siso = s:siso_save +set hlsearch +nohlsearch +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim :