aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
Commit message (Collapse)AuthorAge
* 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>
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: remove some unused includes (#19747)zeertzjq2022-08-13
| | | | | - Remove autocmd.h from fileio.h - Remove normal.h from main.h - Move bufinfo_T from undo_defs.h to undo.c
* refactor: remove some unused includes (#19740)zeertzjq2022-08-12
| | | | Mostly avoids including eval.h, ex_cmds2.h and ex_docmd.h in other headers.
* refactor: replace char_u with charDundar Goc2022-08-12
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.1.1684: profiling functionality is spread outzeertzjq2022-08-12
| | | | | | | | | Problem: Profiling functionality is spread out. Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan, closes vim/vim#4666) https://github.com/vim/vim/commit/fa55cfc69d2b14761e2a8bd85bc1e0d82df770aa Move proftime_T to types.h for now to avoid recursive #include.
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
* vim-patch:9.0.0124: code has more indent than neededzeertzjq2022-08-01
| | | | | | Problem: Code has more indent than needed. Solution: Use continue and return statements. (closes vim/vim#10824) https://github.com/vim/vim/commit/101d57b34b72f4fbc7df1b6edfd64c64a6be14fc
* refactor: replace char_u with charDundar Goc2022-07-31
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: enable -Wconversion warning for syntax.c (#19533)dundargoc2022-07-29
| | | Work on https://github.com/neovim/neovim/issues/567
* vim-patch:8.1.1933: the eval.c file is too big (#19462)zeertzjq2022-07-22
| | | | | | | | Problem: The eval.c file is too big. Solution: Move code related to variables to evalvars.c. (Yegappan Lakshmanan, closes vim/vim#4868) https://github.com/vim/vim/commit/0522ba0359c96a8c2a4fc8fca0d3b58e49dda759 Name the new file eval/vars.c instead.
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.2068: transparent syntax item uses start/end of containing ↵zeertzjq2022-06-23
| | | | | | | | | region (#19055) Problem: Transparent syntax item uses start/end of containing region. Solution: Do not change the startpos and endpos of a transparent region to that of its containing region. (Adrian Ghizaru, closes vim/vim#7349, closes vim/vim#7391) https://github.com/vim/vim/commit/b46f57e87b3706a8c4b97d8e03f7853a7938b061
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | refactor: rename keymap.{c,h} to keycodes.{c,h} (#18535)zeertzjq2022-05-12
|/ | | | | | | | Most code in keymap.h is for keycode definitions, while most code in keymap.c is for the parsing and conversion of keycodes. The name "keymap" may also make people think these two files are for mappings, while in fact keycodes are used even when no mappings are involved, so "keycodes" should be a better file name than "keymap".
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-07
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* 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.
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* vim-patch:8.2.4762: using freed memory using synstack() and synID() in ↵zeertzjq2022-04-17
| | | | | | | WinEnter (#18136) Problem: Using freed memory when using synstack() and synID() in WinEnter. Solution: Check using the syntax window. (closes vim/vim#10204) https://github.com/vim/vim/commit/ca7e86c23789eb0ed8f6400f25ea9e0e1036f9fc
* vim-patch:8.2.4704: using "else" after return or break increases indent (#18032)zeertzjq2022-04-08
| | | | | Problem: Using "else" after return or break increases indent. Solution: Remove "else" and reduce indent. (Goc Dundar, closes vim/vim#10099) https://github.com/vim/vim/commit/f26c16144ddb27642c09f2cf5271afd163b36306
* vim-patch:8.2.4402: missing parenthesis may cause unexpected problemsBrian Leung2022-04-03
| | | | | | Problem: Missing parenthesis may cause unexpected problems. Solution: Add more parenthesis is macros. https://github.com/vim/vim/commit/ae6f1d8b14c2f63811ee83ef14e32086fb3e9b83
* 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 #17266 from famiu/feat/ui/global-statuslinebfredl2022-03-17
|\ | | | | feat(statusline): add global statusline
| * feat: add support for global statuslineFamiu Haque2022-03-18
| | | | | | | | | | | | | | | | | | | | Ref: #9342 Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`. Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`. The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
* | Merge pull request #17589 from kchibisov/add-dashed-dotted-underlineJames McCoy2022-03-05
|\ \ | | | | | | Add support for double, dashed, and dotted underlines
| * | 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.
* | | refactor: fix clang-tidy bugprone-signed-char-misuse warningsDundar Göc2022-03-04
|/ / | | | | | | | | Prefer to declare variables with correct type instead of explicit casts wherever possible.
* | feat(lua): show proper verbose output for lua configurationshadmansaleh2022-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `:verbose` didn't work properly with lua configs (For example: options or keymaps are set from lua, just say that they were set from lua, doesn't say where they were set at. This fixes that issue. Now `:verbose` will provide filename and line no when option/keymap is set from lua. Changes: - compiles lua/vim/keymap.lua as vim/keymap.lua - When souring a lua file current_sctx.sc_sid is set to SID_LUA - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`. So it can be reused for lua files. - Added new function `nlua_get_sctx` that extracts current lua scripts name and line no with debug library. And creates a sctx for it. NOTE: This function ignores C functions and blacklist which currently contains only vim/_meta.lua so vim.o/opt wrappers aren't targeted. - Added function `nlua_set_sctx` that changes provided sctx to current lua scripts sctx if a lua file is being executed. - Added tests in tests/functional/lua/verbose_spec.lua - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose Note: These can't yet be directly set from lua but once that's possible :verbose should work for them hopefully :D - add :verbose support for nvim_exec & nvim_command within lua Currently auto commands/commands/functions ... can only be defined by nvim_exec/nvim_command this adds support for them. Means if those Are defined within lua with vim.cmd/nvim_exec :verbose will show their location . Though note it'll show the line no on which nvim_exec call was made.
* | 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
* vim-patch:8.2.4307: a few more messages should not be translatedzeertzjq2022-02-06
| | | | | | Problem: A few more messages should not be translated. Solution: Remove _(). https://github.com/vim/vim/commit/0c1550d9e94046d3fc9a8ad70b895eaa1e53fca5
* vim-patch:8.2.4303: a few messages should not be translatedzeertzjq2022-02-06
| | | | | | Problem: A few messages should not be translated. Solution: Remove _(). (Dominique Pellé, closes vim/vim#9702) https://github.com/vim/vim/commit/cd53eed2c55f2256008962965b1de1d1df76d535
* 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.
* 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