Skip to content

Commit

Permalink
refactor: rename "server_configurations" => "configs" #3330
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
justinmk authored Oct 1, 2024
1 parent 36f21ab commit bedb2a0
Show file tree
Hide file tree
Showing 343 changed files with 28,340 additions and 28,339 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
- name: Install codespell
run: pip install codespell
- name: Use codespell
run: codespell --quiet-level=2 --check-hidden --skip=./doc/server_configurations.md,./doc/server_configurations.txt --ignore-words=.codespellignorewords
run: codespell --quiet-level=2 --check-hidden --skip=./doc/configs.md,./doc/configs.txt --ignore-words=.codespellignorewords
4 changes: 2 additions & 2 deletions .github/workflows/comment-config-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- run: |
if ! git diff origin/$GITHUB_BASE_REF...$(git branch --show-current) --exit-code -- doc/server_configurations.md doc/server_configurations.txt; then
gh pr comment $PR_NUMBER --body 'Note that `server_configurations.md` or `server_configurations.txt` will be regenerated by the docgen CI process. Edit the Lua source file instead. For details on generating documentation, see: https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#generating-docs'
if ! git diff origin/$GITHUB_BASE_REF...$(git branch --show-current) --exit-code -- doc/configs.md doc/configs.txt; then
gh pr comment $PR_NUMBER --body 'Note that `configs.md` or `configs.txt` will be regenerated by the docgen CI process. Edit the Lua source file instead. For details on generating documentation, see: https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#generating-docs'
fi
4 changes: 2 additions & 2 deletions .github/workflows/docgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ jobs:
- name: Commit changes
env:
COMMIT_MSG: |
docs: update server_configurations.md
docs: update configs.md
skip-checks: true
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add doc/server_configurations.md doc/server_configurations.txt
git add doc/configs.md doc/configs.txt
# Only commit and push if we have changes
git diff --quiet && git diff --staged --quiet || (git commit -m "${COMMIT_MSG}"; git push)
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ If using nix, you can use `nix develop` to install these to a local nix shell.

## Generating docs

GitHub Actions automatically generates `server_configurations.md`. Only modify
GitHub Actions automatically generates `configs.md`. Only modify
`scripts/README_template.md` or the `docs` table in the server config Lua file.
Do not modify `server_configurations.md` directly.
Do not modify `configs.md` directly.

To preview the generated `server_configurations.md` locally, run `scripts/docgen.lua` from
To preview the generated `configs.md` locally, run `scripts/docgen.lua` from
`nvim` (from the project root):

nvim -R -Es +'set rtp+=$PWD' +'luafile scripts/docgen.lua'
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
nvim-lspconfig is a "data only" repo, providing basic, default [Nvim LSP client](https://neovim.io/doc/user/lsp.html)
configurations for various LSP servers.

View the [documentation for all configs](doc/server_configurations.md) or `:help lspconfig-all` from Nvim.
View the [documentation for all configs](doc/configs.md) or `:help lspconfig-all` from Nvim.

## Important ⚠️

Expand All @@ -28,7 +28,7 @@ View the [documentation for all configs](doc/server_configurations.md) or `:help

## Quickstart

1. Install a language server, e.g. [pyright](doc/server_configurations.md#pyright)
1. Install a language server, e.g. [pyright](doc/configs.md#pyright)
```bash
npm i -g pyright
```
Expand Down Expand Up @@ -97,7 +97,7 @@ The most common reasons a language server does not start or attach are:

1. Language server is not installed. nvim-lspconfig does not install language servers for you. You should be able to run the `cmd` defined in each server's Lua module from the command line and see that the language server starts. If the `cmd` is an executable name instead of an absolute path to the executable, ensure it is on your path.
2. Missing filetype plugins. Certain languages are not detecting by Vim/Nvim because they have not yet been added to the filetype detection system. Ensure `:set ft?` shows the filetype and not an empty value.
3. Not triggering root detection. **Some** language servers will only start if it is opened in a directory, or child directory, containing a file which signals the *root* of the project. Most of the time, this is a `.git` folder, but each server defines the root config in the lua file. See [server_configurations.md](doc/server_configurations.md) or the source for the list of root directories.
3. Not triggering root detection. **Some** language servers will only start if it is opened in a directory, or child directory, containing a file which signals the *root* of the project. Most of the time, this is a `.git` folder, but each server defines the root config in the lua file. See [doc/configs.md](doc/configs.md) or the source for the list of root directories.
4. You must pass `capabilities` for **each** `setup {}` if you want these to take effect.
5. **Do not call `setup {}` twice for the same server**. The second call to `setup {}` will overwrite the first.

Expand Down Expand Up @@ -127,14 +127,14 @@ Most of the time, the reason for failure is present in the logs.

## Contributions

If a language server is missing from [server_configurations.md](doc/server_configurations.md), contributing
If a language server is missing from [configs.md](doc/configs.md), contributing
a new configuration for it helps others, especially if the server requires special setup. Follow these steps:

1. Read [CONTRIBUTING.md](CONTRIBUTING.md).
2. Create a new file at `lua/lspconfig/server_configurations/SERVER_NAME.lua`.
- Copy an [existing config](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/)
2. Create a new file at `lua/lspconfig/configs/SERVER_NAME.lua`.
- Copy an [existing config](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/)
to get started. Most configs are simple. For an extensive example see
[texlab.lua](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/texlab.lua).
[texlab.lua](https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/configs/texlab.lua).
3. Ask questions on [GitHub Discussions](https://github.com/neovim/neovim/discussions) or in the [Neovim Matrix room](https://app.element.io/#/room/#neovim:matrix.org).

### Release process
Expand Down
Loading

0 comments on commit bedb2a0

Please sign in to comment.