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 JsonNull conversion error #402

Conversation

schrieveslaach
Copy link
Contributor

Some LSP clients do not send values outside of of configuration namespace. For example Neovim does not support sending client configurations to mimic the VScode behavior. Following in Lua is not possible.

require('sonarlint').setup({
   server = {
      cmd = {
         --
      },
      settings = {
         sonarlint = {
            --
         },
         ["files.exclude"] = { ["**/.git"] = true },
      }
   },
})

This commit makes sure that sonarlint language server still functions if the values won't be sent. Otherwise, the language server errors while loading the project.

Part of

Some LSP clients do not send values outside of of configuration
namespace. For example Neovim does not support sending client
configurations to mimic the VScode behavior. Following in Lua is not
possible.

```lua
require('sonarlint').setup({
   server = {
      cmd = {
         -- …
      },
      settings = {
         sonarlint = {
            -- …
         },
         ["files.exclude"] = { ["**/.git"] = true },
      }
   },
})
```

This commit makes sure that sonarlint language server still functions if
the values won't be sent. Otherwise, the language server errors while
loading the project.
@schrieveslaach
Copy link
Contributor Author

The error has been reported here: https://gitlab.com/schrieveslaach/sonarlint.nvim/-/issues/24

@bmihovski
Copy link

Hey @sophio-japharidze-sonarsource could you please check this PR when you can?
Currently, the latest sonarlint--language-server is not available for all of the neovim users and we hope that can be sorted out quickly by applying the changes from here.

Thank you for your understanding.

@jblievremont
Copy link
Member

Hey @schrieveslaach, thank you for this new contribution!

I copied it as #410 to let our CI checks run on it.

If this is OK for you, I'll make sure that this other PR is reviewed and merged for the next release.

@schrieveslaach
Copy link
Contributor Author

@jblievremont, yeah sure. Just tag me if you need me to do something.

@coderkun
Copy link

Any news on this? Would be great to get SonarLint working again in neovim.

@jblievremont
Copy link
Member

Merged as part of #410, the changes should be available in the next public release of the language server.

Thanks again!

@schrieveslaach
Copy link
Contributor Author

@jblievremont, thanks for driving this fix forward.

@jblievremont
Copy link
Member

Hello 👋🏻 FYI sonarlint-language-server 3.13.0.75723 has just been released and should be available on Maven Central on the next cache refresh.

@coderkun
Copy link

coderkun commented Dec 3, 2024

Hello 👋🏻 FYI sonarlint-language-server 3.13.0.75723 has just been released […]

Nice. For use with Mason we still have to wait for the VSCode plugin to be released though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants