Björn Linse
0bafa44f8b
refactor(api): use a keyset for highlight dicts
2022-02-02 23:18:25 +01:00
Lewis Russell
4aa0cdd3aa
feat(highlight): ns=0 to set :highlight namespace
...
Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
2022-02-01 11:54:12 +00:00
Björn Linse
df54d82b7c
refactor(misc1): move out high-level input functions to a new file: input.c
...
Possibly dialog code is messages.c could be moved here as well.
misc1.c is now empty, so delete it.
2021-12-10 18:15:33 +01:00
Björn Linse
26eb605152
Merge pull request #16597 from bfredl/nomisc1
...
refactor: move out some long-hanging fruit from misc1.c
2021-12-10 10:56:17 +01:00
Björn Linse
2ec0e0a868
refactor(misc1): move line_breakcheck family of functions to os/input.c
2021-12-09 21:00:04 +01:00
James McCoy
f3fb77c402
vim-patch:8.2.3757: an overlong highlight group name is silently truncated
...
Problem: An overlong highlight group name is silently truncated.
Solution: Give an error if the name is too long. (closes vim/vim#9289 )
f7f7aaf8aa
2021-12-08 21:48:00 -05:00
James McCoy
e8f9262125
vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'
...
Problem: Cannot adjust sign highlighting for 'cursorline'.
Solution: Add CursorLineSign and CursorLineFold highlight groups.
(Gregory Anders, closes vim/vim#9201 )
e413ea04b7
2021-12-08 21:47:58 -05:00
Björn Linse
76af219e3e
Merge pull request #16411 from dundargoc/refactor/upgrade-uncrustify
...
refactor: upgrade uncrustify config version to 0.74.0
2021-12-04 12:31:42 +01:00
Jan Edmund Lazo
8ae7dabc10
Merge pull request #16381 from VVKot/vim-8.1.0228
...
vim-patch:8.1.0228, 8.1.1384, 8.1.1386, 8.1.1393, 8.2.3040
2021-11-30 21:21:36 -05:00
Dundar Göc
849f104c27
refactor: upgrade uncrustify config version to 0.74.0
...
Disable formatting for assert.h since there's a bug that results in a
segmentation fault in uncrustify.
2021-11-23 10:28:49 +01:00
VVKot
ee99f34438
vim-patch:8.1.1393: unnecessary type casts
...
Problem: Unnecessary type casts.
Solution: Remove type casts from alloc() and lalloc() calls. (Mike Williams)
51e14387f1
2021-11-22 05:44:40 +00:00
Volodymyr Kot
9d0726f6d8
vim-patch:8.1.1606: on a narrow screen ":hi" output is confusing ( #16388 )
...
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 )
548be7f126
2021-11-21 13:10:24 -05:00
dundargoc
725cbe7d41
refactor: saner options for uncrustify ( #16204 )
...
* 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
2021-11-19 14:21:53 -05:00
dundargoc
eba317d7a9
refactor: reduce number of explicit char casts ( #16077 )
...
* refactor: reduce number of explicit char casts
2021-11-16 20:27:59 +01:00
Björn Linse
0039ba04b0
refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2len
2021-11-14 12:49:12 +01:00
James McCoy
e6ff154be6
vim-patch:8.1.0779: argument for message functions is inconsistent
...
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
32526b3c18
2021-11-01 06:41:29 -04:00
James McCoy
efa924f66b
vim-patch:8.1.0743: giving error messages is not flexible
...
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.
f9e3e09fdc
2021-11-01 06:41:28 -04:00
dundargoc
a68faed02d
refactor: saner options for uncrustify #16196
...
* 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
2021-10-31 17:03:08 -07:00
dundargoc
4472c56d54
refactor: uncrustify #16090
2021-10-29 17:23:20 -07:00
Dundar Göc
8000f6d566
vim-patch:8.1.2395: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
0d6f5d9740
2021-10-21 12:07:14 +02:00
Dundar Göc
6059784770
refactor: remove space after star
2021-10-19 15:20:33 +02:00
Jan Edmund Lazo
77e6ecf85a
Merge pull request #15930 from dundargoc/vim-patch/old-style-c-comments
...
vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
2021-10-17 10:21:40 -04:00
Dundar Göc
24a1880866
refactor: reduce number of unique char casts
2021-10-13 18:26:18 +02:00
dundargoc
649b3160a1
refactor: reduce number of unique char casts ( #15995 )
2021-10-12 17:52:54 +02:00
Dundar Göc
e8f87f15d7
vim-patch:8.1.2395: using old C style comments
...
Problem: Using old C style comments.
Solution: Use // comments where appropriate.
0d6f5d9740
2021-10-06 11:50:10 +02:00
Gregory Anders
088026205f
refactor: define diagnostic highlights in syntax.c
2021-10-03 20:06:06 -06:00
dundargoc
d90fb1c0bf
Refactor/uncrustify ( #15790 )
...
* 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
2021-09-29 19:48:50 +02:00
dundargoc
2f9b9e61d7
refactor: format with uncrustify #15778
...
* fixup: force exactly one whitespace between type and variable
2021-09-25 17:16:04 -07:00
dundargoc
f4ca3a29dd
refactor: reformat with uncrustify #15736
...
* fix function parameter comments
* remove space after star in function names
2021-09-20 09:35:41 -07:00
Björn Linse
396280d303
refactor(runtime): always use DIP_START when searching for runtime files
...
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()|
2021-09-18 13:53:50 +02:00
dundargoc
867e888599
refactor(style): switch-case formatting, "uncrustify:indent-off" #15669
...
* 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
2021-09-17 07:38:16 -07:00
dundargoc
b8cce77702
fix: "redundant cast to the same type" #15662
...
Apply "redundant cast to the same type" fix from clangd.
2021-09-14 04:07:08 -07:00
dundargoc
d5b66e8860
refactor: replace TRUE/FALSE with true/false #15647
2021-09-13 04:57:36 -07:00
dundargoc
e8067d1490
refactor(syntax.c): format with uncrustify #15627
2021-09-11 07:07:15 -07:00
zeertzjq
32024787b6
vim-patch:8.1.2229: color number column above/below cursor #15409
...
Problem: Cannot color number column above/below cursor differently.
Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624 )
efae76ab1a
2021-08-27 05:50:37 -07:00
dundargoc
db1b0ee3b3
refactor: replace TRUE/FALSE with true/false #15425
2021-08-22 07:10:57 -07:00
Björn Linse
4500253f60
refactor(syntax): don't use pointer indirected maps for no reason
2021-08-22 10:10:15 +02:00
Björn Linse
bb4b4d79a8
perf(highlight): use a hashtable for highlight group names
...
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)
2021-08-19 15:08:50 +02:00
Björn Linse
a9f563ab62
refactor(highlight): make syn_check_group alloc free for existing group
2021-08-18 14:19:01 +02:00
zeertzjq
1666fe9dfe
vim-patch:8.1.2029: cannot control 'cursorline' highlighting well
...
Problem: Cannot control 'cursorline' highlighting well.
Solution: Add "screenline". (Christian Brabandt, closes vim/vim#4933 )
017ba07fa2
2021-08-02 05:41:17 +08:00
Björn Linse
15698eb5a1
Merge pull request #15206 from dundargoc/refactor/a-song-of-true-and-false/global-variables-2
...
refactor: replace TRUE/FALSE with true/false
2021-07-30 17:53:07 +02:00
Dundar Göc
94120d2fd5
refactor: replace TRUE/FALSE with true/false
2021-07-30 12:29:32 +02:00
Jan Edmund Lazo
870c43c023
fixup! fix(highlight): remove syncolor.vim
...
Fix lint errors from lines with 80+ characters.
2021-07-29 23:01:24 -04:00
Gregory Anders
9190addf1f
fixup! fix(highlight): remove syncolor.vim
2021-07-27 16:00:53 -06:00
Gregory Anders
9afa0d25a6
fix(highlight): remove syncolor.vim
...
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 ).
2021-07-27 14:14:30 -06:00
dundargoc
4547137aaf
chore: use codespell to spell check #15016
2021-07-07 15:28:44 -07:00
shadmansaleh
1e6c02510a
feat(runtime): Allow lua to be used in colorschemes
...
* tests(runtime): move runtime/plugin tests to functional/lua/runtime_spec
2021-06-11 01:01:02 +06:00
Björn Linse
b0a1d1eb64
startup: do "syntax enable" instead of "syntax on"
...
"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.
2021-04-30 16:48:12 +02:00
Jan Edmund Lazo
7d3f31c064
vim-patch:8.2.2761: using "syn include" does not work properly
...
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 )
2e240bd428
Cherry-pick AssertHighlightGroups from patch v8.2.2068.
2021-04-15 18:30:04 -04:00
Björn Linse
a4d3804837
Border: allow to enable/disable specific border edges
2021-04-04 18:32:31 +02:00