Coder Social home page Coder Social logo

Comments (4)

GaetanLepage avatar GaetanLepage commented on August 29, 2024

This is weird, and I don't know what could cause this.
However, the thing to try first is to set plugins.lsp.servers.rust-analyzer.installCargo and plugins.lsp.servers.rust-analyzer.installRustc to false.
Like so, the LSP will fall back to using the cargo/rustc from your environment.

from nixvim.

vsiles avatar vsiles commented on August 29, 2024

Looks like it works !
In my config I'm using rustaceanvim instead of configuring rust-analyzer all by myself. Doing what you wrote made the error disappear, but I now have two RA running with the message:

nvim-lspconfig.rust_analyzer has been setup.
This will likely lead to conflicts with the rustaceanvim LSP client.
See ':h rustaceanvim.mason'

I tried to change my config in this way:

      rustaceanvim = {
        enable = true;
        settings = {
          server = {
            default_settings = {
              rust-analyzer = {
                installCargo = false;
                installRustc = false;
                cargo = {
                  allFeatures = true;
                };
                check = {
                  command = "clippy";
                };
                inlayHints = {
                  lifetimeElisionHints = {
                    enable = "always";
                  };
                };
              };
            };
            standalone = false;
          };
        };
      };

but it didn't work. I'll continue to see how I can avoid that warning message ;)

from nixvim.

vsiles avatar vsiles commented on August 29, 2024

Feels like I have to enable rust-analyzer (https://github.com/nix-community/nixvim/blob/main/plugins/lsp/language-servers/rust-analyzer.nix#L40) for the installCargo/Rustc option to be taken into account.
Do you think there's a way around that without pulling the checks out of the lib.mkIf ?

from nixvim.

vsiles avatar vsiles commented on August 29, 2024

@GaetanLepage do you know of a way to configure installCargo and installRustc to false while using rustaceanvim and not rust-analyzer directly ?

from nixvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.