Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlighting group CornelisType only affects InfoWindow #153

Open
milaurila opened this issue Jun 14, 2024 · 4 comments
Open

Highlighting group CornelisType only affects InfoWindow #153

milaurila opened this issue Jun 14, 2024 · 4 comments

Comments

@milaurila
Copy link

I am able to change the highlighting in the .agda file buffer of every group I've tried so far, except for CornelisType.
Overriding the settings of this group only changes the colors in the InfoWindow (see screenshot). I'd like these settings
to apply to the file buffer as well, is this possible?

I'm not sure of what parts of my setup are relevant, let me know and I'll provide.

cornelis_hi

@isovector
Copy link
Collaborator

Great color scheme :)

The buffer highlighting comes directly from Agda, so it's a bit hard to say why exactly you're not getting the results you'd like.

As an easy shortcut, you could try copying the colorscheme directly from Certainty by Construction:

https://github.com/isovector/certainty-by-construction/blob/5149d4dbede579599adc9833c1d10ec0f6e85a04/format/tex/agda.sty#L180-L214

If instead you'd like to actually diagnose the problem here, try adding the following code temporarily to your vimrc:

" Show syntax highlighting groups for word under cursor
nnoremap <F2> :call <SID>SynStack()<CR>
function! <SID>SynStack()
    if !exists("*synstack")
        return
    endif
    echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc

and then pressing F2 while your cursor is over the term you'd like to change the highlighting of. It should dump out the highlighting group it's a part of and let you know what exactly needs to change.

@milaurila
Copy link
Author

Thanks for the actual color codes, that makes things easier!

I couldn't get your function to work but found that I can do :Inspect on words to get their groups. This returns the
expected groups for all terms in the file buffer except data types which gives No items found at position X,Y in buffer Z. Doing :Inspect on data types in the Info Window returns CornelisType.

@isovector
Copy link
Collaborator

isovector commented Jun 16, 2024 via email

@milaurila
Copy link
Author

I was running Agda 2.6.3. Now 2.6.4 and the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants