nvim icon indicating copy to clipboard operation
nvim copied to clipboard

fix(treesitter): Fixed most hardcoded italics. (quick-fix, not permament)

Open GotaLoveFiraCode opened this issue 1 year ago • 1 comments

Set everything to O.styles.conditionals or { "italic" }, so, by default, the various settings are still italic. In other words, this is not a breaking change.

🎉 First off, thanks for taking the time to contribute! 🎉

Here are some guidelines:

  • Format code using stylua.
  • New plugin integration should be added in alphabetical order:
  • Create a topic branch on your fork for your specific PR.
  • Use conventionalcommits.org's rules for explicit and meaningful commit messages.
  • If it's your first time contributing to a project, then read About pull requests on Github's docs.

Here are some tips:

  • Use vim.g.catppuccin_debug = true to get live config re-loading

GotaLoveFiraCode avatar Feb 14 '24 20:02 GotaLoveFiraCode

Catppuccin compiles your configuration to simple colors, it helps to reduce start up time. no_italic (as well as other no_... options) removes all italic from highlight groups on compile time. If you still have italics, we should debug that code.

mrtnvgr avatar Feb 15 '24 00:02 mrtnvgr

Catppuccin compiles your configuration to simple colors, it helps to reduce start up time. no_italic (as well as other no_... options) removes all italic from highlight groups on compile time. If you still have italics, we should debug that code.

Hello! Sorry for taking so long to reply, I’ve been traveling. When setting no_italic, everything works as expected. What I am trying to fix with this PR is that it is impossible to control the italics that catppuccin’s treesitter integration sets. An example is anything treesitter thinks of as a module will become italic (e.g. in mod somemodule in rust, the somemodule would be italic), even if the user doesn’t want it to be italic. Currently, the only option is to have all modules (among other things) be italic, or turn italics off completely with no_italic—there is no way for the user to control modules specifically. Ideally, there should be a setting in styles in the setup call, so the user can control, independently of catppuccin’s treesitter integration, if modules should be italic or not. For now, though, setting modules to the users conditionals setting is easier and keeps the same default.

GotaLoveFiraCode avatar Feb 18 '24 20:02 GotaLoveFiraCode

You can now do

require("catppuccin").setup { styles = { miscs = {} } }

To disable the remaining hardcoded styles

rewhile avatar Feb 24 '24 20:02 rewhile