neovim/runtime
Christian Clason 30374db955 vim-patch:a4c085a3e607
runtime(java): Improve the recognition of the "style" method declarations

- Request the new regexp engine (v7.3.970) for [:upper:] and
  [:lower:].

- Recognise declarations of in-line annotated methods.

- Recognise declarations of _strictfp_ methods.

- Establish partial order for method modifiers as shown in
  the MethodModifier production; namely, _public_ and
  friends should be written the leftmost, possibly followed
  by _abstract_ or _default_, or possibly followed by other
  modifiers.

- Stop looking for parameterisable primitive types (void<?>,
  int<Object>, etc., are malformed).

- Stop looking for arrays of _void_.

- Acknowledge the prevailing convention for method names to
  begin with a small letter and for class/interface names to
  begin with a capital letter; and, therefore, desist from
  claiming declarations of enum constants and constructors
  with javaFuncDef.
  Rationale:
    + Constructor is distinct from method:
      * its (overloaded) name is not arbitrary;
      * its return type is implicit;
      * its _throws_ clause depends on indirect vagaries of
        instance (variable) initialisers;
      * its invocation makes other constructors of its type
        hierarchy invoked one by one, concluding with the
        primordial constructor;
      * its explicit invocation, via _this_ or _super_, can
        only appear as the first statement in a constructor
        (not anymore, see JEP 447); else, its _super_ call
        cannot appear in constructors of _record_ or _enum_;
        and neither invocation is allowed for the primordial
        constructor;
      * it is not a member of its class, like initialisers,
        and is never inherited;
      * it is never _abstract_ or _native_.
    + Constructor declarations tend to be few in number and
      merit visual recognition from method declarations.
    + Enum constants define a fixed set of type instances
      and more resemble class variable initialisers.

Note that the code duplicated for @javaFuncParams is written
keeping in mind for g:java_highlight_functions a pending 3rd
variant, which would require none of the :syn-cluster added
groups.

closes: vim/vim#14620

a4c085a3e6

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-04-25 08:23:39 +02:00
..
autoload vim-patch:08d2401fbc6d 2024-04-04 10:29:58 +02:00
colors fix(treesitter): document more standard highlight groups 2024-03-19 09:41:16 +01:00
compiler vim-patch:8a31de6dd275 (#28361) 2024-04-16 09:33:51 +08:00
doc feat(fs): add vim.fs.root (#28477) 2024-04-24 21:43:46 -05:00
ftplugin vim-patch:9.1.0366: filetype: ondir files are not recognized 2024-04-23 09:38:46 +02:00
indent vim-patch:d3ff129ce8c6 2024-04-22 00:18:34 +02:00
keymap vim-patch:caee7956a21a 2023-11-05 21:56:56 +01:00
lua feat(fs): add vim.fs.root (#28477) 2024-04-24 21:43:46 -05:00
macros vim-patch:79230f027a25 2024-02-16 08:57:45 +01:00
pack/dist/opt vim-patch:d3c0ff5d5a90 2024-03-24 10:32:07 +01:00
plugin feat(defaults): add :Inspect to right-click menu (#28181) 2024-04-05 18:08:54 +08:00
queries fix(treesitter): update parsers and queries 2024-04-05 18:36:17 +02:00
spell feat(runtime): import cleanadd.vim from Vim (#17699) 2022-03-13 04:52:45 +00:00
syntax vim-patch:a4c085a3e607 2024-04-25 08:23:39 +02:00
tools vim-patch:e80086446cc2 (#19848) 2022-08-20 10:04:55 +02:00
tutor docs: fix typos (#27868) 2024-03-28 09:32:32 +08:00
CMakeLists.txt build: various fixes 2024-02-01 12:06:55 +01:00
delmenu.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
filetype.lua fix(filetype): use unexpanded file name (#27931) 2024-03-23 11:46:23 +08:00
ftoff.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
ftplugin.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
ftplugof.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
indent.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
indoff.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
macmap.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
makemenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00
menu.vim vim-patch:e059fae10044 2023-08-24 11:33:06 +09:00
mswin.vim vim-patch:45da32964d6e 2024-03-14 15:04:31 +08:00
neovim.ico feat(windows): show icon in terminal titlebar, taskbar #20607 2022-10-13 05:48:12 -07:00
nvim.appdata.xml docs: add wiki FAQ to the runtime documentation (#26539) 2023-12-13 17:31:39 +01:00
nvim.desktop build(nvim.desktop): central Kurdish translation #17065 2022-05-13 11:58:22 -07:00
nvim.png Dist: make icon a proper square (#9716) 2019-03-11 21:00:12 +01:00
optwin.vim vim-patch:9.1.0147: Cannot keep a buffer focused in a window 2024-03-11 11:38:13 +08:00
synmenu.vim vim-patch:9.1.0013: Modula2 filetype support lacking (#27020) 2024-01-16 17:45:57 +00:00