Skip to content

Commit

Permalink
feat(nvim): plugin changes
Browse files Browse the repository at this point in the history
  • Loading branch information
umgbhalla committed Jan 3, 2023
1 parent f8f8aba commit 317939a
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions base/nvim/.config/nvim/lua/user/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ local config = {
-- You can also add new plugins here as well:
-- Add plugins, the packer syntax without the "use"
{ "folke/tokyonight.nvim" },
{ "arecarn/vim-fold-cycle" },
{ "pseewald/vim-anyfold" },
{
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
event = "UIEnter",
Expand Down Expand Up @@ -338,6 +340,58 @@ local config = {
virtual_text = false,
virtual_lines = { only_current_line = true },
}
vim.cmd [[
filetype plugin indent on
syntax on
augroup anyfold
autocmd!
autocmd Filetype css,c,cpp,rust,lua,go,javascript AnyFoldActivate
autocmd Filetype rust set foldignore=#/
autocmd Filetype lua set foldignore=--
set foldlevel=0
augroup END
let g:LargeFile = 1000000 " file is large if size greater than 1MB
autocmd BufReadPre,BufRead * let f=getfsize(expand("<afile>")) | if f > g:LargeFile || f == -2 | call LargeFile() | endif
function LargeFile()
augroup anyfold
autocmd! " remove AnyFoldActivate
autocmd Filetype <filetype> setlocal foldmethod=indent " fall back to indent folding
augroup END
endfunction
]]
-- -- general settings
-- vim.cmd [[
-- augroup _general_settings
-- autocmd!
-- autocmd FileType qf,help,man,lspinfo nnoremap <silent> <buffer> q :close<CR>
-- autocmd TextYankPost * silent!lua require('vim.highlight').on_yank({higroup = 'Visual', timeout = 200})
-- autocmd BufWinEnter * :set formatoptions-=cro
-- autocmd FileType qf set nobuflisted
-- augroup end
-- augroup _git
-- autocmd!
-- autocmd FileType gitcommit setlocal wrap
-- autocmd FileType gitcommit setlocal spell
-- augroup end
-- augroup _markdown
-- autocmd!
-- autocmd FileType markdown setlocal wrap
-- autocmd FileType markdown setlocal spell
-- augroup end
-- augroup _auto_resize
-- autocmd!
-- autocmd VimResized * tabdo wincmd =
-- augroup end
-- augroup _alpha
-- autocmd!
-- autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
-- augroup end
-- augroup _lsp
-- autocmd!
-- autocmd BufWritePre * lua vim.lsp.buf.formatting()
-- augroup end
-- ]]
--
end,
}

Expand Down

0 comments on commit 317939a

Please sign in to comment.