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

fix: prefer default links except on ancient Vim versions #203

Merged
merged 1 commit into from
Oct 8, 2023

Conversation

wincent
Copy link
Contributor

@wincent wincent commented Oct 7, 2023

Implements the suggestion posted in:

Which aligns the plugin with what other popular plugins that override bundled syntax files do. eg.

This stops highlighting from getting obliterated when activating a colorscheme that uses :hi clear (which will reset highlights back to defaults), such as a Base16 theme or Dracula, and presumably others.

May be easier to view with whitespace changes off.

Implements the suggestion posted in:

leafgarland#193 (comment)

Which aligns the plugin with what other popular plugins that override
bundled syntax files do. eg.

- https://github.com/plasticboy/vim-markdown (uses `hi def link` on
  version 508 and above)
- https://github.com/tpope/vim-markdown (uses `hi def link`
  unconditionally)

This stops highlighting from getting obliterated when activating a
colorscheme that uses `:hi clear` (which will reset highlights back to
defaults), such as a Base16 theme:

- https://github.com/chriskempson/base16-vim/blob/3be3cd82cd31acfcab9a41bad853d9c68d30478d/colors/base16-one-light.vim#L146

or Dracula:

- https://github.com/dracula/vim/blob/b2cc39273abbb6b38a3d173d2a5d8c2d1c79fc19/colors/dracula.vim#L19-L24

and presumably others.
wincent added a commit to wincent/wincent that referenced this pull request Oct 7, 2023
By (hopefully temporarily) switching to my fork:

- https://github.com/wincent/typescript-vim

If upstream PR gets merged:

- leafgarland/typescript-vim#203

or alternative solution is implemented, I can drop the fork.

* aspects/nvim/files/.config/nvim/pack/bundle/opt/typescript-vim 31ede5a...169f678 (1):
  > fix: prefer default links except on ancient Vim versions
Copy link
Owner

@leafgarland leafgarland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy to see the logic simplified there. Thanks.

@leafgarland leafgarland merged commit eafdcf5 into leafgarland:master Oct 8, 2023
wincent added a commit to wincent/wincent that referenced this pull request Oct 17, 2023
Now that PR has been merged:

- leafgarland/typescript-vim#203

* aspects/nvim/files/.config/nvim/pack/bundle/opt/typescript-vim 169f678...eafdcf5 (1):
  > Merge pull request #203 from wincent/def-links
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

Successfully merging this pull request may close these issues.

None yet

2 participants