aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
Commit message (Collapse)AuthorAge
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* Merge pull request #16597 from bfredl/nomisc1Björn Linse2021-12-10
|\ | | | | refactor: move out some long-hanging fruit from misc1.c
| * refactor(misc1): move line_breakcheck family of functions to os/input.cBjörn Linse2021-12-09
| |
* | vim-patch:8.2.3757: an overlong highlight group name is silently truncatedJames McCoy2021-12-08
| | | | | | | | | | | | Problem: An overlong highlight group name is silently truncated. Solution: Give an error if the name is too long. (closes vim/vim#9289) https://github.com/vim/vim/commit/f7f7aaf8aaad34a38d3f159e031c5bcf3394f8f1
* | vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'James McCoy2021-12-08
|/ | | | | | | Problem: Cannot adjust sign highlighting for 'cursorline'. Solution: Add CursorLineSign and CursorLineFold highlight groups. (Gregory Anders, closes vim/vim#9201) https://github.com/vim/vim/commit/e413ea04b716effb28eb49dbc98ad3f9f761545a
* Merge pull request #16411 from dundargoc/refactor/upgrade-uncrustifyBjörn Linse2021-12-04
|\ | | | | refactor: upgrade uncrustify config version to 0.74.0
| * refactor: upgrade uncrustify config version to 0.74.0Dundar Göc2021-11-23
| | | | | | | | | | Disable formatting for assert.h since there's a bug that results in a segmentation fault in uncrustify.
* | Merge pull request #16381 from VVKot/vim-8.1.0228Jan Edmund Lazo2021-11-30
|\ \ | |/ |/| vim-patch:8.1.0228, 8.1.1384, 8.1.1386, 8.1.1393, 8.2.3040
| * vim-patch:8.1.1393: unnecessary type castsVVKot2021-11-22
| | | | | | | | | | | | Problem: Unnecessary type casts. Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams) https://github.com/vim/vim/commit/51e14387f120392b74b84408cafec33942337a05
* | vim-patch:8.1.1606: on a narrow screen ":hi" output is confusing (#16388)Volodymyr Kot2021-11-21
|/ | | | | | Problem: On a narrow screen ":hi" output is confusing. Solution: Insert a space between highlight group name and "xxx". (Masato Nishihaga, closes vim/vim#4599) https://github.com/vim/vim/commit/548be7f126dc57ca861cb26dc6492c3b2a9e2c99
* refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
| | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2lenBjörn Linse2021-11-14
|
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* 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: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: uncrustify #16090dundargoc2021-10-29
|
* vim-patch:8.1.2395: using old C style commentsDundar Göc2021-10-21
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/0d6f5d9740dbad1b0207f3ab257de806169dd905
* refactor: remove space after starDundar Göc2021-10-19
|
* Merge pull request #15930 from dundargoc/vim-patch/old-style-c-commentsJan Edmund Lazo2021-10-17
|\ | | | | vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
| * vim-patch:8.1.2395: using old C style commentsDundar Göc2021-10-06
| | | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/0d6f5d9740dbad1b0207f3ab257de806169dd905
* | refactor: reduce number of unique char castsDundar Göc2021-10-13
| |
* | refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|/
* refactor: define diagnostic highlights in syntax.cGregory Anders2021-10-03
|
* Refactor/uncrustify (#15790)dundargoc2021-09-29
| | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* refactor: format with uncrustify #15778dundargoc2021-09-25
| | | * fixup: force exactly one whitespace between type and variable
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor(runtime): always use DIP_START when searching for runtime filesBjörn Linse2021-09-18
| | | | | | | | Now remove the addition of "start/*" packages in 'packpath' as explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming very long when using a lot of plugins as packages. To get the effective search path as a list, use |nvim_list_runtime_paths()|
* refactor(style): switch-case formatting, "uncrustify:indent-off" #15669dundargoc2021-09-17
| | | | | | * refactor: disable formatting for attribute in macro * fixup: disable/enable uncrustify with uncrustify:indent-off/on * fixup: stop indenting contents inside braces in case * fixup: remove case brace if no variable declaration
* fix: "redundant cast to the same type" #15662dundargoc2021-09-14
| | | Apply "redundant cast to the same type" fix from clangd.
* refactor: replace TRUE/FALSE with true/false #15647dundargoc2021-09-13
|
* refactor(syntax.c): format with uncrustify #15627dundargoc2021-09-11
|
* vim-patch:8.1.2229: color number column above/below cursor #15409zeertzjq2021-08-27
| | | | | Problem: Cannot color number column above/below cursor differently. Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624) https://github.com/vim/vim/commit/efae76ab1a43d5a628d8c2fa4218ace6ba597f5d
* refactor: replace TRUE/FALSE with true/false #15425dundargoc2021-08-22
|
* refactor(syntax): don't use pointer indirected maps for no reasonBjörn Linse2021-08-22
|
* perf(highlight): use a hashtable for highlight group namesBjörn Linse2021-08-19
| | | | | | | | syn_name2id and syn_check_group go brr. Note: this has impact mostly when using multiple filetypes, as the old syn_name2id was optimized to return latest added groups quickly (which will be the latest filetype)
* refactor(highlight): make syn_check_group alloc free for existing groupBjörn Linse2021-08-18
|
* vim-patch:8.1.2029: cannot control 'cursorline' highlighting wellzeertzjq2021-08-02
| | | | | | Problem: Cannot control 'cursorline' highlighting well. Solution: Add "screenline". (Christian Brabandt, closes vim/vim#4933) https://github.com/vim/vim/commit/017ba07fa2cdc578245618717229444fd50c470d
* Merge pull request #15206 from ↵Björn Linse2021-07-30
|\ | | | | | | | | dundargoc/refactor/a-song-of-true-and-false/global-variables-2 refactor: replace TRUE/FALSE with true/false
| * refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-30
| |
* | fixup! fix(highlight): remove syncolor.vimJan Edmund Lazo2021-07-29
| | | | | | | | Fix lint errors from lines with 80+ characters.
* | fixup! fix(highlight): remove syncolor.vimGregory Anders2021-07-27
| |
* | fix(highlight): remove syncolor.vimGregory Anders2021-07-27
|/ | | | | | | | | | | | | | | | | | | Remove syncolor.vim in favor of defining the default highlight groups directly in `init_highlight`. This approach provides a number of advantages: 1. The highlights are always defined, regardless of whether or not the syntax regex engine is enabled. 2. Redundant sourcing of syntax files is eliminated (syncolor.vim was often sourced multiple times based on how the user's colorscheme file was written). 3. The syntax highlighting regex engine and the highlight groups themselves are more fully decoupled. 4. Removal of the confusing `:syntax on` / `:syntax enable` dichotomy (they now both do the same thing). This approach also correctly solves a number of bugs related to highlighting (#15176, #12573, #15205).
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* feat(runtime): Allow lua to be used in colorschemesshadmansaleh2021-06-11
| | | | * tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
* startup: do "syntax enable" instead of "syntax on"Björn Linse2021-04-30
| | | | | | | | "syntax on" overwrites existing highlight groups, while "syntax enable" just sets missing groups. This change prevents user defined highlights in init.vim/lua to get overwritten. The manual recommends "syntax enable" for new configurations anyway, "on" command was probably used as it is the implicit default.
* vim-patch:8.2.2761: using "syn include" does not work properlyJan Edmund Lazo2021-04-15
| | | | | | | | | Problem: Using "syn include" does not work properly. Solution: Don't add current_syn_inc_tag to topgrp. (Jaehwang Jerry Jung, closes vim/vim#8104) https://github.com/vim/vim/commit/2e240bd428c0033d16f201d7f837636412358199 Cherry-pick AssertHighlightGroups from patch v8.2.2068.
* Border: allow to enable/disable specific border edgesBjörn Linse2021-04-04
|
* floats: add borders (MS-DOS MODE)Björn Linse2021-03-22
|
* vim-patch:8.2.1705: "verbose hi Name" reports incorrect info after ":hi clear"Andy K. Massimino2021-03-20
| | | | | | | | | | | | | | | | | | | Problem: "verbose hi Name" reports incorrect info after ":hi clear". Solution: Store the script context. (Antony Scriven, closes vim/vim#6975) https://github.com/vim/vim/commit/e8df0104985af58ee501a6fbac8ac9f886e84e5a Also adds src/nvim/testdir/script_util.vim which originates from patch 8.2.1366 (https://github.com/vim/vim/commit/a6296200bd5191bab7efcdcc16c9e79eb498e8e0) because some tests in test_highlight.vim use it for testing :verbose. Should merge this and older related patches later. Also, fix collateral damage to test_options.vim test_options tests for file name completion in the test directory, but since we've added a new file, the test output is now different. This test is slightly different from upstream anyway, so for now we just add the file name. This may change when more upstream patches are added which alter this test.