105 Commits

Author SHA1 Message Date
Justin M. Keyes
f54cc14a3d
fix(docs): handle config errors, document rename #4192
Problem:
If a config throws an error it fails the entire doc generation.

Solution:
Handle config error in docgen. Unfortunately, this doesn't show the
error message, it shows:

    loop or previous error loading module 'lsp.volar'

instead of the actual `error('…')` message.

So meanwhile, document the current deprecation/rename pattern and use
`vim.notify()` instead.
2025-11-16 10:25:25 -08:00
Fidel Yin
ee2993adab
fix(docs): "commands" item breaks docgen #3944 2025-07-10 05:48:37 -07:00
Justin M. Keyes
98f3d1dae2
feat(docgen.lua): convert @brief codeblocks for vimdoc #3787 2025-04-26 14:25:08 -07:00
Justin M. Keyes
50a537d614
feat(docgen.lua): improve vimdoc generator #3783 2025-04-26 10:24:39 -07:00
Justin M. Keyes
a9b2e80d29 fix(docgen.lua): obsolete enable snippet 2025-04-25 20:47:20 +02:00
Justin M. Keyes
843f4ccfc8
fix(docgen.lua): omnisharp "--hostPID" arg always changes #3763 2025-04-22 06:19:15 -07:00
Justin M. Keyes
44ba712bc3
ci(lint): use client:exec_cmd() #3755
Use `client:exec_cmd()` instead of calling
`request("workspace/executeCommand")` directly.
2025-04-21 13:43:00 -07:00
Justin M. Keyes
ecb74c22b4
fix(docs): docgen.lua reads from lua/*.lua #3708
Problem:
Since configs now live in `lsp/`, the docgen needs to be updated.

Solution:
Read the configs from `lsp/`. Parse the `@brief` docstring to get the
docs.
2025-04-12 19:40:01 -07:00
Chris Bandy
4ea9083b6d
refactor: replace vim.loop with vim.uv #3703
The former is deprecated in neovim 0.10. Remove the check added in
9b89ba5f158f73779cd58d0bb2783dfb40b28b0e.

See: https://github.com/neovim/neovim/blob/v0.10.0/runtime/doc/deprecated.txt#L55
2025-04-10 15:48:31 -07:00
Justin M. Keyes
171b6df1ad
fix(docgen): :help (vimdoc) format #3683
followup to #3675
2025-04-02 06:33:41 -07:00
Daigo Yamashita
d1256cba52
fix(docgen): generate configs.txt in :help (vimdoc) format #3675 2025-04-02 06:10:55 -07:00
Justin M. Keyes
9dc8ecb488
fix(docgen): root_dir doc shows paths from CI env #3630
Problem:
When `root_dir` is not defined as a function, the generated docs show
the paths resolved in the CI env:

    root_dir : lua "/home/runner/work/nvim-lspconfig/nvim-lspconfig"

Solution:
Always show the "gF" message for `root_dir`, even if it is not
a function.

Fix #3628
2025-02-27 04:31:41 -08:00
Justin M. Keyes
848a2d2300
refactor(docgen): use vim.text.indent() #3629 2025-02-27 04:17:12 -08:00
dundargoc
d9fbdafd80 build: remove docgen.sh
Instead, generate documentation by running the `docgen.lua` executable.
2025-01-21 15:45:44 +01:00
dundargoc
d68378cca4 refactor: silence luals warnings 2024-12-22 14:37:19 +01:00
dundargoc
45c5095097 refactor: deprecate util.path.join
Work on https://github.com/neovim/nvim-lspconfig/issues/2079.
2024-12-21 16:10:35 +01:00
dundargoc
040001d85e refactor: fix luals warnings 2024-12-19 11:33:57 +01:00
Justin M. Keyes
64073cbed0
Revert "refactor: use simpler file existence check" #3495
This reverts commit 90c1c6cc822b1836209514c096069b9bbeab63d9.

Fix #3485
2024-12-06 03:19:39 -08:00
dundargoc
9b89ba5f15 refactor: replace all instances of vim.uv with vim.loop
We still support neovim 0.9 currently, so we can't use vim.uv. Also add
a check so we don't accidentally reintroduce it.
2024-12-02 11:12:18 +01:00
dundargoc
90c1c6cc82 refactor: use simpler file existence check
The vimscript function `getftype` is an easier way to check for file
existence compared to vim.uv.
2024-12-01 15:11:38 +01:00
dundargoc
86dcd4d4ec
refactor: deprecate util.path.is_file #3474 2024-11-28 13:44:19 -08:00
Justin M. Keyes
a4a0cf9b39
feat(docs): improve formatting of generated docs #3400 2024-10-24 10:28:14 -07:00
Justin M. Keyes
b2c90502d8 feat(docs): improve formatting of generated docs 2024-10-24 17:38:57 +02:00
Justin M. Keyes
903866024c feat(docs): autogenerate default_config docs
Problem:
debug.info() is useless for some functions because they point to util.lua

Solution:
Provide a path to the source code instead of trying to inline the source
code.
2024-10-24 17:24:48 +02:00
Justin M. Keyes
9624fffcfa feat(docs): autogenerate default_config docs
Problem:
Docs are manually maintained everywhere for no good reason.

Solution:
- revert commit 9dc02492c4a457479f8a0ec7a65aac1852ff59c0
- provide a "gF" friendly link to the source
2024-10-24 17:24:45 +02:00
Justin M. Keyes
ff69ecca55 docs: fix old URL 2024-10-09 20:52:54 +02:00
Justin M. Keyes
cc5f97f4ee refactor: minor cleanup 2024-10-06 21:41:54 +02:00
Justin M. Keyes
dcf511d53f
ci: rename README_template.md #3357
The name `README_template.md` is confusing, because it is not related to
the README (that changed long ago).
2024-10-06 03:47:24 -07:00
Jan Fooken
2d7b68d436
docs: hide modeline #3356 2024-10-06 03:40:06 -07:00
Justin M. Keyes
a62ecb7c75
refactor(docgen): cleanup #3336 2024-10-02 03:22:02 -07:00
dundargoc
c25b9dd6bd refactor: replace deprecated vim.loop with vim.uv 2024-10-02 12:09:17 +02:00
Justin M. Keyes
ae7698f4fe
feat: expose config definition as config_def #3335
Problem:
Users/plugins may want to use the config definition without actually
activating the config via setup().

Solution:
- Expose `config_def` field and document it.
- Also undeprecate some stuff that doesn't yet have a documented
  alternative.

TODO: configs.lua sets `M.filetypes = config.filetypes` and other fields
in ad-hoc fashion "for :LspInfo" but it's not clear when those fields
are actually populated, and they don't source from `config_def`...
2024-10-02 02:50:41 -07:00
Justin M. Keyes
bedb2a0df1
refactor: rename "server_configurations" => "configs" #3330
Problem:
The name `server_configurations` is extremely verbose and irritatingly
formal and dogmatic. This overlong name is a constant nuisance when
reading, writing, and coding.

It's also not even correct: these configurations are just as much
"client" configurations as they are "server" configurations.

Solution:
- Rename to a shorter name.
- Leave placeholder files for any old URLs that link to the old
  location.
2024-10-01 05:39:12 -07:00
glepnir
772b01a1de
fix(scripts): use compatible tbl_flatten in docgen (#3171) 2024-05-23 15:18:03 +08:00
glepnir
45015c6d1f
refactor: add compatible tbl_flatten and lsp_get_clients for new version 0.10 (#3154) 2024-05-17 14:06:45 +08:00
Raphael
13e86cb91e
test: remove test depend and use vusted (#2603) 2023-05-11 14:48:48 +08:00
Zhizhen He
c6105c4496
chore: remove redundant config for Lua (#2523) 2023-03-23 16:35:08 +08:00
figsoda
581b96352e
docs: make sure username doesn't leak into generated document (#2441)
* docs: make sure username doesn't leak into generated document

The documents previously contained `runner`, the username of GitHub
Actions runners, which would be overwritten by the user's name when run
locally and generate unwanted diff.

* docs: rename username to user

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>

---------

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2023-02-15 22:47:52 +08:00
Marc Jakobi
64bee38a97 chore: use luarocks-tag-release workflow 2023-02-03 18:23:14 +01:00
Marc Jakobi
2df0fbdadd ci: add luarocks upload release workflow
The recently added rockspec (see #2307) has to be prepared and
uploaded to luarocks for each release.

This adds an automated workflow for it, which has been tested with
plenary.nvim.

To be able to upload to luarocks, the owner of the luarocks account
will have to add an API key named `LUAROCKS_API_KEY` to this repo's
GitHub Actions secrets.
2023-01-08 18:59:12 +01:00
numToStr
41d92f2c81
chore(rust-analyzer): use vim.json.decode instead of fn.json_decode (#2096) 2022-08-27 17:03:41 +08:00
Justin M. Keyes
4f94bf5ba9 docs: unverbose, mention "settings" param
Problem:
- The docs are verbose.
- The "settings" param is not really clarified anywhere.

Solution:
- Mention the "settings" param in the README.
- Tighten up the wording.
- Remove the "Use a loop to conveniently call 'setup'..." advice in the
  docs. It confuses users and doesn't really save much code.
- Start to reduce the scope of nvim-lspconfig.
  - For example, it is redundant for it to document general LSP things.
    Thus, the help section *lspconfig-lsp* was removed.

closes #1951
2022-06-13 01:44:59 -07:00
Michael Lingelbach
9dc02492c4
docs: remove use of debug module for automatically extracting root pattern (#1799) 2022-03-20 12:15:43 -07:00
Michael Lingelbach
9a63d9af8c
docs: restore commands (#1798) 2022-03-20 11:55:16 -07:00
Michael Lingelbach
b603fa61f2
docs: clean up styling in documentation (#1797)
Make it more obvious not to copy/paste default_config
2022-03-20 11:48:23 -07:00
Javier Lopez
cea6e0b0f6
fix(help): workaround plugin/users overwritting tags (#1512)
Most plugin managers run :helptags in the plugin, which silently
overwrites the existing doc/tags. this is an issue for us since lspconfig
is manipulating the tags file to point to servers_configurations.md

Instead create a markdown comment with the name of the wanted tag and
make a copy in the repository of servers_configurations.md to
server_configurations.txt. Now when :helptags runs it finds the txt file
and generates the appropriate tag.

The advantage is this solution should work in all platforms, it also
removes lines from docgen CI.
2021-11-30 09:27:12 -05:00
Michael Lingelbach
d52e45acf9
docs: make |lspconfig-server-configurations| jump to the markdown file (#1497)
* generating the tags at docgen and modifying the
|lspconfig-server-configurations|
tag allows `:help lspconfig-server-configurations` take you to
./doc/server_configurations.md
* adding a modeline to the markdown file ensures it sets the
correct filetype

Co-authored-by: Javier López <graulopezjavier@gmail.com>
2021-11-27 09:01:30 -05:00
Michael Lingelbach
ba8419e002
docs: fix docgen (#1486) 2021-11-26 09:04:47 -05:00
Michael Lingelbach
97da7ed12e chore: clean up imports 2021-11-25 23:46:21 -05:00
Michael Lingelbach
6c2fb86c6a feat: expose configs 2021-11-25 23:46:21 -05:00