12 Commits

Author SHA1 Message Date
Justin M. Keyes
abf6d190f2
docs: add deprecation notice to lua/lspconfig/configs #4189 2025-11-15 13:32:05 -08: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
dundargoc
b80eb9decf fix!: remove lua as root marker
There is no good reason to have it as a root marker and it makes the
configuration super convoluted. It breaks on even basic setups: opening
`src/nvim/generators/hashy.lua` in the neovim repo causes `src/nvim` to
be the root since there's a `lua` folder there. Instead, just make the
root a flat set of markers and let users who look for a more advanced
setup to adjust it in their own configurations.
2025-02-23 17:43:51 +01:00
Afiq Nazrie
1110787f1b fix(lua_ls): return longest root path
This commit doesn't address the case when root path == vim.env.HOME as
the case lack return when it's true (#2110)

Fix #3508
2025-02-18 16:59:33 +01:00
jyn
7c284f44fe
docs(lua_ls): don't skip VIMRUNTIME ~/.config/nvim/.luarc.json exists #3603
.luarc is created by lua-lsp itself (e.g. if you hit "disable diagnostics" in a code action), at which point the lsp will start showing errors that the vim global is undefined after the next restart.
2025-02-06 07:06:15 -08:00
dundargoc
12d163c5c2 refactor: deprecate util.find_git_ancestor
Work on https://github.com/neovim/nvim-lspconfig/issues/2079.
2024-12-14 17:24:12 +01: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
Folke Lemaitre
0d62a16429
fix(lua_ls): when neither lua or git root found, return nil. See #3322 (#3391) 2024-10-22 18:51:50 +08:00
Jean-Charles Quillet
3bbd7979b1
docs(lua_ls): hint about personal config #3381 2024-10-18 06:02:46 -07:00
dundargoc
c25b9dd6bd refactor: replace deprecated vim.loop with vim.uv 2024-10-02 12:09:17 +02:00
Peter Kling
814f02ed03
fix(lua-language-server): root directory pattern #3322
Problem:
Looking at the code for root dir detection for `lua_ls`:
9bda20fb96/lua/lspconfig/server_configurations/lua_ls.lua (L17-L27)
I was surprised that finding the git ancestor has lower priority than
the `lua/` subdirectories (which, btw, is not mentioned in docs).

Consider the following directory structure:

    HOME/
    ├─ workspaces/
    │  ├─ lua/
    │  ├─ python/
    │  ├─ work/
    │  │  ├─ SomeProjectWithLuaFiles/
    │  │  │  ├─ .git/

The `lua/` and `python/` directories contain some miscellaneous
language-specific projects I sometimes work on. The project directory
under work/ also contains some lua files. I expected the `.git` directory
in the project to ensure that the project root dir is correctly detected
to be `…/SomeProjectWithLuaFiles`. But since the [search for the `lua/`
subdirectory](9bda20fb96/lua/lspconfig/server_configurations/lua_ls.lua (L22))
is done first, my LSP detects `HOME/workspaces/` as the root directory.

Solution:
Search for the git ancestor before looking for the `lua/` subdirectory.
Return the longer root path if both a `.git/` and a `lua/` ancestor are found.
Fixes #3165
2024-10-01 07:20:13 -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