aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight.c
Commit message (Collapse)AuthorAge
* fix(highlight): properly deal with underline mask when listing (#22057)zeertzjq2023-01-31
|
* feat(highlight): define the concept of altfont as a (c)term rendering attributePaul "LeoNerd" Evans2023-01-24
|
* refactor(highlight): reshape the HL_UNDER* bits into a 3-bit integer maskPaul "LeoNerd" Evans2023-01-24
| | | | Saves two bits for reuse for new features
* refactor(ui): devirtualize the ui layerbfredl2023-01-05
| | | | | | | | | | | | | | | | | - The defined interface for the UI is only the RPC protocol. The original UI interface as an array of function pointers fill no function. - On the server, all the UI:s are all RPC channels. - ui.c is only used on the server. - The compositor is a preprocessing step for single-grid UI:s - on the client, ui_client and tui talk directly to each other - we still do module separation, as ui_client.c could form the basis of a libnvim client module later. Items for later PR:s - vim.ui_attach is still an unhappy child, reconsider based on plugin experience. - the flags in ui_events.in.h are still a mess. Can be simplified now. - UX for remote attachment needs more work. - startup for client can be simplified further (think of the millisecs we can save)
* fix(tui): more work in the TUIbfredl2022-12-31
|
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.
* refactor: replace char_u with charDundar Göc2022-09-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(highlight): make hlattrs2dict always use pre-allocated dictbfredl2022-08-31
| | | | | hlattrs2dict used to work with both allocated and unallocated dicts which was quite messy. Now always delegate allocation to caller.
* Merge pull request #19971 from dundargoc/refactor/remove-castsbfredl2022-08-29
|\ | | | | refactor: remove redundant casts
| * refactor: remove redundant castsDundar Göc2022-08-27
| |
* | refactor: replace char_u with charDundar Göc2022-08-27
|/ | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(api): provide a temporary copy solution for nvim_call_atomicbfredl2022-08-24
| | | | | | Make the copy_object() family accept an optional arena. More than half of the callsites should be refactored to use an arena later anyway.
* fix(ui): don't allow decor provider with ns_id==0Lewis Russell2022-08-20
| | | | Fixes #19831
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #19822 from bfredl/hldefbfredl2022-08-18
|\ | | | | fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly
| * fix(api): make nvim_set_hl(ns=0, ...) redraw screen properlybfredl2022-08-18
| | | | | | | | fixes #18160
* | Merge pull request #19828 from bfredl/nullhlbfredl2022-08-18
|\ \ | | | | | | fix(winhl): do not crash when unsetting winhl in just opened window
| * | fix(winhl): do not crash when unsetting winhl in just opened windowbfredl2022-08-18
| |/ | | | | | | fixes #19823
* / vim-patch:8.1.2082: rename popupmnu.* to popupmenu.* (#19829)zeertzjq2022-08-18
|/ | | | | | | vim-patch:8.1.2082: some files have a weird name to fit in 8.3 characters Problem: Some files have a weird name to fit in 8.3 characters. Solution: Use a nicer names. https://github.com/vim/vim/commit/30e8e73506e4522ef4aebf7d525c0e6ffe8805fd
* feat(ui): allow to set the highlight namespace per windowbfredl2022-08-17
| | | | | - reimplement 'winhl' in terms of highlight namespaces - check for EOF in screen tests (to indicate a likely crash)
* vim-patch:9.0.0203: confusing variable name (#19762)zeertzjq2022-08-14
| | | | | Problem: Confusing variable name. Solution: Use "prim_aep" instead of "spell_aep". https://github.com/vim/vim/commit/c9b6570fab46bf2c246a954cfb8c0d95fe2746b3
* fix(highlight): add missing 'nocombine' to nvim_get_hl_* apis (#19586)Munif Tanjim2022-07-31
|
* refactor(object): get rid of redundant FIXED_TEMP_ARRAYbfredl2022-07-20
| | | | | use the MAXSIZE_TEMP_ARRAY + ADD_C pattern instead, as exemplified by the changes in this commit.
* perf(ui): eliminate spurious memory allocations for hl_attr_define eventbfredl2022-07-18
|
* refactor(highlight)!: rename attributes to match Vim (#19159)zeertzjq2022-06-30
| | | | | | | | | Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417 Rename: - `underlineline` to `underdouble` - `underdot` to `underdotted` - `underdash` to `underdashed` `underdouble` also now takes higher precedence than `undercurl`.
* perf(highlight): don't allocate duplicates for color namesbfredl2022-06-21
|
* fix(highlight): use ctermbg/fg instead of bg/fg when use_rgb=false #18982Oliver Marriott2022-06-18
| | | | | | | | | | | | If `use_rgb` was false, we would attempt to set the `cterm_bg_color` to the variable `bg`, which is only retrieved from `bg` and `background` keys, not `ctermbg`. Same for `fg`. This means the values would be `-1` (the default, un-got value) and we'd always set the returned values to `0`. My understanding is `fg/bg` is always "gui" values, so instead we should be using `ctermbg` when needed. Nb: when looking around I think this function is currently *always* called with `use_rgb = true`.
* fix(hl): return cterm fg/bg even if they match Normal #18981Oliver Marriott2022-06-16
| | | | | | | | | | Fixes #18980 - 831fa45ad84e is related but this doesn't regress that - The `cterm_normal_fg_color != ae.cterm_fg_color` comparison is originally carried from patch to patch starting all the way back in 29bc6dfabde2 where it was avoiding setting a HL attr. But `hlattrs2dict()` now is just informational.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | Problem: Syntax coloring and highlighting is in one big file. Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan, closes vim/vim#4674) https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614 Name the new file highlight_group.c instead. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #17663 from dundargoc/refactor/uncrustifybfredl2022-03-11
|\ | | | | refactor: apply uncrustify
| * refactor(uncrustify): format all c filesDundar Göc2022-03-10
| |
* | refactor(decorations): move provider codeLewis Russell2022-03-10
|/ | | | Move decoration provider code to a separate file.
* refactor: remove redundant castsDundar Göc2022-03-06
|
* feat(tui): add support for `CSI 4 : [2,4,5] m`Kirill Chibisov2022-03-03
| | | | | | | | This commit finishes support for colored and styled underlines adding `CSI 4 : [2,4,5] m` support providing double, dashed, and dotted underlines Fixes #17362.
* feat(highlight): support for blend in nvim_set_hl (#17516)Lewis Russell2022-02-24
|
* fix(highlight): accept NONE as a color name (#17487)Lewis Russell2022-02-21
| | | | | | | | ... for when `ns=0`. Also update the documentation of nvim_set_hl to clarify the set behaviour. Fixes #17478
* fix(api): allow empty list for cterm in nvim_set_hlChristian Clason2022-02-17
| | | | | | | | | | | | Problem: when accessing `nvim_set_hl` from Lua, empty tables are converted to empty lists, not dictionaries, resulting in an error for :lua vim.api.nvim_set_hl(0, "Comment", { cterm = {} }) Workaround: add an empty array as a special case when checking `dict->cterm.type` and just set `cterm_mask_provided`. (Proper solution: handle this in `gen_api_dispatch.lua`.)
* feat(highlight): support color names for ctermLewis Russell2022-02-16
|
* fix(highlight): allow globals to be clearedLewis Russell2022-02-16
| | | | | | - and reduce heap allocations Fixes #17420
* feat(api): add strikethrough, nocombine to set_hlChristian Clason2022-02-12
|
* refactor(api): use a keyset for highlight dictsBjörn Linse2022-02-02
|
* feat(highlight): ns=0 to set :highlight namespaceLewis Russell2022-02-01
| | | | Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor(syntax): don't use pointer indirected maps for no reasonBjörn Linse2021-08-22
|
* refactor: replace TRUE/FALSE macros with C99 true/falseDundar Göc2021-07-25
|