p00f / cphelper.nvim

Neovim helper for competitive programming. Use https://sr.ht/~p00f/cphelper.nvim instead
MIT License
130 stars 9 forks source link

Folds in Case output in cphtest #30

Closed anurag3301 closed 1 year ago

anurag3301 commented 1 year ago

Hey, is there a change in the plugin which makes the output of testcases in CphTest folded like this

image

Or there is something wrong with my overall nvim configuration My nvim configuration if you wanna have a look https://github.com/anurag3301/my-linux-setup/tree/main/config/nvim

And is there a change in the configuration style of this plugin because this doesn't seem to be working

-- CpHelper config
vim.g.cphdir = os.getenv( 'HOME' )..'/problems'
p00f commented 1 year ago

For folds you just go to the line after Case #XXX ie Input: and press zc

Regarding the latter, yes there is a change in the config: https://git.sr.ht/~p00f/cphelper.nvim/commit/c873e28fa743324bb949ef0f33eeaf49d059af08

anurag3301 commented 1 year ago

Is it possible to not make it fold like it was previously?

anurag3301 commented 1 year ago

And regarding the change, can you please tell me a simple syntax to write the configuration for the following, I am not very familiar with lua syntax

vim.g.cphdir = os.getenv( 'HOME' )..'/problems'
p00f commented 1 year ago
  1. autocmd FileType Results setlocal foldlevel=5
  2. change vim.g.cphdir to vim.g["cph#dir"]
anurag3301 commented 1 year ago

Perfect, thank you :), closing the issue.