aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
Commit message (Collapse)AuthorAge
...
* 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.
* vim-patch:8.2.1703: ":highlight clear" does not restore default linkAndy K. Massimino2021-03-05
| | | | | | | Problem: ":highlight clear" does not restore default link. Solution: Remember the default link and restore it. (Antony Scriven, closes vim/vim#6970, closes vim/vim#4405) https://github.com/vim/vim/commit/213da551dec465e193619684b260bf9d5a8d6afc
* vim-patch:8.2.1693: "hi def" does not work for cleared highlightAndy K. Massimino2021-03-05
| | | | | | | Problem: "hi def" does not work for cleared highlight. Solution: Check the "sg_cleared" flag. (Maxim Kim, closes vim/vim#6956, closes vim/vim#4405) https://github.com/vim/vim/commit/05eb5b9cae123b138bbd23cc77e50657ece6b4ad
* eval: use char* for set_internal_string_var()Jan Edmund Lazo2021-02-07
| | | | | | "name" param was cast to (const char *). All calls to set_internal_string_var() cast from (char *) to (char_u *). Remove these useless casts.
* vim-patch:8.1.1667: flags for Ex commands may clash with other symbolsJan Edmund Lazo2021-01-02
| | | | | | | | | | | | | | | | | Problem: Flags for Ex commands may clash with other symbols. Solution: Prepend with EX_. https://github.com/vim/vim/commit/8071cb2c646c9d38dcd4e3ccd377dce07705f031 N/A patches for version.c: vim-patch:8.1.1672: "make cmdidxs" doesn't work Problem: "make cmdidxs" doesn't work. Solution: Update macro names. (Naruhiko Nishino, closes vim/vim#4660) https://github.com/vim/vim/commit/d94ac0caca12c6ceb54b07fc932edba84a5f60f2 Error message for src/nvim/ex_cmds.lua which omits the "EX_" prefix for the flags.
* vim-patch:8.2.0928: many type casts are used for vim_strnsave()Jan Edmund Lazo2020-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes vim/vim#5633) Remove some type casts. https://github.com/vim/vim/commit/df44a27b53586fccfc6a3aedc89061fdd9a515ff N/A patches for version.c: vim-patch:8.2.0315: build failure on HP-UX system Problem: Build failure on HP-UX system. Solution: Use LONG_LONG_MIN instead of LLONG_MIN. Add type casts for switch statement. (John Marriott) https://github.com/vim/vim/commit/c593bec4120f122e8a9129ec461968f1bd214435 vim-patch:8.2.1052: build failure with older compilers Problem: Build failure with older compilers. Solution: Move declaration to start of block. https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a vim-patch:8.2.2229: build failure without the +eval feature Problem: build failure without the +eval feature. Solution: Add #ifdef. https://github.com/vim/vim/commit/39cb2dab18e85fc60f116a4543e433616872b690 vim-patch:8.2.2232: compiler error for falling through into next case Problem: Compiler error for falling through into next case. Solution: Move FALLTHROUGH below the #endif https://github.com/vim/vim/commit/9618a25b9c054f0ee4e267d2db96b6e7c113ed7a
* decorations: allow nvim_set_hl to break existing linksBjörn Linse2020-11-21
| | | | also add `default` flag to NOT break existing links/defs
* vim-patch:8.2.2011: "syn sync" reports a very large numberSean Dewar2020-11-19
| | | | | | Problem: "syn sync" reports a very large number. Solution: Use "at the first line". https://github.com/vim/vim/commit/9950280d377a5c0706d141017fcef9cad598b8b0
* Merge pull request #13275 from janlazo/vim-8.1.0805Matthieu Coudron2020-11-14
|\ | | | | vim-patch:8.1.{805,806,809,810,811}
| * vim-patch:8.1.0810: too many #ifdefsJan Edmund Lazo2020-11-12
| | | | | | | | | | | | Problem: Too many #ifdefs. Solution: Graduate FEAT_MBYTE, part 4. https://github.com/vim/vim/commit/264b74fa545edfb92c0d7d08a02c26331cc5b168
* | lsp: vim.lsp.diagnostic (#12655)TJ DeVries2020-11-12
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking Changes: - Deprecated all `vim.lsp.util.{*diagnostics*}()` functions. - Instead, all functions must be found in vim.lsp.diagnostic - For now, they issue a warning ONCE per neovim session. In a "little while" we will remove them completely. - `vim.lsp.callbacks` has moved to `vim.lsp.handlers`. - For a "little while" we will just redirect `vim.lsp.callbacks` to `vim.lsp.handlers`. However, we will remove this at some point, so it is recommended that you change all of your references to `callbacks` into `handlers`. - This also means that for functions like |vim.lsp.start_client()| and similar, keyword style arguments have moved from "callbacks" to "handlers". Once again, these are currently being forward, but will cease to be forwarded in a "little while". - Changed the highlight groups for LspDiagnostic highlight as they were inconsistently named. - For more information, see |lsp-highlight-diagnostics| - Changed the sign group names as well, to be consistent with |lsp-highlight-diagnostics| General Enhancements: - Rewrote much of the getting started help document for lsp. It also provides a much nicer configuration strategy, so as to not recommend globally overwriting builtin neovim mappings. LSP Enhancements: - Introduced the concept of |lsp-handlers| which will allow much better customization for users without having to copy & paste entire files / functions / etc. Diagnostic Enhancements: - "goto next diagnostic" |vim.lsp.diagnostic.goto_next()| - "goto prev diagnostic" |vim.lsp.diagnostic.goto_prev()| - For each of the gotos, auto open diagnostics is available as a configuration option - Configurable diagnostic handling: - See |vim.lsp.diagnostic.on_publish_diagnostics()| - Delay display until after insert mode - Configure signs - Configure virtual text - Configure underline - Set the location list with the buffers diagnostics. - See |vim.lsp.diagnostic.set_loclist()| - Better performance for getting counts and line diagnostics - They are now cached on save, to enhance lookups. - Particularly useful for checking in statusline, etc. - Actual testing :) - See ./test/functional/plugin/lsp/diagnostic_spec.lua - Added `guisp` for underline highlighting NOTE: "a little while" means enough time to feel like most plugins and plugin authors have had a chance to refactor their code to use the updated calls. Then we will remove them completely. There is no need to keep them, because we don't have any released version of neovim that exposes these APIs. I'm trying to be nice to people following HEAD :) Co-authored: [Twitch Chat 2020](https://twitch.tv/teej_dv)
* startup: handle autoload and lua packages during startupBjörn Linse2020-11-02
| | | | ¡NO HAY BANDA!
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* vim-patch:8.2.1678: crash when using ":set" after ":ownsyntax"Thomas Vigouroux2020-09-24
| | | | | | Problem: Crash when using ":set" after ":ownsyntax". Solution: Make sure 'spelloptions' is not NULL. (closes vim/vim#6950) https://github.com/vim/vim/commit/d1f76afaf963be706697279ab0570ffcb8a1f2fc
* vim-patch:8.2.0865 syntax: Add command to control how foldlevel is computedBrad King2020-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Syntax foldlevel is taken from the start of the line. Solution: Add ":syn foldlevel" to be able to use the minimal foldlevel in the line. https://github.com/vim/vim/commit/e35a52aee718c881bdfa69a47a1068df6ab6c60a With `foldmethod=syntax` the foldlevel of a line is computed based on syntax items on the line. Previously we always used the level of the syntax item containing the start of the line. This works well in cases such as: if (...) { ... } else if (...) { ... } else { ... } which folds like this: +--- 3 lines: if (...) {--------------------------- +--- 3 lines: else if (...) {---------------------- +--- 3 lines: else {------------------------------- However, the code: if (...) { ... } else if (...) { ... } else { ... } folds like this: +--- 7 lines: if (...) {--------------------------- We can make the latter case fold like this: +--- 2 lines: if (...) {--------------------------- +--- 2 lines: } else if (...) {-------------------- +--- 3 lines: } else {----------------------------- by choosing on each line the lowest fold level that is followed by a higher fold level. Add a syntax command :syntax foldlevel [start | minimum] to choose between these two methods of computing the foldlevel of a line.
* syntax: Factor out duplicate E390 stringsBrad King2020-06-23
|
* syntax: factor out helper to compute the syntax-based foldlevelBrad King2020-06-23
|
* vim-patch:8.1.1895: using NULL pointer when out of memoryJan Edmund Lazo2020-06-04
| | | | | | | Problem: Using NULL pointer when out of memory. Solution: Bail out or skip the code using the pointer. (Zu-Ming Jiang, closes vim/vim#4805, closes vim/vim#4843, closes vim/vim#4939, closes vim/vim#4844) https://github.com/vim/vim/commit/6f10c70b59fa4e56aa479345fb0caeaac7429bfb
* vim-patch:8.2.0635: when using 256 colors DarkYellow does not show expected ↵Jan Edmund Lazo2020-04-25
| | | | | | | | color Problem: When using 256 colors DarkYellow does not show expected color. Solution: Use color 3 instead of 130. (Romain Lafourcade, closes vim/vim#5985) https://github.com/vim/vim/commit/e93c968f520ee8d6bc29ccc6e18055ac65e832b3
* doc: fix typos [ci skip] #11787Hye Sung Jung2020-01-30
|
* vim-patch:8.1.1308: the Normal highlight is not defined when compiled with GUIJan Edmund Lazo2020-01-06
| | | | | | Problem: The Normal highlight is not defined when compiled with GUI. Solution: Always define Normal. (Christian Brabandt, closes vim/vim#4072) https://github.com/vim/vim/commit/f90b6e03a983b62b66564fc449e32724d6456769
* doc: fix typosBrian Wignall2019-11-27
| | | | close #11459
* syntax: zero-init local structsJan Edmund Lazo2019-11-02
| | | | Fix https://neovim.io/doc/reports/clang/report-ee5dbd.html#EndPath
* vim-patch:8.0.0914: highlight attributes are always combined (#10256)Daniel Hahler2019-09-26
| | | | | | | | | Problem: Highlight attributes are always combined. Solution: Add the 'nocombine' value to replace attributes instead of combining them. (scauligi, closes vim/vim#1963) https://github.com/vim/vim/commit/0cd2a94a4030f6bd12eaec44db92db108e33c913 Closes https://github.com/neovim/neovim/pull/10256.
* vim-patch:8.0.1621: using invalid default value for highlight attributeJan Edmund Lazo2019-09-21
| | | | | | Problem: Using invalid default value for highlight attribute. Solution: Use zero instead of -1. https://github.com/vim/vim/commit/6185903e3d07eb53326fc1403fc2de97ca31b775
* vim-patch:8.0.1134: superfluous call to syn_get_final_id()Jan Edmund Lazo2019-09-14
| | | | | | Problem: Superfluous call to syn_get_final_id(). Solution: Remove it. (Ken Takata) https://github.com/vim/vim/commit/76301956f0c079d893cfd927b11456328bed4f9b
* lintJustin M. Keyes2019-09-13
|
* getdigits: introduce `strict`, `def` parametersJustin M. Keyes2019-09-13
| | | | | | | | | | | | Problem: During a refactor long ago, we changed the `getdigits_*` familiy of functions to abort on overflow. But this is often wrong, because many of these codepaths are handling user input. Solution: Decide at each call-site whether to use "strict" mode. fix #5555
* syntax, TUI: support "strikethrough"Jaskaran Singh2019-09-13
| | | | | | fix #3436 Includes: vim-patch:8.0.1038: strike-through text not supported
* vim-patch:8.0.0941: existing color schemes don't like StatusLineTermJan Edmund Lazo2019-09-09
| | | | | | | Problem: Existing color schemes don't work well with StatusLineTerm. Solution: Don't use "reverse", use fg and bg colors. Also add StatusLineTermNC. https://github.com/vim/vim/commit/05fbfdcda48a564e7a778c67251f732481f3ceaa
* vim-patch:8.0.0937: user highlight groups not adjusted for terminalJan Edmund Lazo2019-09-09
| | | | | | Problem: User highlight groups are not adjusted for StatusLineTerm. Solution: Combine attributes like for StatusLineNC. https://github.com/vim/vim/commit/bce4f62d3043f04fe29f3fef2b927b2268b15255
* vim-patch:8.0.0970: passing invalid highlight id #10972Justin M. Keyes2019-09-08
| | | | | | | | | (We don't implement StatusLineTerm{NC}, but this patch seems generally relevant.) Problem: if there is no StatusLine highlighting and there is StatusLineNC or StatusLineTermNC highlighting then an invalid highlight id is passed to combine_stl_hlt(). (Coverity) Solution: Check id_S to be -1 instead of zero. https://github.com/vim/vim/commit/d6a7b3e6bbb8f87507de68d86cf70eab806aab3a
* vim-patch:8.0.1332: enhance quickfix highlighting #10259Daniel Hahler2019-09-06
| | | | | | | | Problem: Highlighting in quickfix window could be better. (Axel Bender) Solution: Use the qfSeparator highlight item. (Yegappan Lakshmanan) https://github.com/vim/vim/commit/93a32e2ec4b5a391c5006ca09f196e6510c8c2e9 This adds `syn_name2attr` already (from previous patch 8.0.1123, vim/vim@1b9645de3).
* vim-patch:8.1.0362: cannot get the script line number when executing a functionerw72019-09-04
| | | | | | | Problem: Cannot get the script line number when executing a function. Solution: Store the line number besides the script ID. (Ozaki Kiichi, closes vim/vim#3362) Also display the line number with ":verbose set". https://github.com/vim/vim/commit/f29c1c6aa3f365c025890fab5fb9efbe88eb1761
* screen: use dedicated message gridBjörn Linse2019-09-01
| | | | | | | | add proper msg_set_pos event, delet win_scroll_over_* make compositor click through unfocusable grids add MsgArea attribute for the message/cmdline area, and add docs and tests
* vim-patch:8.1.1950: using NULL pointer after an out-of-memory (#10902)Jan Edmund Lazo2019-08-31
| | | | | Problem: Using NULL pointer after an out-of-memory. Solution: Check for NULL pointer. (Dominique Pelle, closes vim/vim#4881) https://github.com/vim/vim/commit/4bbfb0f3cc67c00c8cee4e47283e8d760025219d
* Merge #10368 from janlazo/vim-8.0.1164Justin M. Keyes2019-07-19
|\ | | | | vim-patch:8.0.{755,1146,1164}
| * vim-patch:8.0.1164: changing StatusLine highlight does not always workJan Edmund Lazo2019-07-06
| | | | | | | | | | | | | | | | Problem: Changing StatusLine highlight while evaluating 'statusline' may not change the status line color. Solution: When changing highlighting while redrawing don't cause another redraw. (suggested by Ozaki Kiichi, closes vim/vim#2171, closes vim/vim#2120) https://github.com/vim/vim/commit/65ed136844fbaffdd473903ed841c944600234dc