aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/highlight_spec.lua
Commit message (Collapse)AuthorAge
* fix(api): make `nvim_set_hl()` respect all `cterm` attributes (#31390)Evgeni Chasnovski2024-12-02
|
* fix(highlight): 'winhl' shouldn't take priority over API (#31288)zeertzjq2024-11-22
|
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: normalise nvim bridge functionsLewis Russell2024-01-12
| | | | | - remove helpers.cur*meths - remove helpers.nvim
* test: typing for helpers.methsLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* feat(highlight): update default color schemeEvgeni Chasnovski2023-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Default color scheme is suboptimal. Solution: Start using new color scheme. Introduce new `vim` color scheme for opt-in backward compatibility. ------ Main design ideas - Be "Neovim branded". - Be minimal for 256 colors with a bit more shades for true colors. - Be accessible through high enough contrast ratios. - Be suitable for dark and light backgrounds via exchange of dark and light palettes. ------ Palettes - Have dark and light variants. Implemented through exporeted `NvimDark*` and `NvimLight*` hex colors. - Palettes have 4 shades of grey for UI elements and 6 colors (red, yellow, green, cyan, blue, magenta). - Actual values are computed procedurally in Oklch color space based on a handful of hyperparameters. - Each color has a 256 colors variant with perceptually closest color. ------ Highlight groups Use: - Grey shades for general UI according to their design. - Bold text for keywords (`Statement` highlight group). This is an important choice to increase accessibility for people with color deficiencies, as it doesn't rely on actual color. - Green for strings, `DiffAdd` (as background), `DiagnosticOk`, and some minor text UI elements. - Cyan as main syntax color, i.e. for function usage (`Function` highlight group), `DiffText`, `DiagnosticInfo`, and some minor text UI elements. - Red to generally mean high user attention, i.e. errors; in particular for `ErrorMsg`, `DiffDelete`, `DiagnosticError`. - Yellow very sparingly only with true colors to mean mild user attention, i.e. warnings. That is, `DiagnosticWarn` and `WarningMsg`. - Blue very sparingly only with true colors as `DiagnosticHint` and some additional important syntax group (like `Identifier`). - Magenta very carefully (if at all). ------ Notes - To make tests work without relatively larege updates, each one is prepended with an equivalent of the call `:colorscheme vim`. Plus some tests which spawn new Neovim instances also now use 'vim' color scheme. In some cases tests are updated to fit new default color scheme.
* feat(ui): allow to get the highlight namespaceDaniel Steinberg2023-10-01
|
* fix(highlight): add force in nvim_set_hlglepnir2023-09-26
|
* fix(highlight): correct hi command outputglepnir2023-09-17
|
* fix(highlight): add create param in nvim_get_hlglepnir2023-09-09
|
* refactor(api): use typed keysetsbfredl2023-08-07
| | | | | Initially this is just for geting rid of boilerplate, but eventually the types could get exposed as metadata
* fix(api): nvim_get_hl should return default flagNull Chilly2023-05-22
|
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* fix(api): make nvim_get_hl not return non-existing groupsbfredl2023-04-13
| | | | fixes #23063
* fix(api): return both link and attributes with nvim_get_hl (#22824)Sindre T. Strøm2023-03-31
| | | | | Problem: No way to get the actual highlight attributes for a linked group through |nvim_get_hl()| (not the attributes from the link target). Solution: Return the actual attributes as well as the link target name.
* fix(api): make nvim_get_hl return 'cterm' attrs properlybfredl2023-03-23
|
* feat(api): add nvim_get_hl (#22693)Null Chilly2023-03-23
| | | | | Problem: no way of getting all highlight group definitions in a namespace. Solution: add `nvim_get_hl()`, deprecate `nvim_get_hl_by_name()` and `nvim_get_hl_by_id()`.
* fix(highlight): avoid ORing underline flags (#22372)zeertzjq2023-02-23
| | | | | When combining attributes use the one that takes priority. For :highlight command use the last one specified. For API use a hard-coded order same as the order in docs.
* refactor(api): consistent VALIDATE messages #22262Justin M. Keyes2023-02-14
| | | | | | | | | | Problem: Validation messages are not consistently formatted. - Parameter names sometimes are NOT quoted. - Descriptive names (non-parameters) sometimes ARE quoted. Solution: Always quote the `name` value passed to a VALIDATE macro _unless_ the value has whitespace.
* refactor(api): VALIDATE macros #22256Justin M. Keyes2023-02-14
| | | | | | - VALIDATE() takes a format string - deduplicate check_string_array - VALIDATE_RANGE - validate UI args
* 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
* fix(tests): initialize Screen.colors in API highlight testsJon Huhn2022-12-10
|
* fix(api): nvim_set_hl bail out on invalid group name (#20021)zeertzjq2022-08-31
|
* 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)
* fix(highlight): add missing 'nocombine' to nvim_get_hl_* apis (#19586)Munif Tanjim2022-07-31
|
* 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(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.
* fix(hl): set Normal hl group sg_attr value #18820Oliver Marriott2022-06-03
| | | fix #18024
* docs: typo fixes (#17859)dundargoc2022-04-15
| | | | | | | | | | Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com> Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com> Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: rwxd <rwxd@pm.me> Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
* 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
|
* feat(highlight): ns=0 to set :highlight namespaceLewis Russell2022-02-01
| | | | Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
* Improvements to testsshadmansaleh2021-04-22
|
* Fix lualint warningsshadmansaleh2021-04-03
|
* Add tests for nvim_set_hl()shadmansaleh2021-04-03
|
* feat(lua): improve error message to make it actionable (#13276)Alvaro Muñoz2020-11-13
| | | * improve error message to make it actionable
* extmark: fix decoration ploblems with extmarkerw72020-10-02
| | | | | | 54ce101 changed the way undo entries are created when adding decorations. This creates all sorts of problems.This change fixes the problem by reverting to the previous behavior.
* API: nvim_get_hl_by_id: omit hl instead of returning -1 #11685kevinhwang912020-01-08
| | | | | | | | | Problem: When Normal highlight group defines ctermfg/bg, but other highlight group lacks ctermfg/bg, nvim_get_hl_by_id(hl_id, v:false) returns -1 for the missing ctermfg/bg instead of just omitting it. Solution: checking for -1 in hlattrs2dict() fix #11680