aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/configs/lua_ls.lua
Commit message (Collapse)AuthorAgeFilesLines
* docs: add deprecation notice to lua/lspconfig/configs #4189Justin M. Keyes2025-11-151-0/+7
|
* refactor: replace vim.loop with vim.uv #3703v2.0.0Chris Bandy2025-04-101-1/+1
| | | | | | 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
* fix!: remove `lua` as root markerdundargoc2025-02-231-11/+2
| | | | | | | | | 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.
* fix(lua_ls): return longest root pathAfiq Nazrie2025-02-181-6/+5
| | | | | | | 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
* docs(lua_ls): don't skip VIMRUNTIME ~/.config/nvim/.luarc.json exists #3603jyn2025-02-061-1/+1
| | | .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.
* refactor: deprecate util.find_git_ancestordundargoc2024-12-141-1/+1
| | | | Work on https://github.com/neovim/nvim-lspconfig/issues/2079.
* refactor: replace all instances of vim.uv with vim.loopdundargoc2024-12-021-1/+1
| | | | | 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.
* fix(lua_ls): when neither lua or git root found, return nil. See #3322 (#3391)Folke Lemaitre2024-10-221-0/+3
|
* docs(lua_ls): hint about personal config #3381Jean-Charles Quillet2024-10-181-1/+1
|
* refactor: replace deprecated vim.loop with vim.uvdundargoc2024-10-021-1/+1
|
* fix(lua-language-server): root directory pattern #3322Peter Kling2024-10-011-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Looking at the code for root dir detection for `lua_ls`: https://github.com/neovim/nvim-lspconfig/blob/9bda20fb967075355f253911bc066a8b5a03c77e/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](https://github.com/neovim/nvim-lspconfig/blob/9bda20fb967075355f253911bc066a8b5a03c77e/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
* refactor: rename "server_configurations" => "configs" #3330Justin M. Keyes2024-10-011-0/+90
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.