neovim/scripts
Jongwook Choi 6c35fb421e fix(gen_lsp.lua): improve type name, and fix wrong type inheritance
Style improvements:

1. Anonymous classes derived from `StructureLiteralType` should have a
   better name. The class name can be also nested. Examples:

```diff
----@field serverInfo? anonym1
+---@field serverInfo? lsp._anonym1.serverInfo
```
```diff
----@field insertTextModeSupport? anonym26
+---@field insertTextModeSupport? lsp._anonym26.completionItem.insertTextModeSupport
```

2. Add one separate empty line before each `@field` definition. Without
   these, empty lines the doc can look confusing because descriptions
   also may contain empty lines. See `lsp.CompletionItem` for example:

```lua
---The kind of this completion item. Based of the kind
---an icon is chosen by the editor.
---@field kind? lsp.CompletionItemKind
---Tags for this completion item.
---
---@since 3.15.0
---@field tags? lsp.CompletionItemTag[]
```

   It might feel like "Tags for this completion item" belongs to `kind`,
   not `tags` due to the lack of separator blank lines. The following
   (after this commit) should look much better:

```diff
 ---The kind of this completion item. Based of the kind
 ---an icon is chosen by the editor.
 ---@field kind? lsp.CompletionItemKind
+---
 ---Tags for this completion item.
 ---
 ---@since 3.15.0
 ---@field tags? lsp.CompletionItemTag[]
```

3. Escape some LSP-specific annotations that can't be recognized by
   lua-ls. It'd be better to make them visible in LSP hover doc windows.

   Example: `@sample ...`.

Fixes:

1. A type may extend from more than one base types (as well as mixin
   types). Previously only the first base class was being considered,
   resulting incomplete base classes for `@class` definitions.

   Example: `InlayHintOptions` (should have both of `resolveProvider`
   and `workDoneProgress`, the latter is from `WorkDoneProgressOptions`)

```diff
----@class lsp.InlayHintOptions
+---@class lsp.InlayHintOptions: lsp.WorkDoneProgressOptions
```

2. Remove `<200b>` (zero-width space) unicode characters.

3. Add the missing newline at EOF.
2023-12-27 10:48:06 +01:00
..
bump_deps.lua build: enable lintlua for scripts/ dir #26391 2023-12-04 12:38:31 -08:00
check_urls.vim vim-patch: move test_urls.vim out of runtime/ 2018-11-12 12:36:40 -05:00
cliff.toml chore: forward-port changes from v0.8.2 release 2022-12-29 17:36:28 +01:00
download-unicode-files.sh build(lintsh): double quote to prevent word splitting (#21571) 2022-12-28 22:50:24 +01:00
gen_eval_files.lua feat: generate types and docs for v variables 2023-12-21 14:19:10 +00:00
gen_filetype.lua build: enable lintlua for scripts/ dir #26391 2023-12-04 12:38:31 -08:00
gen_help_html.lua docs: add wiki FAQ to the runtime documentation (#26539) 2023-12-13 17:31:39 +01:00
gen_lsp.lua fix(gen_lsp.lua): improve type name, and fix wrong type inheritance 2023-12-27 10:48:06 +01:00
gen_vimdoc.py docs: support @since for api level #25574 2023-11-27 08:23:04 -08:00
genappimage.sh ci: make all linux releases work with same glibc version 2023-04-22 22:58:14 +02:00
git-log-pretty-since.sh build(lint): add more shell scripts to lintsh 2022-11-01 18:37:21 +01:00
legacy2luatest.pl legacy2luatest: Use before_each instead of setup. 2016-02-01 09:09:08 +01:00
lintcommit.lua build: enable lintlua for scripts/ dir #26391 2023-12-04 12:38:31 -08:00
lua2dox.lua build: enable lintlua for scripts/ dir #26391 2023-12-04 12:38:31 -08:00
movedocs.pl Move documentation from function declarations to definitions 2014-06-02 11:04:04 -03:00
release.sh build(lint): add more shell scripts to lintsh 2022-11-01 18:37:21 +01:00
shadacat.py Merge #11319 'inccommand: fix issues with modifiers and prompting' 2019-11-05 17:34:21 -08:00
update_terminfo.sh refactor: replace manual header guards with #pragma once 2023-11-12 22:01:28 +01:00
vim-patch.sh docs: move vim-patch wiki page to runtime documentation 2023-12-13 18:31:05 +01:00
vimpatch.lua build: enable lintlua for scripts/ dir #26391 2023-12-04 12:38:31 -08:00
windows.ti fix(terminfo): disable smglr for vtpcon and conemu (#18855) 2022-06-05 14:39:56 +02:00