Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lsp): prevent nil upvalue index on workspace folder change #23

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.3] - 2023-10-25
### Fixed
- Potential attempt to index `nil` upvalue when sending `workspace/didChangeWorkspaceFolders`
to LSP server [[#22](https://github.com/mrcjkb/rustaceanvim/issues/22)].

## [3.0.2] - 2023-10-23

### Fixed
- Hover actions: Tree-sitter syntax highlighting
in Neovim 0.9 [#20](https://github.com/mrcjkb/rustaceanvim/issues/20).
in Neovim 0.9 [[#20](https://github.com/mrcjkb/rustaceanvim/issues/20)].

## [3.0.1] - 2023-10-23

### Fixed
- Add support for `workspace/didChangeWorkspaceFolders` to prevent more than one
rust-analyzer server from spawning per Neovim instance [#7](https://github.com/mrcjkb/rustaceanvim/issues/7).
- Neovim 0.9 compatibility [#9](https://github.com/mrcjkb/rustaceanvim/issues/9).
rust-analyzer server from spawning per Neovim instance [[#7](https://github.com/mrcjkb/rustaceanvim/issues/7)].
- Neovim 0.9 compatibility [[#9](https://github.com/mrcjkb/rustaceanvim/issues/9)].

## [3.0.0] - 2023-10-22

Expand Down
3 changes: 1 addition & 2 deletions lua/rustaceanvim/lsp.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
local M = {}
---@type RustaceanConfig
local config = require('rustaceanvim.config.internal')
local methods = require('vim.lsp.protocol').Methods
local compat = require('rustaceanvim.compat')
local rust_analyzer = require('rustaceanvim.rust_analyzer')
local joinpath = compat.joinpath
Expand Down Expand Up @@ -107,7 +106,7 @@ M.start = function()
removed = {},
},
}
client.rpc.notify(methods.workspace_didChangeWorkspaceFolders, params)
client.rpc.notify('workspace/didChangeWorkspaceFolders', params)
if not client.workspace_folders then
client.workspace_folders = {}
end
Expand Down